Question: Q4 15 Points String + appears as a sub-sequence in string y if we can delete some of the characters in y, and the remaining

Q4 15 Points String + appears as a sub-sequence
Q4 15 Points String + appears as a sub-sequence in string y if we can delete some of the characters in y, and the remaining characters from left to right are exactly those of c. The remaining characters do not have to be consecutive. For example, if = GRIM, y = ALGORITHM, T is a subsequence in y because it is positions 3, 5, 6 and 9 in order. Consider the following recursive algorithm which given sequences c and y, checks whether a = 1..I'm is a subsequence of y = y1..yk: RecisSubsequence (7 = $1. .Cm; y = y1.yk) 1. If m = 0 return True 2. If m > k return False 3. IF 1 = y1 then return ReclsSubsequence(12...Im; y2..yx) 4. Return ReclsSubsequence(1..Im; yz...yk) Correctness. (7 points) Prove by strong induction on n = m + & that ReclsSubsequence returns True if and only if $1..I'm is a subsequence of y1 ..yk. Enter your answer here Recurrence. (4 points) Explain why the recurrence for this algorithm is T(n)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!