In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. For example, the sequence is a subsequence of .
Given two sequences X and Y, a sequence G is said to be a common subsequence of X and Y, if G is a subsequence of both X and Y. For example, if
then a common subsequence of X and Y could be
This would not be the longest common subsequence, since G only has length 3, and the common subsequence has length 4. The longest common subsequence of X and Y is .
Take two strands of DNA, say:
- ORG1 = ACGGTGTCGTGCTATGCTGATGCTGACTTATATGCTA
- ORG2 = CGTTCGGCTATCGTACGTTCTATTCTATGATTTCTAA.
See also 
- Subsequential limit
- Limit superior and limit inferior
- Longest increasing subsequence problem
- Erdős–Szekeres theorem
- In computer science, string is often used as a synonym for sequence, but it is important to note that substring and subsequence are not synonyms. Substrings are consecutive 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) . Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology. USA: Cambridge University Press. p. 4. ISBN 0-521-58519-8.