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

combinatoricsintuition

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

Can someone give me a general method for thinking about this problem?

Thank you.

Best Answer

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.