5-letter words, using only the letters x , y and z , are to be transmitted over a communication channel. Find the number of words allowed by the channel if no word in which two x ′ s appear consecutively is to be transmitted.
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 the word be of n letters and their arrangements be represented as a n
There might be two cases,
Case 1
Last letter is x
Now the second last letter may be y or z . So the number of such rearrangements= 2 a n − 2
Case 2
Last letter is y or z
Now there are no restrictions on second last letter. So the number of such rearrangements would be 2 a n − 1
a n = 2 a n − 1 + 2 a n − 2 a 5 = 2 a 4 + 2 a 3 ⇒ a 5 = 6 a 3 + 4 a 2 ⇒ a 5 = 1 6 a 2 + 1 2 a 1
Now a 2 can easily be calculated as 8 and a 1 is obviously 3 .
So a 5 = 1 6 4
Let W n denote the number of words allowed of length n . Prove that it follows the recurrence relation(yeah, another 'Fibonnaci series' problem :P): W n = 2 W n − 1 + 2 W n − 2 From here you get the characteristic equation x 2 − 2 x − 2 = 0 with roots 1 + 3 and 1 − 3 which will give you the general solution of W n = a ( 1 + 3 ) n + b ( 1 − 3 ) n Try the easier one: Bash Me Not
I think this would be better classified under Combinatorics. Your solution is pretty neat too, though.
I did the same.Also, a = 2 3 2 + 3 and b = 2 3 − 2 + 3
Problem Loading...
Note Loading...
Set Loading...
We'll look separately at the cases where we have 0 , 1 , 2 and 3 non-consecutive x 's.
(o) no x 's: then there are 2 choices for each of the 5 positions in the word, giving us 2 5 = 3 2 words;
(i) one x : start by placing the x in one of the 5 positions, then fill the remaining positions in 2 4 = 1 6 ways, giving us 5 ∗ 1 6 = 8 0 more words;
(ii) two x 's: there are 6 possible position pairs for the two x 's, namely ( 1 , 3 ) , ( 1 , 4 ) , ( 1 , 5 ) , ( 2 , 4 ) , ( 2 , 5 ) , ( 3 , 5 ) . The remaining two positions can then be filled in 2 3 = 8 possible ways, giving us 4 8 more words;
(iii) three x 's: the x 's can only go in positions 1 , 3 and 5 , with the remaining two positions being filled in 2 2 = 4 ways. This gives us 4 more words.
Thus there are 3 2 + 8 0 + 4 8 + 4 = 1 6 4 possible words.