Question

In: Advanced Math

find a recurrence relation for the number of bit strings of length n that contain the...

find a recurrence relation for the number of bit strings of length n that contain the string 10. What are the initial conditions? How many bit strings of length eight contain the string 10

Solutions

Expert Solution

Let be the number of such strings of length . Then and . Let and consider such a string of length . Write this string as . We need to consider the following cases:

Case I: If then must contain somewhere in it, and if contains somewhere in it, then with is a valid such string of length . Thus, number of valid length string with is .

Case II: If then is valid if and only if for some . There are such strings. Thus, number of valid length string with is .

Since these two cases are mutually exhaustive and accounts for all possibilities, we conclude that

Thus, the recurrence with initial conditions are

We find

Thus, there are such strings of length .


Related Solutions

find a recurrence relation for the number of bit strings of length n that contain two...
find a recurrence relation for the number of bit strings of length n that contain two consecutive 1s. What are the initial conditions? How many bit strings of length eight contain two consecutive 1s
Find a recurrence relation for the number of binary strings of length n which do not...
Find a recurrence relation for the number of binary strings of length n which do not contain the substring 010
a) Find the recurrence relation for the number of ways to arrange flags on an n...
a) Find the recurrence relation for the number of ways to arrange flags on an n foot flagpole with 1 foot high red flags, 2 feet high white flags and 1 foot high blue flags. b) solve the recurrence relation of part a
Find and solve a recurrence relation for the number of ways to stack n poker
Find and solve a recurrence relation for the number of ways to stack n poker chips using red, white and blue chips such that no two red chips are together. Use your solution to compute the number of ways to stack 15 poker chips.
How many bit strings of length fifteen a) Contain at least four 0s? b) Contain at...
How many bit strings of length fifteen a) Contain at least four 0s? b) Contain at most four 0s? c) Contain exactly four 0s? d) Begin with four 0s?
How many bit strings of length fifteen a) Contain at least four 0s? b) Contain at...
How many bit strings of length fifteen a) Contain at least four 0s? b) Contain at most four 0s? c)Contain exactly four 0s? d) Begin with four 0s?
How many bit strings of length 8 if i. bit strings start with the bit 1;...
How many bit strings of length 8 if i. bit strings start with the bit 1; ii. bit strings end with the two bits 00; iii. bit strings either start with the bit 1 or end with the bits 00.؟
How many bit strings of length eight contain either at least five consecutive 0s or at...
How many bit strings of length eight contain either at least five consecutive 0s or at least five consecutive 1s? Explain.
Find a system of recurrence relations for the number of n-digit quaternary sequences that contain an even number of 2’s and an odd number of 3’s.
Find a system of recurrence relations for the number of n-digit quaternary sequences that contain an even number of 2’s and an odd number of 3’s. Define the initial conditions for the system. (A quaternary digit is either a 0, 1, 2 or 3)
Recall that a 5-bit string is a bit strings of length 5, and a bit string...
Recall that a 5-bit string is a bit strings of length 5, and a bit string of weight 3, say, is one with exactly three 1’s. a. How many 5-bit strings are there? b. How many 5-bit strings have weight 0? c. How many 5-bit strings have weight 1? d. How many 5-bit strings have weight 2? e. How many 5-bit strings have weight 4? f. How many 5-bit strings have weight 5? g. How many 5-bit strings have weight...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT