Question

For problems 1-4: a set S of bitstrings is recursively defined by: - 1 is in...

For problems 1-4: a set S of bitstrings is recursively defined by:

- 1 is in S.

- if b is in S, so are 0b, 11b and 10b.

Let aₙ be the number of bitstrings in S of length n.

3. Express aₙ in terms of aₙ₋₁ and aₙ₋₂ for n ≥ 2. (Hint: you should get a homogeneous, linear, constant-coefficient recurrence relation with integer characteristic values.) Find the general solution of the recurrence. [6 pts]

4. Use the initial conditions you found in 1. to find a closed-form solution for aₙ . Verify that your a₃ is consistent with your result from part 2, i.e. count the bitstrings you obtained in part 2, and show that you get the same number from your closed-form solution. [4 pts]

Homework Answers

Answer #1

3) because for each string of length n-2, we can either append 11 or 10 (according to the recursive definition) and for each string of length n-1, we can only append 0

We also have (only string in S of length 2 is 01)

3)

So

The general solution is

Initial conditions imply and

So

Solving this, we get

So that

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
Consider below recurrence relation f_(n )=f_(n-1)+ f_(n-2) for n ≥ 3. f_(1 )=1 and f_2 =...
Consider below recurrence relation f_(n )=f_(n-1)+ f_(n-2) for n ≥ 3. f_(1 )=1 and f_2 = 3 (a) Please compute the first seven numbers in this sequence. (b) Find the closed form for this recurrence relation. Solving the characteristic equation, and solving for constants
Consider the recurrence relation T(1) = 0, T(n) = 25T(n/5) + 5n. (a) Use the Master...
Consider the recurrence relation T(1) = 0, T(n) = 25T(n/5) + 5n. (a) Use the Master Theorem to find the order of magnitude of T(n) (b) Use any of the various tools from class to find a closed-form formula for T(n), i.e. exactly solve the recurrence. (c) Verify your solution for n = 5 and n = 25.
Assume S is a recursivey defined set, defined by the following properties: 1 ∈ S n...
Assume S is a recursivey defined set, defined by the following properties: 1 ∈ S n ∈ S ---> 2n ∈ S n ∈ S ---> 7n ∈ S Use structural induction to prove that all members of S are numbers of the form 2^a7^b, with a and b being non-negative integers. Your proof must be concise. Remember to avoid the following common mistakes on structural induction proofs: -trying to force structural Induction into linear Induction. the inductive step is...
Consider the following recursive equation s(2n) = 2s(n) + 3; where n = 1, 2, 4,...
Consider the following recursive equation s(2n) = 2s(n) + 3; where n = 1, 2, 4, 8, 16, ... s(1) = 1 a. Calculate recursively s(8) b. Find an explicit formula for s(n) c. Use the formula of part b to calculate s(1), s(2), s(4), and s(8) d Use the formula of part b to prove the recurrence equation s(2n) = 2s(n) + 3
Suppose the set S is recursively defined as follows: Base step: (1, 1) ∈ S Recursive...
Suppose the set S is recursively defined as follows: Base step: (1, 1) ∈ S Recursive step: If (a, b) ∈ S, then (a + 1, b + 2a + 1) ∈ S 3(a). S is the graph of a function. What function is it? What is the function’s domain and range? Rewrite S using set-builder notation. Show your work. (You do not have to prove your answer.) 3(b). Prove that if (a, b) ∈ S, then a + b...
Consider the sequence defined recursively by an+1 = (an + 1)/2 if an is an odd...
Consider the sequence defined recursively by an+1 = (an + 1)/2 if an is an odd number an+1 = an/2 if an is an even number (a) Let a0 be equal to the last digit in your student number, and compute a1, a2, a3, a4. (b) Suppose an = 1, and find an+4. (c) If a0 = 4, does limn→∞ an exist?
10) Select the answer that is a closed form solution to this recurrence relation: an =...
10) Select the answer that is a closed form solution to this recurrence relation: an = (n + 3)an−1; a0 = 2 A) an = P(n, n − 4) B) an = n! C) an = 2n D) an = (n+3)! 3 E) an = 2n + 3
Let (a_n)∞n=1 be a sequence defined recursively by a1 = 1, a_n+1 = sqrt(3a_n) for n...
Let (a_n)∞n=1 be a sequence defined recursively by a1 = 1, a_n+1 = sqrt(3a_n) for n ≥ 1. we know that the sequence converges. Find its limit. Hint: You may make use of the property that lim n→∞ b_n = lim n→∞ b_n if a sequence (b_n)∞n=1 converges to a positive real number.  
Solve the following recurrence relation, subject to the basis. S(1) = 2 S(n) = S(n –...
Solve the following recurrence relation, subject to the basis. S(1) = 2 S(n) = S(n – 1) + 2n please explain how you solved this, thank you!
Solution.The Fibonacci numbers are defined by the recurrence relation is defined F1 = 1, F2 =...
Solution.The Fibonacci numbers are defined by the recurrence relation is defined F1 = 1, F2 = 1 and for n > 1, Fn+1 = Fn + Fn−1. So the first few Fibonacci Numbers are: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, . . . There are numerous curious properties of the Fibonacci Numbers Use the method of mathematical induction to verify a: For all integers n > 1 and m > 0 Fn−1Fm + FnFm+1...