How many good words are there?

360 Views Asked by At

A “good” word is any seven letter word consisting of letters from $\{A,B,C\}$ (some letters may be absent and some letter can be present more than once), with the restriction that $A$ cannot be followed by $B$, $B$ cannot be followed by $C$, and $C$ cannot be followed by $A$. How many good words are there?

I could find out $36$ good words. Is that the true answer?

2

There are 2 best solutions below

0
On BEST ANSWER

The first letter can be either A, B, or C. For each of the subsequent ones the only choice is whether it is to be the same or different from the previous one (because in each case there's only one "different" letter allowed).

There's 3 ways to make the first choice and 2 ways to make each of the 6 remaining choices.

That ought to give 192 different combinations.

0
On

You can choose the first letter in $3$ ways and any of the other letters in $2$ ways, so there can be $3*2^6=192$ good words