Computing and Enumerating Minimal Common Supersequences Between Two Strings

Abstract

Given \(k\) strings each of length at most n, computing the shortest common supersequence of them is a well-known NP-hard problem (when \(k\) is unbounded). On the other hand, when \(k=2\), such a shortest common supersequence can be computed in \(O(n2)\) time using dynamic programming as a textbook example. In this paper, we consider the problem of computing a minimal common supersequence and enumerating all minimal common supersequences for \(k=2\) input strings. Our results are summarized as follows. A minimal common supersequence of \(k=2\) input strings can be computed in O(n) time. (The method also works when \(k\) is a constant). All minimal common supersequences between two input strings can be enumerated with a data structure of O(n2) space and an O(n) time delay, and the data structure can be constructed in O(n3) time.

0

Turn this paper into a full lesson

ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…