Learn Before
Concept
Explanation for Minimum Edit Distance Algorithm
To compute the minimum edit distance of two strings, we will need to compute bottom-up, combining solutions to subproblems.
First, we need to consider the basic cases : , which means to convert a null string to a string with one character. The edit distance is one insertion.
, which means to convert a string with one character to a null string. The edit distance is one deletion.
, which means to convert a string with one character to another string with one character. The edit distance is zero if two characters are the same, while the edit distance is two if two characters are different.
Then we compute larger cases based on previous values.
0
1
Updated 2021-09-18
Tags
Data Science