In: Statistics and Probability
How many bit strings of length 8 if i. bit strings start with the bit 1; ii. bit strings end with the two bits 00; iii. bit strings either start with the bit 1 or end with the bits 00.؟
Solution:
There are 2 bits 0 and 1 through which we can make a byte of length
8
Solution(i)
We need to calculate no. of ways that length of 8 can be made which
will start with bit 1
First bit can be select = 1 way i.e. 1
The second bit can be select = 2 ways i.e. 0 or 1
The third bit can be select = 2 ways i.e. 0 or 1
The fourth bit can be select = 2 ways i.e. 0 or 1
The fifth bit can be select = 2 ways i.e. 0 or 1
The sixth bit can be select = 2 ways i.e. 0 or 1
The seventh bit can be select = 2 ways i.e. 0 or 1
An eighth bit can be select = 2 ways i.e. 0 or 1
So total number of ways length of 8 can be made = 1*2*2*2*2*2*2*2 =
128
Solution(ii)
We need to calculate bit string end with two-digit 00
First bit can be select = 2 way i.e. 0 and 1
The second bit can be select = 2 ways i.e. 0 or 1
The third bit can be select = 2 ways i.e. 0 or 1
The fourth bit can be select = 2 ways i.e. 0 or 1
The fifth bit can be select = 2 ways i.e. 0 or 1
The sixth bit can be select = 2 ways i.e. 0 or 1
The seventh bit can be select = 1 way i.e. 0
An eighth bit can be select = 1 way i.e. 0
So total number of ways length of 8 can be made = 2*2*2*2*2*2*1*1 =
64
Solution(iii)
bit either start with 1 or end with 00 which can be calculated
as
No. of the string of length 8 digits with start with 1 or end with
00 = No. of the string of length 8 digits with start with 1 + No.
of a string of length 8 digits with end with 00 - No. of the string
of length 8 digits with start with 1 and end with 00
No. of the string of length 8 digits with start with 1 and end with
00 can be calculated as
First bit can be select = 1 way i.e. 1
The second bit can be select = 2 ways i.e. 0 or 1
The third bit can be select = 2 ways i.e. 0 or 1
The fourth bit can be select = 2 ways i.e. 0 or 1
The fifth bit can be select = 2 ways i.e. 0 or 1
The sixth bit can be select = 2 ways i.e. 0 or 1
The seventh bit can be select = 1 way i.e. 0
An eighth bit can be select = 1 way i.e. 0
No. of the string of length 8 digits with start with 1 and end with
00 = 1*2*2*2*2*2*1*1 = 32
No. of the string of length 8 digits with start with 1 or end with
00 = 128 + 64 - 32 = 160