Dynamic Programming algorithm for Longest Common Subsequence

Posted on April 7, 2015
  1. If \(x_m = y_n\), then \(z_k = x_m = y_n\) and \(Z_{k-1}\) is a LCS of \(X_{m-1}\) and \(Y_{m-1}\).
  2. If \(x_m \neq y_n\), then \(z_k \neq x_m\) implies that \(Z\) is a LCS of \(X_{m-1}\) and \(Y_n\).
  3. If \(x_m \neq y_n\), then \(z_k \neq y_n\) implies that \(Z\) is a LCS of \(X_{m}\) and \(Y_{n-1}\)

Notes