Question: Compute the edit distance between Cats and Fast. 1 . Write down the 5 x 5 array of distances between all prefixes as computed by
Compute the edit distance between Cats and Fast.
Write down the x array of distances between all prefixes as computed by the following algorithm.
int EditDistancechar sm char tn
"harades of hole ll afad the ecit distante belleen the first i characters of s and the fist declare int dOm On for i from to m
di: i the distance of any first string to an empty second string
for j from to n
diO, jl : j the distance of any second string to an empty first string
for j from to n for i from to m
if si ti then
dfi, jl : dfi j no operation required else
dfi, j : minimum
di j a deletion dii, j an insertion di j a substitution
NES
return dim.n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
