What is the complexity of any dynamic programming approach

Assignment Help Computer Engineering
Reference no: EM132137149

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

Reference no: EM132137149

Questions Cloud

The trial court rendered judgment against lamas : The trial court rendered judgment against Lamas. On appeal, did the appellate court reverse? Explain.
Employer take to minimize possiblity of terminations : What steps can an employer take to minimize the possiblity of terminations being overturned by legal actions? Why?
The risks associated planned procurement approach : Identify the risks associated planned procurement approach. how procurement risks for this project will be monitored and controlled.
Annual holding and setup costs : The soft goods department of a large department store sells 175 units per month of a certain large bath towel. annual holding and setup costs?
What is the complexity of any dynamic programming approach : 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
Print the converted sentence both to the screen : Print the converted sentence both to the screen and to an output file. Your input file consists of a variable number of records.
Develop your own string class : Develop and work with a C++ class, define constructors and destructors, define member functions outside .
Which of the following statements will display a string : Which of the following statements will display a string as "Jones, Jane" (the last name, a comma, a space, and the first name) in the lblFullName control?
Write a method with an input variable : Write a method with an input variable (string type). The method should return the number of uppercase letters of the input variable.

Reviews

Write a Review

Computer Engineering Questions & Answers

  When does cvs detect a conflict and how does it resolve it

When does CVS detect a conflict, and how does it resolve it? What do letters N, C and U represent when seen before a filename in output of some CVS commands?

  Provide an overview of the general functions and features

Provide an overview of the general functions and features within MicrosoftPowerPoint. Include speaker notes or a voice recording for all slides.

  Why does pipeda have any rulings on digital signatures

Do you agree that digital signatures are the best way to protect the data in question? Why does PIPEDA have any rulings on digital signatures?

  Calculate the routing metric for this path

Which metric provides the best value? How does this relate to the AD?

  Write a program in c++that converts number bases

Write a program in C++that converts number bases. In particular, the program will perform the following tasks:

  What is the smallest possible size for the frame buffer

Suppose a system with an 8-inch by 10 -inch video screen that can display 100 pixels. What is the smallest possible size (in bytes ) for the frame buffer?

  List the materials of machining cutting tools

List the materials of machining cutting tools. Which is the softest and which is the hardest material? What is the effect of material strength on the tool.

  What speedup is achieved if both optimizations are adopted

A memory cache is a small but fast memory where data recently accessed is kept in anticipation of future references.

  What are your impressions of the noun technique

Create a UML class diagram using the classes you have identified and add names to the associations and multiplicity constraints. What are your impressions of the noun technique?

  Lottery requires that you select six different numbers

A lottery needs that you select six different numbers from the integers 1 to 49. Write a Java program that will do this for you and generate five sets of six numbers as a result.

  Write a program to simulate queueing system in the cinema

You are required to write a program to simulate queueing system in the cinema with the requirements- There are two type of customers to be served which are.

  What bit will be added to support even parity

Given the character 0110101, what bit will be added to support even parity? Given the character 1010010, what bit will be added to support odd parity?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd