Optimal Substructure Theorem
Let
and
be sequences, and let
be any LCS of
X
and
Y
.
1. If
, then
and
is an LCS of
and
.
2. If
, then
implies that
Z
is an LCS of
and
Y
.
3. If
, then
implies that
Z
is an LCS of
X
and
.
Next:
Recursive Formula
Up:
LONGEST COMMON SUBSEQUENCE
Previous:
Algorithmic Ideas