Question #117125

Find a recurrence relation for the number of bit sequences of length n with an even number of 0s.

Expert's answer

Let an represent the number of bit sequences of length n with an evennumber of 0's

First case. The sequence starts with a 1, then the remaining sequence of length n-1 needs to contain an even number of 0's and there are an-1 such strings.

Second case. The sequence starts with a 0, then the remaining sequence of length n-1 needs to contain an odd number of 0's. There are 2n-1 possible bit strings of which an have an even number of 0's, thus 2n-1-an strings have an odd number of 0's.

an=an-1+2n-1-an-1=2n-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!

LATEST TUTORIALS
APPROVED BY CLIENTS