- Computer Science Engineering (CSE)
- Design and Analysis of Algorithms
- Suppose each edit (insert, delete, repla...

Q. |
## 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. |

A. | true |

B. | false |

Answer» A. true | |

Explanation: consider the strings “abcd” and “efghi”. the string “efghi” can be converted to “abcd” by deleting “i” and converting “efgh” to “abcd”. the cost of transformation is 5, which is equal to the length of the larger string. |

View all MCQs in:
Design and Analysis of Algorithms

- Consider the two strings “”(empty string) and “abcd”. What is the edit distance between the two strings?
- Consider the strings “monday” and “tuesday”. What is the edit distance between the two strings?
- In the worst case, the minimum number of insertions to be made to convert the string into a palindrome is equal to the length of the string.
- Given a string, you have to find the minimum number of characters to be inserted in the string so that the string becomes a palindrome. Which of the following methods can be used to solve the problem?
- For which of the following, the length of the string is not equal to the length of the longest palindromic subsequence?
- Consider the strings “PQRSTPQRS” and “PRATPBRQRPS”. What is the length of the longest common subsequence?
- Manhattan distance is an alternative way to define a distance between two points.
- Consider the string “abbccbba”. What is the minimum number of insertions required to make the string a palindrome?
- What is the time complexity of the Wagner–Fischer algorithm where “m” and “n” are the lengths of the two strings?
- For every non-empty string, the length of the longest palindromic subsequence is at least one.

Login to Continue

It will take less than 2 minutes

Report MCQ