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))).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here