Solution

No Letter Twice in a Row

Show the problem again

How many 8-letter words can be formed from the alphabet {A, B, C} if no two adjacent letters are equal? (Any string counts as a word.) Give an integer.

Worked solution

The answer is 384. The first letter can be any of 3. Each later letter can be anything except the letter immediately before it, so it has exactly 2 choices regardless of history. The total is 3 × 2⁷ = 384.

Source: Classic counting exercise in wide circulation; no traceable original source. Statement written for AxiomIQ.