Difference between revisions of "TADM2E 8.1"
From Algorithm Wiki
(Created page with "This is the regular editing dynamic programming, except that the diagonal as an extra possibility with cost = -1 when a swap is possible. M[I, j] = M[I-1, j-1] if A[I] == B[j...") |
(Undo revision 813 by Hdyldhdlgzos (talk)) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | This is the regular editing dynamic programming, except that the diagonal as an extra possibility | + | This is the regular editing dynamic programming, except that the diagonal as an extra possibility when a swap is possible. |
− | M[ | + | M[i, j] = M[i-2, j-2] + 1 ; if A[i] == B[j-1] and A[i-1] == B[j] where i,j > 1 |
Latest revision as of 15:57, 23 July 2020
This is the regular editing dynamic programming, except that the diagonal as an extra possibility when a swap is possible.
M[i, j] = M[i-2, j-2] + 1 ; if A[i] == B[j-1] and A[i-1] == B[j] where i,j > 1