Faster STR-EC-LCS Computation

01/16/2020
by   Kohei Yamada, et al.
0

The longest common subsequence (LCS) problem is a central problem in stringology that finds the longest common subsequence of given two strings A and B. More recently, a set of four constrained LCS problems (called generalized constrained LCS problem) were proposed by Chen and Chao [J. Comb. Optim, 2011]. In this paper, we consider the substring-excluding constrained LCS (STR-EC-LCS) problem. A string Z is said to be an STR-EC-LCS of two given strings A and B excluding P if, Z is one of the longest common subsequences of A and B that does not contain P as a substring. Wang et al. proposed a dynamic programming solution which computes an STR-EC-LCS in O(mnr) time and space where m = |A|, n = |B|, r = |P| [Inf. Process. Lett., 2013]. In this paper, we show a new solution for the STR-EC-LCS problem. Our algorithm computes an STR-EC-LCS in O(n|Σ| + (L+1)(m-L+1)r) time where |Σ| ≤min{m, n} denotes the set of distinct characters occurring in both A and B, and L is the length of the STR-EC-LCS. This algorithm is faster than the O(mnr)-time algorithm for short/long STR-EC-LCS (namely, L ∈ O(1) or m-L ∈ O(1)), and is at least as efficient as the O(mnr)-time algorithm for all cases.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/14/2022

Space-Efficient STR-IC-LCS Computation

One of the most fundamental method for comparing two given strings A and...
research
03/04/2021

A Simple Algorithm for the Constrained Sequence Problems

In this paper we address the constrained longest common subsequence prob...
research
04/05/2023

Fast computation of approximate weak common intervals in multiple indeterminate strings

In ongoing work to define a principled method for syntenic block discove...
research
02/18/2018

Linear-Time Algorithm for Long LCF with k Mismatches

In the Longest Common Factor with k Mismatches (LCF_k) problem, we are g...
research
03/30/2020

A Faster Subquadratic Algorithm for the Longest Common Increasing Subsequence Problem

The Longest Common Increasing Subsequence (LCIS) is a variant of the cla...
research
05/07/2021

Faster Algorithms for Longest Common Substring

In the classic longest common substring (LCS) problem, we are given two ...
research
07/25/2023

A Compact DAG for Storing and Searching Maximal Common Subsequences

Maximal Common Subsequences (MCSs) between two strings X and Y are subse...

Please sign up or login with your details

Forgot password? Click here to reset