Article ID Journal Published Year Pages File Type
430928 Journal of Discrete Algorithms 2012 7 Pages PDF
Abstract

In this paper, we study some variants of the Constrained Longest Common Subsequence (CLCS) problem, namely, the substring inclusion CLCS (Substring-IC-CLCS) problem and a generalized version thereof. In the Substring-IC-CLCS problem, we are to find a longest common subsequence (LCS) of two given strings containing a third constraint string (given) as a substring. Previous solution to this problem runs in cubic time, i.e, O(nmk)O(nmk) time, where n,mn,m and k   are the length of the 3 input strings. In this paper, we present simple O(nm)O(nm) time algorithms to solve the Substring-IC-CLCS problem. We also study the Generalized Substring-IC-LCS problem where we are given two strings of length n and m respectively and an ordered list of p   strings and the goal is to find an LCS containing each of them as a substring in the order they appear in the list. We present an O(nmp)O(nmp) algorithm for this generalized version of the problem.

Related Topics
Physical Sciences and Engineering Computer Science Computational Theory and Mathematics
Authors
, ,