Abstract

The longest common subsequence (LCS) problem is one of the classical and well-studied problems in computer science. The computation of the LCS is a frequent task in DNA sequence analysis, and has applications to genetics and molecular biology. In this paper we introduce new variants of LCS problem and present efficient algorithms to solve them. In particular we introduce the notion of gap constraints in the LCS problems. For the LCS problem with fixed gap, we first present a naive algorithm runs in O ( n 2 + R ( K + 1 ) 2 ) time, where R is the total number of ordered pairs of positions at which the two strings match and K is the fixed gap constraint. We then improve the running time to O ( n 2 + R K + R log log n ) using some novel techniques. Furthermore, we present an algorithm that is independent of K and runs in O ( n 2 + R log log n ) time. Using these techniques, we also present a new O ( n 2 ) algorithm to solve the original LCS problem. Additionally, we modify our algorithms to handle elastic and rigid gaps. We also apply the notion of rigidness to the original LCS problem and modify the traditional dynamic programming solution to handle the rigidness presenting a O ( n 2 ) algorithm to solve the problem. Finally, we also improve the solution to Rigid Fixed Gap LCS to O ( n 2 ) . Notably, in all of the above cases, we assume that the two given strings are of equal length i.e. n . But our results can be easily extended to handle two strings of different length.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.