0, 1 Repel

Level pending

Find the number of 7-digit ternary strings that do not have any 0's next to any 1's. 00200211 and 00211200 are 2 strings to be counted, while 00200120 is a string not to be counted.

(A ternary string is a string consisting of only 0's, 1's, and 2's.)


The answer is 577.

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

Daniel Wang
Jan 19, 2014

Let x y x_y represent the number of y-digit ternary strings that ends with x x . We find these recursive equations: 0 n + 1 = 0 n + 2 n , 0_{n+1}=0_n+2_n, 1 n + 1 = 1 n + 2 n , 1_{n+1}=1_n+2_n, 2 n + 1 = 0 n + 1 n + 2 n . 2_{n+1}=0_n+1_n+2_n.

We know that 0 1 = 1 1 = 2 1 = 1 0_1=1_1=2_1=1 , and we can find the answer: 0 7 + 1 7 + 2 7 = 169 + 169 + 169 = 577 . 0_7+1_7+2_7=169+169+169=\boxed{577}.

I couldn't understand. (Little dull at math!) Can you explain me more easily.

Partho Kunda - 7 years, 4 months ago

oops 169+169+239

Daniel Wang - 7 years, 4 months ago

The recurrsion principle..

Vishal Sharma - 7 years, 2 months ago

I'm clueless !

Sukanta Kalai - 7 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...