Only 0, 1, 2, 3, 4

Probability Level pending

Using the digits 0, 1, 2, 3, 4, find the number of ten-digit sequences for which the difference between any two consecutive digits is 1.


The answer is 648.

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.

1 solution

Soumava Pal
Mar 3, 2016

Call the numbers with 0, 1, 2, 3, 4 with difference between consecutive digits 1, as good numbers.

Let A n A_n denote the number of good n-digit sequences that end in either 0 or 4; let B n B_n denote the number of good n-digit sequences that end in either 1 or 3; and let C n C_n denote the number of good n-digit sequences that end in 2. Then for non-negative integers n:

(a) A n + 1 A_{n+1} = B n B_n , because each sequence in A n + 1 A_{n+1} can be converted into a sequence in B n B_n by deleting its last digit.

(b) B n + 1 B_{n+1} = A n + 2 C n A_n+2C_n , because each sequence in A n A_n can be converted into a sequence in B n + 1 B_{n+1} by adding a 1 (if it ends with 0) or a 3 (if it ends with 4) to its end, and each sequence in C n C_n can be converted into a sequence in B n + 1 B_{n+1} by adding a 1 or a 3 to it.

(c) C n + 1 C_{n+1} = B n B_n , because each sequence in C n + 1 C_{n+1} can be converted into a sequence in B n B_n by deleting the 2 at its end.

Hence B n + 1 B_{n+1} = 3 B n 1 3B_{n-1} for n>1. It is easy to see that B 1 B_1 = 2 and B 2 B_2 = 4. Hence B 2 n + 1 B_{2n+1} = 2. 3 n 2.3^n and B 2 n B_{2n} = 4. 3 n 1 4.3^{n-1} .

It follows that there are A 1 0 + B 1 0 + C 1 0 = 2 B 9 + B 1 0 = 4. 3 4 + 4. 3 4 = 648 A_10+B_10+C_10 = 2B_9 + B_10 = 4.3^4+4.3^4 = 648 good ten-digit sequences. .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...