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
Utashima,Tadatoshi
中科院分区:
数学3区
文献类型:
--
作者:
Asahiro,Yuichi;Jansson,Jesper;Utashima,Tadatoshi

文献摘要

相似文献

计算两个序列的最长公共子序列(简称LCS)问题是计算机科学中的一个经典和基本问题。在本文中,我们研究了LCS的四个变种:有界重复最长公共子序列问题(RBLCS)、多集限制公共子序列问题(MRCS)、双边填充最长公共子序列问题(2FLCS)和单边填充最长公共子序列问题(1FLCS)。虽然原始LCS可以在多项式时间内求解,但这四种变种都是NP难的。最近提出了一种基于精确O(1.4422 5n)时间的动态规划(DP)算法,其中两个输入序列的长度分别为n和P o o L y(N)。这里,我们首先证明了MRCS、1FLCS和2FLCS中的每一个都与RBLCS多项式等价。然后,我们设计了一个改进的基于DP的RBLCS算法,其运行时间为O(1.4142 2n),这意味着MRCS、1FLCS和2FLCS也可以在O(1.4142 2n)时间内求解。最后,我们给出了2FLCS的一个多项式时间2-近似算法。
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.