Question: Given two strings X and Y, a third string Z is a common superstring of X and Y if X and Y are both subsequences

Given two strings X and Y, a third string Z is a common superstring of X and Y if X and Y are both subsequences of 2. (Example: if X = sos and Y = soft, then Z = sosft is a common superstring of X and Y.) Design a dynamic programming algorithm which, given as input two strings X and Y, returns the length of the shortest common superstring (SCS) of X and Y. Specifically, you have to write a recurrence of X_i and Y_j, and the pseudocode. The algorithm, which has to return l(n, m), must run in time Theta(n middot m), where n = |X| and m = |Y|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
