Polynomial-time equivalences and refined algorithms for longest common subsequence variants
Polynomial-time equivalences and refined algorithms for longest common subsequence variants
复制标题
DOI:
10.1016/j.dam.2024.04.006
复制
发表时间:
2024-08-15
影响因子:
1.1
通讯作者:
Utashima,Tadatoshi
中科院分区:
文献类型:
--
作者:
Asahiro,Yuichi;Jansson,Jesper;Utashima,Tadatoshi
The problem of computing the longest common subsequence of two sequences (LCS for short) is a classical and fundamental problem in computer science. In this article, we study four variants of LCS: the Repetition-Bounded Longest Common Subsequence problem (RBLCS), the Multiset-Restricted Common Subsequence problem (MRCS), the Two-Side-Filled Longest Common Subsequence problem (2FLCS), and the One-Side-Filled Longest Common Subsequence problem (1FLCS). Although the original LCS can be solved in polynomial time, all these four variants are known to be NP-hard. Recently, an exact, O (1. 4422 5 n)-time, dynamic programming (DP) based algorithm for RBLCS was proposed, where the two input sequences have lengths n and p o l y (n). Here, we first establish that each of MRCS, 1FLCS, and 2FLCS is polynomially equivalent to RBLCS. Then, we design a refined DP-based algorithm for RBLCS that runs in O (1. 4142 2 n) time, which implies that MRCS, 1FLCS, and 2FLCS can also be solved in O (1. 4142 2 n) time. Finally, we give a polynomial-time 2-approximation algorithm for 2FLCS.