Question: 3 . Compute the edit distance between PLASMA and ALTRUISM . 1 ) Write down the 7 9 array of distances between all prefixes as
Compute the edit distance between PLASMA and ALTRUISM
Write down the array of distances between all prefixes as computed by the
following algorithm.
int EditDistancechar sm char tn
for all i and j dij will hold the edit distance between the first i characters of s and the first j
characters of t; note that d has mxn values
declare int dmn
for i from to m
di : i the distance of any first string to an empty second string
for j from to n
d j : j the distance of any second string to an empty first string
for j from to n
for i from to m
if si tj then
di j : di j no operation required
else
di j : minimum
di j a deletion
di j an insertion
di j a substitution
return dmn
Describe all possible sequences of operations that transform PLASMA to
ALTRUISM with the minimum number of edit operations.
make the concept clear and give me the correct answer.
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
