Question

Consider strings that contain only the characters A, B, C, D and E. 1- Find a...

Consider strings that contain only the characters A, B, C, D and E.

1- Find a recurrence relation for the number of such strings that contain three consecutive Bs.

2- What are the initial conditions?

Homework Answers

Answer #1

Let T(n) denotes number of strings that contain 3 consecutive B's.

If a n bit string starts with a,c,d,e then,problem dissolves to finding T(n-1)

similarly if n bit string starts with ba,bc,bd,be then, problem dissolves to finding T(n-2).

if n bit string starts with  bba,bbc,bbd,bbe then, problem dissolves to finding T(n-3).

if n bit string starts with bbb,then each of remaining n-3 bits can have 5 choices(a,b,c,d,e).there fore,number of such strings=

on total recurrence equation is

where n>=3

base conditions are

T(0)=0

T(1)=0

T(2)=0

T(3)=1

T(4)=9

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
A) Find a recurrence relation for the number of bit strings of length ? ≥ 1...
A) Find a recurrence relation for the number of bit strings of length ? ≥ 1 that do not contain four consecutive zeros. What are the initial conditions?
(a) Find a recurrence relation for the number of bit strings of length n that contain...
(a) Find a recurrence relation for the number of bit strings of length n that contain the substring 10. (b) What are the initial conditions? (c) How many bit strings of length seven (i.e. a7) contain the substring 10?
3))Find a recurrence relation for the number of ternary strings of length ? ≥ 1 that...
3))Find a recurrence relation for the number of ternary strings of length ? ≥ 1 that contain at least two 0s. What are the initial conditions?
1. Consider passcodes that can only contain any letters A, B, C, D, and E and...
1. Consider passcodes that can only contain any letters A, B, C, D, and E and numbers 0, 1, 2, 3, 4. A passcode contains 5 items, and repitition is allowed (a) [1 point] How many passcodes exist where items can be repeated? (b) [1 point] How many passcodes exit where items cannot be repeated? (c) [2 points] How many passcodes contain at least a 5 or an A?
How many permutations of the set {A, B, C, D, E, F, G, H} a) Contain...
How many permutations of the set {A, B, C, D, E, F, G, H} a) Contain the string DEF? b) Contain the strings ABE and EFG? c)Have D next to C? d) Contain the strings DCB and BAD?
The C-string cityName[30] can contain ________. A) thirty characters B) thirty one characters C) twenty nine...
The C-string cityName[30] can contain ________. A) thirty characters B) thirty one characters C) twenty nine characters and the null terminator D) thirty characters and the null terminator E) None of the above
Let letters A,B,C,D,E,F,G be used to form strings of length 4. How many strings of length...
Let letters A,B,C,D,E,F,G be used to form strings of length 4. How many strings of length 4 with repetitions contain A and B. How about without repetitions?
(a) How many 12-bit strings contain exactly five 1's? (b) How many 12-bit strings contain at...
(a) How many 12-bit strings contain exactly five 1's? (b) How many 12-bit strings contain at least nine 1's? .(c) How many 12-bit strings contain at least one 1? (d) How many 12-bit strings contain at most one 1?
Let an, for n≥1, be the number of strings of length n over {0,1,2,3}, allowing repetitions,...
Let an, for n≥1, be the number of strings of length n over {0,1,2,3}, allowing repetitions, suchthat no string contains a 3 to the right of a 0. Find a recurrence relation and initial condition(s) for an.
Huffman Codes: You are give a text file containing only the characters {a,b,c,d,e,f}. Let F(x) denote...
Huffman Codes: You are give a text file containing only the characters {a,b,c,d,e,f}. Let F(x) denote the frequency of a character x. Suppose that: F(a) = 13, F(b) = 4, F(c) = 6, F(d) = 17, F(e) = 2, and F(f) = 11. Give a Huffman code for the above set of frequencies, i.e. specify the binary encoding for each of the six characters.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT