This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages) (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 sequence is a subsequence of obtained after removal of elements and 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 as from 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).
Given two sequences and a sequence is said to be acommon subsequence of and if is a subsequence of both and For example, ifthen is said to be a common subsequence of and
This wouldnot be thelongest common subsequence, since only has length 3, and the common subsequence has length 4. The longest common subsequence of and is
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:
The longest common subsequence of sequences 1 and 2 is:
This can be illustrated by highlighting the 27 elements of the longest common subsequence into the initial sequences:
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:
Subsequences are used to determine how similar the two strands of DNA are, using the DNA bases:adenine,guanine,cytosine andthymine.
This article incorporates material from subsequence onPlanetMath, which is licensed under theCreative Commons Attribution/Share-Alike License.