Summary: preprint Inf. Proc. Lett. V23 Dec 1986 p305310
A BitString LongestCommonSubsequence Algorithm
L. Allison, T.I. Dix,
Department of Computer Science,
University of Western Australia,
Western Australia 6009.
uucp: lloyd@wacsvax.OZ, trevor@wacsvax.OZ
Abstract: A longestcommonsubsequence algorithm is described which operates in terms of bit or bit
string operations. It offers a speedup of the order of the wordlength on a conventional computer.
Keywords: longest common subsequence, edit distance, bit string
The longestcommonsubsequence (LCS) problem is to find the maximum possible length of a
common subsequence of two strings, 'a' of length |a| and 'b' of length |b|. Usually an actual LCS is also
required. For example, using the alphabet A, C, G and T of genetic bases, an LCS of 'GCTAT' and
'CGATTA' is 'GTT' of length three.
Here an algorithm which requires O(|a|×|b|) operations on single bits or O(é|a|/wù×|b|) operations on
wbit computer words or O(|b|) operations on |a|bit bitstrings, for a fixed finite alphabet, is presented.
Although falling into the same complexity class as simple LCS algorithms, if w is greater than any
additional multiplicative cost, this algorithm will be faster. If |a|£w the algorithm is effectively linear in |b|.