How many bitstings of length 13 start with 010 or end with 11?
(a)
$2^{10} + 2^{11}$
(b)
None of the above.
(c)
$2^{13} - (2^{10} + 2^{11})$
(d)
$3 \cdot 2^{10} - 2^{8}$
Solution
A = Event that the bitstring starts with 010
Since the bitstring starts with 010, the first 3 digits must be 010
The remaining 10 digits can be chosen from the set {0,1}, so there are $ 2^{10} $ ways to choose the remaining digits
$ |A| = 2^{10} $
B = Event that the bitstring ends with 11
Since the bitstring ends with 11, the last 2 digits must be 11
The remaining 11 digits can be chosen from the set {0,1}, so there are $ 2^{11} $ ways to choose the remaining digits
$ |B| = 2^{11} $
$ A \cap B $ = Event that the bitstring starts with 010 and ends with 11
Since the bitstring starts with 010 and ends with 11, the first 3 digits must be 010 and the last 2 digits must be 11
The remaining 8 digits can be chosen from the set {0,1}, so there are $ 2^8 $ ways to choose the remaining digits
$ |A \cap B| = 2^8 $