English

A Data-Structure for Approximate Longest Common Subsequence of A Set of Strings

Data Structures and Algorithms 2021-01-13 v3

Abstract

Given a set of kk strings II, their longest common subsequence (LCS) is the string with the maximum length that is a subset of all the strings in II. A data-structure for this problem preprocesses II into a data-structure such that the LCS of a set of query strings QQ with the strings of II can be computed faster. Since the problem is NP-hard for arbitrary kk, we allow an error that allows some characters to be replaced by other characters. We define the approximation version of the problem with an extra input mm, which is the length of the regular expression (regex) that describes the input, and the approximation factor is the logarithm of the number of possibilities in the regex returned by the algorithm, divided by the logarithm regex with the minimum number of possibilities. Then, we use a tree data-structure to achieve sublinear-time LCS queries. We also explain how the idea can be extended to the longest increasing subsequence (LIS) problem.

Keywords

Cite

@article{arxiv.2008.01768,
  title  = {A Data-Structure for Approximate Longest Common Subsequence of A Set of Strings},
  author = {Sepideh Aghamolaei},
  journal= {arXiv preprint arXiv:2008.01768},
  year   = {2021}
}

Comments

An optimal exact sketch for the LCS of two strings was already known: arXiv:1810.01238 as well as an approximation algorithm with weights: https://doi.org/10.1016/j.ic.2010.12.006 The edit distance of regular languages was also known: https://doi.org/10.3390/a11110165 Using these subroutines in any algorithm for the LCS of k strings gives a better result

R2 v1 2026-06-23T17:38:34.786Z