## Abstract

The problem of finding the longest common subsequence (LCS) of two given strings A _{1} and A _{2} is a well-studied problem. The constrained longest common subsequence (C-LCS) for three strings A _{1}, A _{2} and B _{1} is the longest common subsequence of A _{1} and A _{2} that contains B _{1} as a subsequence. The fastest algorithm solving the C-LCS problem has a time complexity of O(m _{1} m _{2} n _{1}) where m _{1}, m _{2} and n _{1} are the lengths of A _{1}, A _{2} and B _{1} respectively. In this paper we consider two general variants of the C-LCS problem. First we show that in case of two input strings and an arbitrary number of constraint strings, it is NP-hard to approximate the C-LCS problem. Moreover, it is easy to see that in case of an arbitrary number of input strings and a single constraint, the problem of finding the constrained longest common subsequence is NP-hard. Therefore, we propose a linear time approximation algorithm for this variant, our algorithm yields a 1/ √m _{min}|∑| approximation factor, where m_{min} is the length of the shortest input string and |∑| is the size of the alphabet.

Original language | English GB |
---|---|

Pages (from-to) | 255-262 |

Number of pages | 8 |

Journal | Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) |

DOIs | |

State | Published - 1 Jul 2008 |

Externally published | Yes |

Event | 19th Annual Symposium on Combinatorial Pattern Matching, CPM 2008 - Pisa, Italy Duration: 18 Jun 2008 → 20 Jun 2008 |

## ASJC Scopus subject areas

- Theoretical Computer Science
- Computer Science (all)