Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider two strings w = w_1 middot. w_n and x = x_1 middot .. x_m. We want to c

ID: 3859718 • Letter: C

Question

Consider two strings w = w_1 middot. w_n and x = x_1 middot .. x_m. We want to consider edits: insertions, deletions, and substitutions. All such edits are equal: they have a "cost" of 1. The edit distance of w, x, denoted ED(w, x), is the minimum size of a sequence of edits over all possible sequences of edits on w to have w equal to x. For example, if w = abb and x = bc, then the (minimum) edit distance is 2: one such edit sequence is deleting a, and substituting the second 6 for a c. Also, there is no edit sequence of length 1 to transform abb into bc. Consider the following language for a given value of k (where x^rev is the reverse of string x): Edit(k) = {w#x^rev: w, x element {a, b, c}*. ED(w, x) lessthanorequalto k}. In other words, tills language has all strings of the form w#x^rev where the edit distance is less than k. (a) Produce a PDA P that recognizes Edit(l). (b) Convert P into an equivalent CFG G using the techniques from class

Explanation / Answer

Here is the solution as per the given criteria:-

Edit Distance:-

It is a way of quantifying how dissimilar two strings are to one another by counting the minimum number of operations required to transfer one string into the other.Iy helps to find applications in natural language processing.

Properties:-

Edit distance with non-negative cost satisfies the axions of a metric, giving rise to a metric space of strings, when following conditions are met:-

with these properties, the metric axiom's are satisfied follows:-

d(a,b)=0 if and only if a=b,

since each string can be tranformed to itself using exactly zero operations.

d(a,b) > 0 when a#b,

since this required at least one operation at non-zero cost.

d(a,b) = a(b,a) by equality of the cost of each operation and its inverse.

So,

Triangle in equality : d(a,c)<d(a,b)+d(b,c)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote