Theoretical Computer Science ( IF 1.1 ) Pub Date : 2020-08-04 , DOI: 10.1016/j.tcs.2020.07.042 Yuichi Asahiro , Jesper Jansson , Guohui Lin , Eiji Miyano , Hirotaka Ono , Tadatoshi Utashima
In this paper, we study exact, exponential-time algorithms for a variant of the classic Longest Common Subsequence problem called the Repetition-Bounded Longest Common Subsequence problem (or RBLCS, for short): Let an alphabet S be a finite set of symbols and an occurrence constraint be a function , assigning an upper bound on the number of occurrences of each symbol in S. Given two sequences X and Y over the alphabet S and an occurrence constraint , the goal of RBLCS is to find a longest common subsequence of X and Y such that each symbol appears at most times in the obtained subsequence. The special case where for every symbol is known as the Repetition-Free Longest Common Subsequence problem (RFLCS) and has been studied previously; e.g., in [1], Adi et al. presented a simple (exponential-time) exact algorithm for RFLCS. However, they did not analyze its time complexity in detail, and to the best of our knowledge, there are no previous results on the running times of any exact algorithms for this problem. Without loss of generality, we will assume that and . In this paper, we first propose a simpler algorithm for RFLCS based on the strategy used in [1] and show explicitly that its running time is . Next, we provide a dynamic programming (DP) based algorithm for RBLCS and prove that its running time is for any occurrence constraint , and even less in certain special cases. In particular, for RFLCS, our DP-based algorithm runs in time, which is faster than the previous one. Furthermore, we prove NP-hardness and APX-hardness results for RBLCS on restricted instances.
中文翻译:
重复有界最长公共子序列问题的精确算法
在本文中,我们研究了经典的最长公共子序列问题(称为重复有界最长公共子序列问题,简称RBLCS)的变体的精确,指数时间算法:假设字母S为符号的有限集合,并且一个出现约束 成为一个功能 ,为S中每个符号的出现次数指定一个上限。给定字母S上的两个序列X和Y以及出现约束,RBLCS的目标是找到X和Y的最长公共子序列,使得每个符号 最多出现 获得的子序列中的次数。特殊情况 对于每个符号 被称为无重复最长公共子序列问题(RFLCS),并且先前已进行过研究;例如,在[1]中,Adi等人。提出了一种用于RFLCS的简单(指数时间)精确算法。但是,他们没有详细分析其时间复杂度,并且据我们所知,没有任何关于该问题的精确算法的运行时间的先前结果。在不失一般性的前提下,我们将假设 和 。在本文中,我们首先基于[1]中使用的策略为RFLCS提出了一种更简单的算法,并明确表明其运行时间为。接下来,我们为RBLCS提供基于动态编程(DP)的算法,并证明其运行时间为 对于任何发生约束 ,在某些特殊情况下甚至更少。特别是对于RFLCS,我们基于DP的算法在时间,比上一个要快。此外,我们在受限实例上证明了RBLCS的NP硬度和APX硬度结果。