Jump to content

Shortest common supersequence

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by CSSHug (talk | contribs) at 05:41, 2 June 2017. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer science, the shortest common supersequence of two sequences X and Y is the shortest sequence which has X and Y as subsequences. This is a problem closely related to the longest common subsequence problem. Given two sequences X = < x1,...,xm > and Y = < y1,...,yn >, a sequence U = < u1,...,uk > is a common supersequence of X and Y if items can be removed from U to produce X or Y.

A shortest common supersequence (SCS) is a common supersequence of minimal length. In the shortest common supersequence problem, the two sequences X and Y are given and the task is to find a shortest possible common supersequence of these sequences. In general, an SCS is not unique.

For two input sequences, an SCS can be formed from a longest common subsequence (LCS) easily. For example, if X and Y, the lcs is Z. By inserting the non-lcs symbols while preserving the symbol order, we get the SCS: U.

It is quite clear that for two input sequences. However, for three or more input sequences this does not hold. Note also, that the lcs and the SCS problems are not dual problems.

For the more general problem of finding a string, S which is a supersequence of a set of strings S1,S2,...,Sl, the problem is NP-Complete .[1] Also, good approximations can be found for the average case but not for the worst case.[2][3]

References

  1. ^ Kari-Jouko Räihä, Esko Ukkonen (1981). "The shortest common supersequence problem over binary alphabet is NP-complete". Theoretical Computer Science. 16 (2): 187–198. doi:10.1016/0304-3975(81)90075-x.
  2. ^ Tao Jiang and Ming Li (1994). "On the Approximation of Shortest Common Supersequences and Longest Common Subsequences". SIAM Journal on Computing. 24 (5): 1122–1139. doi:10.1137/s009753979223842x.
  3. ^ Marek Karpinski and Richard Schmied (2013). "On Improved Inapproximability Results for the Shortest Superstring and Related Problems". Proceedings of 19th CATS CRPIT. 141: 27–36.