An efficient dynamic programming algorithm for the generalized LCS problem with multiple substring inclusive constraints

preprint2015arXivOpen access

Abstract

In this paper, we consider a generalized longest common subsequence problem with multiple substring inclusive constraints. For the two input sequences XX and YY of lengths nn and mm, and a set of dd constraints P={P1,⋯ ,Pd}P=\{P_1,\cdots,P_d\} of total length rr, the problem is to find a common subsequence ZZ of XX and YY including each of constraint string in PP as a substring and the length of ZZ is maximized. A new dynamic programming solution to this problem is presented in this paper. The correctness of the new algorithm is proved. The time complexity of our algorithm is O(d2dnmr)O(d2^dnmr). In the case of the number of constraint strings is fixed, our new algorithm for the generalized longest common subsequence problem with multiple substring inclusive constraints requires O(nmr)O(nmr) time and space.

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.