Consider the LCS problem discussed in class. Suppose we only want to compute the length of the LCS of x[1..m] and y[1..n] (i.e. we do not care about the actual subsequence itself). This means we do...




  1. Consider the LCS problem discussed in class. Suppose we only want to compute the length of the LCS of x[1..m] and y[1..n] (i.e. we do not care about the actual subsequence itself). This means we do not need to “traceback” to find the LCS. In this setting, show how the algorithm can be altered so that it only needs min(m,n) + O(1) space rather than m · n space (note that it must be min(m,n) and not O(min(m, n))).





Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here