The number of bit strings of length 8 that will either start with 1 or end…
2014
The number of bit strings of length 8 that will either start with 1 or end with 00 is?
- A.
32
- B.
128
- C.
160
- D.
192
Attempted by 257 students.
Show answer & explanation
Correct answer: C
To find the number of bit strings of length 8 that either start with 1 or end with 00, we use the Principle of Inclusion-Exclusion. Let A be the set of strings starting with 1, and B be the set of strings ending with 00. For A, the first bit is fixed as 1, leaving 7 bits free: |A| = 2^7 = 128. For B, the last two bits are fixed as 00, leaving 6 bits free: |B| = 2^6 = 64. The intersection A ∩ B requires the first bit to be 1 and the last two bits to be 00, leaving 5 free bits: |A ∩ B| = 2^5 = 32. The total number of strings is |A ∪ B| = |A| + |B| - |A ∩ B| = 128 + 64 - 32 = 160.
A video solution is available for this question — log in and enroll to watch it.