An Information-Theoretic Lower Bound for the Longest Common Subsequence Problem

Aigxithm , comparison The longest common subsequence (LCS) problem is the problem of determining a sequence C of maximum length that is a subsequence of (can be obtained by deleting zero or more symbols from) each of two given strings A and B [ I]. The best algorithms known for the IAS problem are, in the worst case, only s@htly faster than qua-dratic in the length of the input [3,5] although, for some special cases, there are algorithms known that require only O(n log n) time [3,4]. Lower bounds on the complexity of the LCS problem have been determined for algorithms that are restricted to making " equal,-unequal " comparisons of posit;ons in the two strings. A " comparison of two positions " means a comparison of the valuec ;f the symbols Ilocated at those positions. It 'has been shown [ 1 ] that 0(rt2) such comparisons are required to solve the LCS problem for unrestricted alphabet size and O(M) such comparisons are required for alphabet size restricted to s. We shall prove that n log II is a lower bound on the nunber of " less thanequal-greater than " comparisons requi't. d to solve the LCS problem, assuming unrestrictzc: alphabet size., Let Y'(n) be the minimum number of comparisons (resulti 'rg in " less than " , " greater than " , of " equal ") requf::.l %J solve the LCS problem with two input strings of length n. WC &J use a decision tree model (see [ 11) alld shall demonst:ate a lower bound on T(n) by exhibit-*. 40 ing a path of sufficient length in each possible deci-:ion tree. A basic configuration is an assignment of values to strings A and B such that there are no vahes common to strings A and B. Thus a basic configuration has an I CS $'length 0. A wlid configuration (for a particular sequence of comparisons) is an assignment of values to positions that is consistent with the results of all comparisons. We now define an " oracle " or decision rule by which a r ath, P,, is distinguished in each decision tree for the LCS problem. Let fi!) be the prefix of length i of?,, (starting at the root of the decision tree). Incision rule. Let the comparison p 1 : p2 be the ith on P,. If p1 and p2 are both positions in A (say, a,, …