How many bit strings of length ten either start with a $1$ bit or end with two bits $00$?
Total length of bit string is $10$.
Let $A$ be the set of bit strings starting with $1$.
So, first bit is fixed and remaining $9$ bits are free.
$n(A)=2^9=512$
Let $B$ be the set of bit strings ending with $00$.
So, last two bits are fixed and remaining $8$ bits are free.
$n(B)=2^8=256$
Now, strings which start with $1$ and end with $00$:
First bit is fixed as $1$ and last two bits are fixed as $00$.
Remaining $7$ bits are free.
$n(A \cap B)=2^7=128$
Therefore,
$n(A \cup B)=n(A)+n(B)-n(A \cap B)$
$=512+256-128$
$=640$
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.