Let use the following example.
Determine how many bit strings of length 5 can be formed, where three consecutive 0s are not allowed.
The number of elements of the set of different binary strings of length 5 is "2^5=32" .
"\\begin{matrix}\n\n0& 0 & 0 & 0 & 0\\\\\n\n0& 0 & 0 & 0 & 1\\\\\n\n0& 0 &0 &1 &0 \\\\\n\n0& 0 & 0 & 1 & 1\n\n\\end{matrix}"
"\\begin{matrix}\n\n1 & 0 & 0 & 0 & 0\\\\\n\n1 & 0 & 0 & 0 & 1\n\n\\end{matrix}"
"\\begin{matrix}\n\n0 & 1 & 0 & 0 & 0\\\\\n\n1& 1 & 0 & 0 & 0\n\n\\end{matrix}"
The number of bit strings of length 5 can be formed, where three consecutive 0s are not allowed, is 32-8=24
Comments
Leave a comment