Answer to Question #117126 in Combinatorics | Number Theory for Priya

Question #117126
How many bit sequences of length seven contain an even number of 0s?
1
Expert's answer
2020-06-01T19:06:59-0400

Let "a_n" denote the number of bit sequences of length n with an even number of 0's. There are two ways to form a valid string with n bits from a string with one fewer bit. First, a valid string of n digits can be obtained by appending a valid string of n – 1 bits with 1. Hence, a valid string with n bits can be formed in this manner in "a_{n-1}" ways. Second, a valid string of n bits can be obtained by appending a 0 to a string length n – 1 that is not valid. The number of ways that this can be done equals the number of invalid (n – 1)-bit strings. Since there are 2n-1 strings of length n – 1, and "a_{n-1}"  are valid, there are "2^{n-1} - a_{n-1}"  valid n-bit strings obtained by appending an invalid string of length n – 1 with a 0. Therefore

"a_n = a_{n-1} + (2^{n-1} \u2013 a_{n-1}) = 2^{n-1}" for "n\\geq2" .

Hence, Recurrence relation is

"a_1=1 \\\\\na_n = 2 a_{n-1}"


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS