McqMate

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

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?
- Consider the strings “monday” and “tuesday”. What is the edit distance between the two strings?
- 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?
- Consider the string “abbccbba”. What is the minimum number of insertions required to make the string a palindrome?
- Manhattan distance is an alternative way to define a distance between two points.
- For every non-empty string, the length of the longest palindromic subsequence is at least one.
- Which of the following is the longest common subsequence between the strings “hbcfgmnapq” and “cbhgrsfnmq” ?
- Which of the following methods can be used to solve the edit distance problem?