Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Compute the edit distance between paris and alice. Write down the 5 X 5 array of distance between all prefixes as computed by the Dynamic

Compute the edit distance between paris and alice. Write down the 5 X 5 array of distance between all prefixes as computed by the Dynamic Progamming algorithm below.

EDITDISTANCE(s1, s2)

int m[i,j] = 0

for i <-- 1to |s1|

do m[i,0] = i

for j <-- 1 to |s2|

do m[0,j] = j

for i <-- 1 to |s1|

do for j <-- 1 to |s2|

do m[i,j] = min{m[i-1, j-1] + if(s1[i] = s2[j]) then 0 else 1 fi,

m[i-1, j] +1,

m[i,j -1] +1}

return m[|s1|, |s2|]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Support For Data Mining Applications Discovering Knowledge With Inductive Queries Lnai 2682

Authors: Rosa Meo ,Pier L. Lanzi ,Mika Klemettinen

2004th Edition

3540224793, 978-3540224792

More Books

Students also viewed these Databases questions