Jump to content

Shortest common supersequence

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Nkojuharov (talk | contribs) at 04:18, 18 September 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

This shortest common supersequence problem is closely related to the lcs (longest-common subsequence problem. Again, assume that two sequences X = < x1,...,xm > and Y = < y1,...,yn > are given.

   A sequence U = < u1,...,uk > is a common supersequence of X and Y if U is a supersequence of both X and Y. 

The 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, the scs is not unique.

For two input sequences, a scs can be formed from a 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 csc problems are not dual problems.