0
$\begingroup$

Suppose there is a string of length $7$ that contain letters from $\{a, b, c, d, e, f, g\}$ without repetition. How many combinations can be made so that there is a substring "bcd" (b,c,d are consecutive and adjacent) in each?

I am quite confident that there are 7! possible combinations of all the letters, but other than that I do not know how to proceed.

$\endgroup$
  • 1
    $\begingroup$ What have you attempted? $\endgroup$ – N. F. Taussig Oct 5 '15 at 12:13
  • $\begingroup$ Try to think of an algorithm for constructing such a string. Then, compute how many ways one could execute each step of the algorithm. Finally, sum or multiply the numbers together using counting rules. $\endgroup$ – eloiprime Oct 5 '15 at 12:16
  • 1
    $\begingroup$ Think of bcd as a block $\endgroup$ – Shailesh Oct 5 '15 at 12:20
0
$\begingroup$

Consider 'bcd' to be a block or a single element. Then, your question becomes equivalent to finding the number of permutations of {bcd,a,e,f,g}. Then your answer is 5!.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.