In this paper, we focus on the edit distance of two given strings where block-edit operations are allowed and better fitting to the natural edit behaviors. Previous results showed that this problem is NP-hard when recursive moves are allowed. Various approximations to this problem were also proposed in recent years. If no overlapping blocks are involved in these operations, however, this problem can be solved in polynomial time, even for the case of nested character-edit operations. In this paper, we define three problems with different measuring functions, which are P (EIS, C), P (EI, L) and P (EI, N). Then we show that with some preprocessing, the minimum edit distances of these three problems can be obtained in O(nm), O(nm log m) and O((n + m)m 2) time, respectively, where n and m are the lengths of the two input strings.
In this paper, we revisit a recent variant of the longest common subsequence (LCS) problem, the string-excluding constrained LCS (STR-EC-LCS) problem, which was first addressed by Chen and Chao [8]. Given two sequences X and Y of lengths m and n, respectively, and a constraint string P of length r, we are to find a common subsequence Z of X and Y which excludes P as a substring and the length of Z is maximized. In fact, this problem cannot be correctly solved by the previously proposed algorithm. Thus, we give a correct algorithm with O(mnr) time to solve it. Then, we revisit the STR-EC-LCS problem with multiple constraints {P 1 , P 2 , • • • , P k }.We propose a polynomial-time algorithm which runs in O(mnR) time, where R = ∑ k i=1 |P i |, and thus it overthrows the previous claim of NP-hardness.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.