English

A Dynamic Programming Solution to a Generalized LCS Problem

Data Structures and Algorithms 2013-01-31 v1

Abstract

In this paper, we consider a generalized longest common subsequence problem, the string-excluding constrained LCS problem. For the two input sequences XX and YY of lengths nn and mm, and a constraint string PP of length rr, the problem is to find a common subsequence ZZ of XX and YY excluding PP as a substring and the length of ZZ is maximized. The problem and its solution were first proposed by Chen and Chao\cite{1}, but we found that their algorithm can not solve the problem correctly. A new dynamic programming solution for the STR-EC-LCS problem is then presented in this paper. The correctness of the new algorithm is proved. The time complexity of the new algorithm is O(nmr)O(nmr).

Keywords

Cite

@article{arxiv.1301.7183,
  title  = {A Dynamic Programming Solution to a Generalized LCS Problem},
  author = {Lei Wang and Xiaodong Wang and Yingjie Wu and Daxin Zhu},
  journal= {arXiv preprint arXiv:1301.7183},
  year   = {2013}
}
R2 v1 2026-06-21T23:17:42.686Z