edited by
486 views

1 Answer

1 votes
1 votes

First count number of $3$ consecutive "0" in $10$ bit binary string.$000$ can start at position $1,2,3,4,5,6,7,8$

$\begin{vmatrix} 0 &0 &0 &X &X &X &X &X &X &X \\ 1&0 &0 &0 &X &X &X &X &X &X \\ X&1 &0 &0 &0 &X &X &X &X &X \\ X& X &1 &0 &0 &0 &X &X &X &X \\ X& X &X &1 &0 &0 &0 &X &X &X \\ X& X &X &X &1 &0 &0 &0 &X &X \\ X&X &X &X &X &1 &0 &0 &0 &X \\ X& X &X &X &X &X &1 &0 &0 &0 \end{vmatrix}$

Now,Total combination=$2^{7}+6*2^{6}=512$

But,we have counted many string twice,so we need to subtract from the final combination

How to find the repeated String?

Let we have stored the possible string in array$ar\left [ i \right ]\left [ j \right ],1\leq i\leq 8  , 1\leq j\leq 10$

for $ar\left [ 1 \right ]\left [ X \right ]$,no strings are repeated  with any of $ar\left [ X \right ]\left [ X \right ]$

(take a string from a row and compare to other row )

for $ar\left [ 2 \right ]\left [ X \right ]$ try to match with $ar\left [ 6 \right ]\left [ X \right ]$,$ar\left [ 7 \right ]\left [ X \right ]$,$ar\left [ 8 \right ]\left [ X \right ]$

The matched string will be  $\Rightarrow 10001000XX$(4 possible string),$1000X1000X$(4 possible string) ,$1000XX1000$

Do same for $ar\left [ 3 \right ]\left [ X \right ]$,repeated strings are $X10001000X$(4 possible String),$X1000X1000$( 4 possible string)

and the last for $ar\left [ 4 \right ]\left [ X \right ]$,$XX10001000$(4 possible string)

So Total number of 3 consecutive string =512-(4*6)=488

Do exactly same for 3 consecutive 1

Number of 10 bit binary string where the string contains 3 consecutive 0's or 3 consecutive 1's =488+488=976

Answer=966

edited by

Related questions

0 votes
0 votes
1 answer
1
UK asked Jan 28, 2016
944 views
Number of solutions are there of x+y+z=17 in positive integers are_________Here in this do we have to take constraints of x>=1,y>=1,z>=1?
1 votes
1 votes
3 answers
2
0 votes
0 votes
3 answers
3
snaily16 asked Jan 22, 2019
1,469 views
The number of ways 5 letter be put in 3 letter boxes A,B,C. If letter box A must contain at least 2 letters.