Find the number of binary strings of length n which contain the substring " 10 ". Do the following, 2+2+8+2=14 (a) Find a recurrence relation a_(n) whose n-th term denotes the number of strings of length n as described above. (b) Find the initial conditions of the relation. (c) Find the closed form of a_(n) using a generating function. (d) Verify your answer by computing it for n=4. 2. Find the number of binary strings of length n which contain the substring "10". Do the following [2+2+8+2=14] a Find a recurrence relation an whose n-th term denotes the number of strings of length n as described above. (b) Find the initial conditions of the relation. (c) Find the closed form of an using a generating function. (d) Verify your answer by computing it for n = 4.
Added by Ian C.
Close
Step 1
Step 2: (a) Recurrence relation: To find a recurrence relation for a_n, we can consider the last two digits of the binary string of length n. There are two cases to consider: Show more…
Show all steps
Your feedback will help us improve your experience
Sri K and 83 other Calculus 3 educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Find a recurrence relation for the number of bit strings (strings of 0's and 1's) of length n that do not contain two consecutive 0s. How many strings of this kind of length 5 are there? Find a recurrence relation for the number of bit strings (strings of 0's and 1's) of length n that do contain two consecutive 0s. How many strings of this kind of length 5 are there?
Sri K.
(a) Find a recurrence relation for the number of bit strings of length n that contain a pair of consecutive 0s. (i) Step 1: Write down a function of n. an = (ii) Step 2: Find the relationship of an with an-1 and an-2 (and an-3 ...). (Use the relationship of the problem with sub-problems). (iii) Step 3: Write down the equation in (ii). (b) What are the initial conditions? (i) What is a0 (or a1) – for the recurrence relation of degree 1? a0 & a1 (or a1 & a2) – for degree 2?... a1 = a2 = (c) How many bit strings of length seven contain two consecutive 0s? (i) Solve the equation by substitution or formula starting from a2 to a7. a2 = a3 = a4 = a5 = a6 = a7 =
Supreeta N.
A string that contains only 0s, 1s, and 2s is called a ternary string. a) Find a recurrence relation for the number of ternary strings of length n that do not contain any of the strings 10 and 20. Show how you obtain the recurrence. b) What is/are the initial condition(s)? c) How many ternary strings of length six do not contain any of the strings 10 and 20?
Apratim D.
Recommended Textbooks
Calculus: Early Transcendentals
Thomas Calculus
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD