Using the digits 0,1,2,3,4 find the number of 10 digit sequences that can be formed with the difference between any two consecutive digits equal to 1. CLARIFICATION:A sequence may start with 0.Look i said sequence not numbers.... Hope u will enjoy solving the problem :)
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.
Indeed, we can show that P ( 2 n + 1 ) Q ( 2 n + 1 ) = = 2 × 3 n − 1 3 n P ( 2 n ) Q ( 2 n ) = = 3 n − 1 2 × 3 n − 1 and so the total number of sequence of length n is X ( n ) = 2 P ( n ) + 2 Q ( n ) + 2 Q ( n − 1 ) , and hence X ( 2 n + 1 ) = 1 4 × 3 n − 1 X ( 2 n ) = 8 × 3 n − 1 for any integer n ≥ 1 . Thus X ( 1 0 ) = 8 × 3 4 = 6 4 8 .
Problem Loading...
Note Loading...
Set Loading...
See if u replace x by (4-x) then u get a valid sequence. So let the no. of numbers of length n starting with 0 and 1 be P(n) & Q(n) respectively . So the no. of digits starting with 4 is P(n) and 3 is Q(n) too right??(1st Logic!!).Now a no. beginning with 2 has 1 or 3 as the next neighbour and so no. of such sequences(obviously of length n) is 2Q(n-1).Ok now a no. starting with 0 must have 1 and a no with 4 must have a no. 3 next....So we can claim P(n)=Q(n-1) right?? Ok now total number of such sequences is X(n)= P(n)+Q(n)+(2Q(n-1))+P(n)+Q(n)...(Each no. begins with 0/1/2/3/4...hence their sum).Ok using previous results X(n)=2P(n)+2Q(n-1)+2Q(n)=2Q(n)+4Q(n-1).Ok Look!! Q(n)=n length no. starting with 1=(n-1) lenth no. starting with 0 or 2=2Q(n-2)+P(n)=3Q(n-1)...Ok now it is mostly done....X(n)=2Q(n)+4Q(n-1)=2.3Q(n-2)+4.3Q(n-3)=......Go on reducing...Q(2)=2(10&12)&Q(1)=1....Finally u arrive Q(10)=2X3X3X3X3XQ(2)+4X3X3X3X3XQ(1)=648. ANS :)