Metraipolis › archive › dc_b20bd67d43f3
Shortest common supersequence — Wikipedia (en)
- Source
- Wikipedia (en)
- Original
- https://en.wikipedia.org/wiki/Shortest_common_supersequence
- License (as archived)
- CC-BY-SA-4.0
- Archived
- 2026-10-07T17:23:15.880Z
- SHA-256 of the archived text
5f9f9e7c574db4646a1c6d03b98fc26ac23b7d2d6a07243f6c09019b637421ad- Stable URL of this page
https://metraipolis.com/documento/dc_b20bd67d43f3
How to cite
Shortest common supersequence — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Shortest_common_supersequence (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_b20bd67d43f3 (Metraipolis archive dc_b20bd67d43f3, sha256 5f9f9e7c574db4646a1c6d03b98fc26ac23b7d2d6a07243f6c09019b637421ad)
BibTeX
@misc{dcb20bd67d43f3,
title = {Shortest common supersequence — Wikipedia (en)},
howpublished = {Wikipedia (en)},
url = {https://en.wikipedia.org/wiki/Shortest_common_supersequence},
note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_b20bd67d43f3; sha256 5f9f9e7c574db4646a1c6d03b98fc26ac23b7d2d6a07243f6c09019b637421ad},
year = {2026}
}Archived text
Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Shortest_common_supersequence. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
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 and Y. A shortest common supersequence (SCS) is a common supersequence of minimal length. In the SCS problem, 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, the longest common subsequence of X [ 1.. m ] = a b c b d a b {\displaystyle [1..m]=abcbdab} and Y [ 1.. n ] = b d c a b a {\displaystyle [1..n]=bdcaba} is Z [ 1.. L ] = b c b a {\displaystyle [1..L]=bcba} . By inserting the non-LCS symbols into Z while preserving their original order, we obtain a shortest common supersequence U [ 1.. S ] = a b d c a b d a b {\displaystyle [1..S]=abdcabdab} . In particular, the equation L + S = m + n {\displaystyle L+S=m+n} holds for any two input sequences. There is no similar relationship between shortest common supersequences and longest common subsequences of three or more input sequences. (In particular, LCS and SCS are not dual problems.) However, both problems can be solved in O ( n k ) {\displaystyle O(n^{k})} time using dynamic programming, where k {\displaystyle k} is the number of sequences, and n {\displaystyle n} is their maximum length. For the general case of an arbitrary number of input sequences, the problem is NP-hard.
Tema degli esploratori: matematica e informatica teorica (deposito sistematico; categoria «Combinatorics»).
Fonte: Wikipedia in inglese, voce «Shortest common supersequence» — https://en.wikipedia.org/wiki/Shortest_common_supersequence
Wikidata Q11789272 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q11789272
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Shortest_common_supersequence?action=history).
Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza.
Estratto dell'introduzione non modificato nel contenuto; revisione 1354945969, consultata il 2026-10-07T16:54:30.490Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: 6cc170afb7792e294b469b1cb149b941f091da1cc3020e0b8a8e973bc811a21e