Longest Common Subsequence

From Rice Wiki
Revision as of 03:16, 4 March 2024 by Rice (talk | contribs) (Created page with "= Problem description = A sequence ''Z'' is a subsequence of another sequence ''X'' if all the elements in ''Z'' also appear in order in ''X''. Notably, the elements do ''not'' need to be consecutive. In the '''longest-common-subsequence problem (LCS)''', we wish to find a maximum-length common subsequence of ''X'' and ''Y''. = Approach: dynamic programming = Consider")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Problem description

A sequence Z is a subsequence of another sequence X if all the elements in Z also appear in order in X. Notably, the elements do not need to be consecutive.

In the longest-common-subsequence problem (LCS), we wish to find a maximum-length common subsequence of X and Y.

Approach: dynamic programming

Consider