# How many strings of six lowercase letters contain the letters a and b in consecutive positions…

How many strings of six lowercase letters contain the letters a and b in consecutive positions with a preceding b, with all letters distinct?

Thank you.

-

Think about the following different cases:

ab[][][][]

[]ab[][][]

[][]ab[][]

[][][]ab[]

[][][][]ab

How many possibilities are there for case 1?

Can you see why there are the same number of possibilities for each of the five cases?

If so, take the number of possibilities for case 1 and multiply by 5.

-
In the first case, are there 26*25*24*23 possibilities for the remaining positions? –  user1038665 Nov 7 '12 at 4:06
I assume the '26' is because you are thinking of the 26 different letters in the alphabet. But one of the requirements is that all letters are distinct... –  Benjamin Dickman Nov 7 '12 at 4:11
Ah, ok, so the four positions have possibilities 24*23*22*21? –  user1038665 Nov 7 '12 at 4:40
Yes indeed! Now just remember there are 5 different cases and you can finish the problem off. –  Benjamin Dickman Nov 7 '12 at 6:06