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?
Note: This sum is from ISI entrance exam.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let x n be the total number of favourable strings of length n. Now, irrespective of the letter that comes in the second last position (from right), there are always 2 choices to fill the the last position. Hence x n = 2 x n − 1 . And we know that x 1 = 3 . Solving this recurrence equation we get x n = 3 × 2 n − 1 . Hence, substituting n=7 we get x 7 = 1 9 2 .