Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Subsequence

From Wikipedia, the free encyclopedia
Mathematical binary relation
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(November 2018) (Learn how and when to remove this message)
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Subsequence" – news ·newspapers ·books ·scholar ·JSTOR
(November 2018) (Learn how and when to remove this message)
(Learn how and when to remove this message)

Inmathematics, asubsequence of a givensequence is a sequence that can be derived from the given sequence by deleting some or no elements without changing the order of the remaining elements. For example, the sequenceA,B,D{\displaystyle \langle A,B,D\rangle } is a subsequence ofA,B,C,D,E,F{\displaystyle \langle A,B,C,D,E,F\rangle } obtained after removal of elementsC,{\displaystyle C,}E,{\displaystyle E,} andF.{\displaystyle F.} The relation of one sequence being the subsequence of another is apartial order.

Subsequences can contain consecutive elements which were not consecutive in the original sequence. A subsequence which consists of a consecutive run of elements from the original sequence, such asB,C,D,{\displaystyle \langle B,C,D\rangle ,} fromA,B,C,D,E,F,{\displaystyle \langle A,B,C,D,E,F\rangle ,} is asubstring. The substring is a refinement of the subsequence.

The list of all subsequences for the word "apple" would be "a", "ap", "al", "ae", "app", "apl", "ape", "ale", "appl", "appe", "aple", "apple", "p", "pp", "pl", "pe", "ppl", "ppe", "ple", "pple", "l", "le", "e", "" (empty string).

Common subsequence

[edit]

Given two sequencesX{\displaystyle X} andY,{\displaystyle Y,} a sequenceZ{\displaystyle Z} is said to be acommon subsequence ofX{\displaystyle X} andY,{\displaystyle Y,} ifZ{\displaystyle Z} is a subsequence of bothX{\displaystyle X} andY.{\displaystyle Y.} For example, ifX=A,C,B,D,E,G,C,E,D,B,G and{\displaystyle X=\langle A,C,B,D,E,G,C,E,D,B,G\rangle \qquad {\text{ and}}}Y=B,E,G,J,C,F,E,K,B and{\displaystyle Y=\langle B,E,G,J,C,F,E,K,B\rangle \qquad {\text{ and}}}Z=B,E,E.{\displaystyle Z=\langle B,E,E\rangle .}thenZ{\displaystyle Z} is said to be a common subsequence ofX{\displaystyle X} andY.{\displaystyle Y.}

This wouldnot be thelongest common subsequence, sinceZ{\displaystyle Z} only has length 3, and the common subsequenceB,E,E,B{\displaystyle \langle B,E,E,B\rangle } has length 4. The longest common subsequence ofX{\displaystyle X} andY{\displaystyle Y} isB,E,G,C,E,B.{\displaystyle \langle B,E,G,C,E,B\rangle .}

Applications

[edit]

Subsequences have applications tocomputer science,[1] especially in the discipline ofbioinformatics, where computers are used to compare, analyze, and storeDNA,RNA, andprotein sequences.

Take two sequences of DNA containing 37 elements, say:

SEQ1 = ACGGTGTCGTGCTATGCTGATGCTGACTTATATGCTA
SEQ2 = CGTTCGGCTATCGTACGTTCTATTCTATGATTTCTAA

The longest common subsequence of sequences 1 and 2 is:

LCS(SEQ1,SEQ2) =CGTTCGGCTATGCTTCTACTTATTCTA

This can be illustrated by highlighting the 27 elements of the longest common subsequence into the initial sequences:

SEQ1 = ACGGTGTCGTGCTATGCTGATGCTGACTTATATGCTA
SEQ2 =CGTTCGGCTATCGTACGTTCTATTCTATGATTTCTAA

Another way to show this is toalign the two sequences, that is, to position elements of the longest common subsequence in a same column (indicated by the vertical bar) and to introduce a special character (here, a dash) for padding of arisen empty subsequences:

SEQ1 = ACGGTGTCGTGCTAT-G--C-TGATGCTGA--CT-T-ATATG-CTA-
        | || ||| ||||| |  | |  | || |  || | || |  |||
SEQ2 = -C-GT-TCG-GCTATCGTACGT--T-CT-ATTCTATGAT-T-TCTAA

Subsequences are used to determine how similar the two strands of DNA are, using the DNA bases:adenine,guanine,cytosine andthymine.

Theorems

[edit]

See also

[edit]

Notes

[edit]
  1. ^In computer science,string is often used as a synonym forsequence, but it is important to note thatsubstring andsubsequence are not synonyms. Substrings areconsecutive parts of a string, while subsequences need not be. This means that a substring of a string is always a subsequence of the string, but a subsequence of a string is not always a substring of the string, see:Gusfield, Dan (1999) [1997].Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology. USA: Cambridge University Press. p. 4.ISBN 0-521-58519-8.

This article incorporates material from subsequence onPlanetMath, which is licensed under theCreative Commons Attribution/Share-Alike License.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Subsequence&oldid=1298249160"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp