# How many strings of length $7$ contain the substring bcd?

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.

• What have you attempted? – N. F. Taussig Oct 5 '15 at 12:13
• 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. – eloiprime Oct 5 '15 at 12:16
• Think of bcd as a block – Shailesh Oct 5 '15 at 12:20