McqMate

Q. |
## Consider the strings “monday” and “tuesday”. What is the edit distance between the two strings? |

A. | 3 |

B. | 4 |

C. | 5 |

D. | 6 |

Answer» B. 4 | |

Explanation: “monday” can be converted to “tuesday” by replacing “m” with “t”, “o” with “u”, “n” with “e” and inserting “s” at the appropriate position. so, the edit distance is 4. |

1.6k

0

Do you find this helpful?

1

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- Consider the two strings “”(empty string) and “abcd”. What is the edit distance between the two strings?
- Suppose each edit (insert, delete, replace) has a cost of one. Then, the maximum edit distance cost between the two strings is equal to the length of the larger string.
- Manhattan distance is an alternative way to define a distance between two points.
- Consider the strings “PQRSTPQRS” and “PRATPBRQRPS”. What is the length of the longest common subsequence?
- Which of the following methods can be used to solve the edit distance problem?
- The edit distance satisfies the axioms of a metric when the costs are non-negative.
- What is the time complexity of the Wagner–Fischer algorithm where “m” and “n” are the lengths of the two strings?
- Which of the following is the longest common subsequence between the strings “hbcfgmnapq” and “cbhgrsfnmq” ?
- The shortest distance between a line and a point is achieved when?
- What is the shortest distance between the line given by -2x + 3y + 4 = 0 and the point (5,6)?