Q54
MCQ2 marks, −0.67A sub-sequence of a given sequence is just the given sequence with some elements (possibly none or all) left out. We are given two sequences and of lengths and , respectively with indexes of and starting from . We wish to find the length of the longest common sub-sequence (LCS) of and as , where an incomplete recursive definition for the function to compute the length of the LCS of and is given below: l(i,j) = 0, if either i = 0 or j = 0 = expr1, if i,j > 0 and X[i-1] = Y[j-1] = expr2, if i,j > 0 and X[i-1] ≠ Y[j-1] The value of could be obtained by dynamic programming based on the correct recursive definition of of the form given above, using an array , where and , such that . Which one of the following statements would be TRUE regarding the dynamic programming solution for the recursive definition of ?
Loading…