Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

On a string s, we have the following elementary operations: i) Insertion of a single letter into the string s, e.g., BT ? BAT. ii) Deletion of a single letter in the string s, e.g., CAT E ? CAT. iii) Substitution of one letter in the string s by another one, e.g., BAT ? CAT. The Levenshtein distance D(s, t) between two strings s and t is equal to the smallest number of operations i), ii), or iii) to transform the string s into t. Let m denote an array where the entry m[i, j] contains the Levenshtein distance of the initial segments s[1..i] and t[1..j] of the strings s and t, respectively. (a) Determine the entries and justify your claim:

(a) m[i, 0] =

(b) m[0, j] =

(b) The following facts are easily established: (F1) If we can transform s[1..i] to t[1..j - 1] in k operations, then we can simply add t[j] afterwards to get t[1..j] in k + 1 operations. (F2) If we can transform s[1..i - 1] to t[1..j] in k operations, then we can do the same operations on s[1..i] and then remove the original s[i] at the end in k + 1 operations. (F3) If we can transform s[1..i - 1] to t[1..j - 1] in k operations, we can do the same to s[1..i] and then do a substitution of t[j] for the original s[i] at the end if necessary, requiring k or k + 1 operations. These three facts suffice to determine the value of m[i, j] from the entries m[i, j - 1], m[i - 1, j], and m[i - 1, j - 1]. Derive the formula for m[i, j] and justify your result. Explain how the two subcases in F3 are resolved.

m[i, j] =

(c) What is the complexity of any dynamic programming approach based on parts a) and b), assume that s and t are of length a and b. Use Big Omega notation

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93124614

Have any Question?


Related Questions in Computer Engineering

Sorting algorithms are one kind of algorithm whose

Sorting algorithms are one kind of algorithm whose performance may depend upon the data. Choose one of the sorting algorithms or any other algorithm and explain whether the there are any differences in the best, average ...

Suppose that we need to send four packets a b c d from a

Suppose that we need to send four packets (A, B, C, D) from a sender to a receiver. Consider two cases. 1) packet B is lost. 2) acknowledgement for packet B is lost. When there is a packet loss, always assume that only t ...

Access your browsers security settings and configure the

Access your browser's security settings and configure the browser to refuse all cookies or to prompt you before allowing a cookie. Restart the browser; then visit several different Web sites. Be sure to visit popular sit ...

Research the web for an example of a startup using a cloud

Research the Web for an example of a startup using a cloud infrastructure. What were the main reasons for choosing a cloud infrastructure? What alternatives did the startup have? Answer should be at least 1 page long dou ...

Of 144 single women 41 had breast cancer 209 who were

Of 144 single women 41% had breast cancer, 209 who were married 52.2% had breast cancer and of 89 life bing with family 59.6% had breast cancer. Find the p value for the relationship?

A sample of 40 songs from a students itunes playlist showed

A sample of 40 songs from a student's iTunes playlist showed a mean length of 3.542 minutes with a standard deviation of 0.311 minute. Construct a 95% confidence interval for the population standard deviation.  (Round yo ...

A 2-year treasury security currently earns 197 percent over

A 2-year Treasury security currently earns 1.97 percent. Over the next two years, the real risk-free rate is expected to be 1.00 percent per year and the inflation premium is expected to be 0.60 percent per year. Calcula ...

Question a show the results of inserting 10 12 1 14 6 5 8

Question : a) Show the results of inserting 10, 12, 1, 14, 6, 5, 8, 15, 3, 9, 7, 4, 11, 13, and 2, one at a into an initially empty binary heap. Show the tree at each stage. b) Show the result of performing three DeleteM ...

On june 23 2016 the brits voted to exit the eu the

On June 23, 2016, the Brits voted to exit the EU. The following were the daily values of an investment. June 23 24 Dollars 109.60 111.60 If returns were to accumulate at the same rate over an entire year (252 trading day ...

Suppose a consumer is trying to make a choice over the

Suppose a consumer is trying to make a choice over the consumption of two goods: x and y. Px = 3, Py = 4 and the income is equal to 50. Assume that the government distributes some stamps that are good to buy 5 units of g ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As