A new flexible algorithm for the longest common subsequence problem

  • Authors:
  • Claus Rick

  • Affiliations:
  • University of Bonn, Computer Science Department IV, Römerstr. 164, 53117 Bonn, Germany

  • Venue:
  • Nordic Journal of Computing
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

Given two sequences A = a1a2... am and B = b1b2... bn, m ≤ n, over some alphabet Σ of size s, the longest common subsequence problem is to find a sequence of greatest possible length, p, that can be obtained from both A and B by deleting zero or more (not necessarily adjacent) symbols. A new algorithm that is efficient for both short and long longest common subsequences is presented. It also improves on previous methods for longest common subsequences of intermediate length. Thus, it is more flexible and can be used for a wider range of applications than others. The algorithm is based on the well-known paradigm of computing dominant matches and was obtained by observing additional structural properties leading to a kind of dualization. The worst-case running time of the algorithm is O(ns+min{pm, p(n-p)}). Some experimental results which prove the practicability of the new method are given, too.