Saturday, February 9th, 2013
Question : Find the number of ternary sequences of length 4 where 0 is not followed by 1 and 1 is not followed by 2. (Ternary sequence of length n is a sequence having n terms and each term is either 0,1 or 2)
a. 47
b.37
c. 72
d.54
e.44
Answer :
Total ternary sequences possible = 3^4 = 81 {There are 4 positions and 3 choices for each position}
Invalid sequences:
Sequences which contain 01.
The location for 01 can be selected in 3C2 or 3 ways. {01xx, x01x, xx01}
The other two digits can be selected in 3*3 or 9 ways. {Filling up the x}
No. of invalid sequences = 3*9 = 27
Similarly, no. of invalid sequences which contain 12 = 27
Some of the invalid sequences have been counted twice. They are:
Type 1 – 0101, 1212, 0112, 1201 – There will be 4 of these
Type 2 – 012x & x120 – There will be 6 of these.
Total valid sequences = 27 + 27 – (4 + 6) = 44
Total valid sequences = 81 – 44 = 37.Thus, Option B
Use referral code HANDA to get 10% off.
Leave a Reply