Question
Question: A binary sequence is an array of 0’s and 1’s. The number of n-digit binary sequences which contain e...
A binary sequence is an array of 0’s and 1’s. The number of n-digit binary sequences which contain even number 0’s is:
A. 2n−1
B. 2n
C. 2n−1−1
D. 2n+1
Solution
The binomial theorem formulas or the binomial identity are used here in order to solve the given problem. In the given binary sequence of 0’s and 1’s we have to find out the number of n- digit binary sequences which should contain an even number of 0’s.
Complete step-by-step solution:
Here the used binomial identity is:
⇒(1+x)n=ncox0+nc1x1+nc2x2+⋅⋅⋅+ncn−1xn−1+ncnxn
Here in the problem, we have to find out the number of n-digit binary sequences which contain even number of 0’s, which is given by:
The required number of ways to get the even no. of zeroes i.e, 0,2,4,...., which is given by:
Required no. of ways =nc0+nc2+nc4+⋅⋅⋅⋅
To calculate nc0+nc2+nc4+⋅⋅⋅⋅, we have to find out from the binomial identity (1+x)ngiven below:
⇒(1+x)n=ncox0+nc1x1+nc2x2+⋅⋅⋅+ncn−1xn−1+ncnxn
Substitute x=1 in the above binomial identity, which gives:
⇒(1+1)n=nco10+nc111+nc212+⋅⋅⋅+ncn−11n−1+ncn1n
⇒(2)n=nco+nc1+nc2+⋅⋅⋅+ncn−1+ncn
Re-writing the terms and on further simplifying:
∴nco+nc1+nc2+⋅⋅⋅⋅⋅=2n
Now substitute x=−1in the binomial identity, which gives:
\Rightarrow {\left( {1 - 1} \right)^n} = {}^n{c_o}{( - 1)^0} + {}^n{c_1}{( - 1)^1} + {}^n{c_2}{( - 1)^2} + \cdot \cdot \cdot + {}^n{c_{n - 1}}{( - 1)^{n - 1}} + {}^n{c_n}{( - 1)^n}$$$$ \Rightarrow {\left( 0 \right)^n} = {}^n{c_o} - {}^n{c_1} + {}^n{c_2} + \cdot \cdot \cdot + {}^n{c_{n - 1}}{( - 1)^{n - 1}} + {}^n{c_n}{( - 1)^n}
Re-writing the terms which gives:
∴nco−nc1+nc2−nc3⋅⋅⋅⋅⋅=0
Adding the equations :
nco+nc1+nc2+⋅⋅⋅⋅⋅=2n and nco−nc1+nc2−nc3⋅⋅⋅⋅⋅=0, which gives:
nco+nc1+nc2+nc3⋅⋅⋅⋅=2n
nco−nc1+nc2−nc3⋅⋅⋅⋅⋅=0
2nco+0+2nc2+0⋅⋅⋅⋅⋅=2n+0
Now the addition of the two equations gives:
⇒2nc0+2nc2+2nc4+⋅⋅⋅⋅⋅⋅=2n
⇒2[nc0+nc2+nc4+⋅⋅⋅⋅⋅⋅]=2n
⇒[nc0+nc2+nc4+⋅⋅⋅⋅⋅⋅]=22n
⇒[nc0+nc2+nc4+⋅⋅⋅⋅⋅⋅]=2n−1
∴nc0+nc2+nc4+⋅⋅⋅⋅⋅⋅=2n−1
The number of n-digit binary sequences which contain even number 0’s is 2n−1.
Note: Here in this problem was asked to find the even no. of zeroes i.e, 0,2,4,...., which is given by, nc0+nc2+nc4+⋅⋅⋅⋅, if asked to find the odd no. of zeros then \left\\{ {1,3,5,.....} \right\\} which is given by nc1+nc3+nc5+⋅⋅⋅⋅, which can be obtained by subtracting the equations this time.