Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Subsequence
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Common subsequence == Given two sequences <math>X</math> and <math>Y,</math> a sequence <math>Z</math> is said to be a ''common subsequence'' of <math>X</math> and <math>Y,</math> if <math>Z</math> is a subsequence of both <math>X</math> and <math>Y.</math> For example, if <math display=block>X = \langle A,C,B,D,E,G,C,E,D,B,G \rangle \qquad \text{ and}</math> <math display=block>Y = \langle B,E,G,J,C,F,E,K,B \rangle \qquad \text{ and}</math> <math display=block>Z = \langle B,E,E \rangle.</math> then <math>Z</math> is said to be a common subsequence of <math>X</math> and <math>Y.</math> This would {{em|not}} be the ''[[Longest-common subsequence problem|longest common subsequence]]'', since <math>Z</math> only has length 3, and the common subsequence <math>\langle B,E,E,B \rangle</math> has length 4. The longest common subsequence of <math>X</math> and <math>Y</math> is <math>\langle B,E,G,C,E,B \rangle.</math>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)