Question: Algorithms Question Given two strings X = x_1x_2...x_m and Y = y_1y_2...y_n, let deleteScore (X, Y) be the least number of characters you have to

Algorithms Question

Algorithms Question Given two strings X = x_1x_2...x_m and Y = y_1y_2...y_n,

Given two strings X = x_1x_2...x_m and Y = y_1y_2...y_n, let deleteScore (X, Y) be the least number of characters you have to delete from X, Y so that you get two same strings. For example, if X = goodman and Y = goldmann, then deleteScore(X, Y) = 3 (you can delete 'o' from X, '1' and one 'n' from Y to get the same string - "godman"). Give an algorithm that given two strings X, Y computes deletescore(X, Y). For full-credit, your algorithm should run in polynomial time. (Example: On input X = goodman, Y = goldmann your output should be 3.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!