Each of the 10 digits can generated for the first position.
Each of the 10 digits can be generated for the second
position.
Each of the 10 digits can be generated for the third
position.
Each of the 10 digits can be generated for the fourth
position.
Each of the 10 digits can be generated for the fifth
position.
So number of possible 5 digit bit string that can be randomly
generated = 1010101010
= 100000
The string can contain 3 consecutive zeroes in the following
ways :-
- If there are 3 consecutive zeroes in the first 3 positions,
then the fourth position will not have zero and the fifth position
will have any of the 10 digits. So only 0 is generated for the
first, second, and third position; any of the 9 digits (excluding
0) can be generated for the fourth position; and any of the 10
digits can be generated for the fifth position. Number of such 5
digit bit string that can be randomly generated = 111910
= 90
- If there are 3 consecutive zeroes in the middle 3 positions,
then the first and the fifth position will not have zero.. So only
0 is generated for the second, third and fourth position; any of
the 9 digits (excluding 0) can be generated for the first and the
fifth position. Number of such 5 digit bit string that can be
randomly generated = 91119
= 81
- If there are 3 consecutive zeroes in the last 3 positions, then
the second position will not have zero and the first position will
have any of the 10 digits. So only 0 is generated for the third,
fourth, and fifth position; any of the 9 digits (excluding 0) can
be generated for the second position; and any of the 10 digits can
be generated for the first position. Number of such 5 digit bit
string that can be randomly generated = 109111
= 90
So possibility of string containing three consecutive zeroes
= (90+81+90)/100000 = 0.00261
The string can contain 3 consecutive zeroes and 1 as the first
number in the following ways :-
- If 1 is the first number and there are 3 consecutive zeroes in
the middle 3 positions, then fifth position will not have zero.. So
only 1 is generated for the first position and only 0 is generated
for the second, third and fourth position; any of the 9 digits
(excluding 0) can be generated for the fifth position. Number of
such 5 digit bit string that can be randomly generated = 11119
= 9
- If 1 is the first number and there are 3 consecutive zeroes in
the last 3 positions, then the second position will not have zero.
So only 1 is generated for the first position and only 0 is
generated for the third, fourth, and fifth position; any of the 9
digits (excluding 0) can be generated for the second position.
Number of such 5 digit bit string that can be randomly generated =
19111
= 9
So possibility of string containing three consecutive zeroes and
1 as the first number
= (9+9)/100000 = 0.00018
If 1 is the first number; then each of the second, third, fourth
and fifth position can contain any of the 10 digits. So only 1 is
generated for the first position and any of the 10 digits can be
generated for each of the second, third, fourth and fifth position.
Number of such 5 digit bit string that can be randomly generated =
110101010
= 10000
So possibility of string where the first number is one
= 10000/100000 = 0.1
So conditional probability of it containing three consecutive
zeroes where first number is a one
= 0.00018/0.1 = 0.0018