Say What?

5-letter words, using only the letters x , y x,y and z 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 x's appear consecutively is to be transmitted.


The answer is 164.

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.

3 solutions

We'll look separately at the cases where we have 0 , 1 , 2 0, 1, 2 and 3 3 non-consecutive x x 's.

(o) no x x 's: then there are 2 2 choices for each of the 5 5 positions in the word, giving us 2 5 = 32 2^{5} = 32 words;

(i) one x x : start by placing the x x in one of the 5 5 positions, then fill the remaining positions in 2 4 = 16 2^{4} = 16 ways, giving us 5 16 = 80 5*16 = 80 more words;

(ii) two x x 's: there are 6 6 possible position pairs for the two x x 's, namely ( 1 , 3 ) , ( 1 , 4 ) , ( 1 , 5 ) , ( 2 , 4 ) , ( 2 , 5 ) , ( 3 , 5 ) (1,3), (1,4), (1,5), (2,4), (2,5), (3,5) . The remaining two positions can then be filled in 2 3 = 8 2^{3} = 8 possible ways, giving us 48 48 more words;

(iii) three x x 's: the x x 's can only go in positions 1 , 3 1,3 and 5 5 , with the remaining two positions being filled in 2 2 = 4 2^{2} = 4 ways. This gives us 4 4 more words.

Thus there are 32 + 80 + 48 + 4 = 164 32 + 80 + 48 + 4 = \boxed{164} possible words.

Pranjal Jain
Dec 4, 2014

Let the word be of n letters and their arrangements be represented as a n a_{n}

There might be two cases,

Case 1 \color{#D61F06}{\text{Case 1}}

Last letter is x \color{#3D99F6}{\text{Last letter is x}}

Now the second last letter may be y or z . So the number of such rearrangements= 2 a n 2 2a_{n-2}

Case 2 \color{#D61F06}{\text{Case 2}}

Last letter is y or z \color{#3D99F6}{\text{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 2a_{n-1}

a n = 2 a n 1 + 2 a n 2 a_{n}=2a_{n-1}+2a_{n-2} a 5 = 2 a 4 + 2 a 3 a_{5}=2a_{4}+2a_{3} a 5 = 6 a 3 + 4 a 2 \Rightarrow a_{5}=6a_{3}+4a_{2} a 5 = 16 a 2 + 12 a 1 \Rightarrow a_{5}=16a_{2}+12a_{1}

Now a 2 a_{2} can easily be calculated as 8 8 and a 1 a_{1} is obviously 3 3 .

So a 5 = 164 a_{5}=\boxed{164}

Let W n W_{n} denote the number of words allowed of length n n . Prove that it follows the recurrence relation(yeah, another 'Fibonnaci series' problem :P): W n = 2 W n 1 + 2 W n 2 W_{n} = 2W_{n-1} + 2W_{n-2} From here you get the characteristic equation x 2 2 x 2 = 0 x^2-2x-2=0 with roots 1 + 3 1+\sqrt{3} and 1 3 1-\sqrt{3} which will give you the general solution of W n = a ( 1 + 3 ) n + b ( 1 3 ) n W_{n} = a(1+\sqrt{3})^n + b(1-\sqrt{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.

Jake Lai - 6 years, 6 months ago

Log in to reply

Oh, yes, I didn't notice that :O

Marc Vince Casimiro - 6 years, 6 months ago

I did the same.Also, a = 2 + 3 2 3 a=\frac{2+\sqrt{3}}{2\sqrt{3}} and b = 2 + 3 2 3 b=\frac{-2+\sqrt{3}}{2\sqrt{3}}

Souryajit Roy - 6 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...