Question: Exercise 4.2. Recall that a palindrome is a string that reads the same forwards and backwards. For example, mom, dad, racecar, and gohangasalamiimalasagnahog are all

Exercise 4.2. Recall that a palindrome is a string that reads the same forwards and backwards. For example, mom, dad, racecar, and gohangasalamiimalasagnahog are all palindromes. Consider the problem where you are given a string A[1..n] as input, and the goal is to find the (length of the) longest palendrome that is a subsequence of A. For this problem either (a) design and analyze a polyno- mial time algorithm, or (b) prove a polynomial time algorithm would imply a polynomial time algorithm for SAT. 3This problem is tricky
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
