A Data-Structure for Approximate Longest Common Subsequence of A Set of Strings
Abstract
Given a set of strings , their longest common subsequence (LCS) is the string with the maximum length that is a subset of all the strings in . A data-structure for this problem preprocesses into a data-structure such that the LCS of a set of query strings with the strings of can be computed faster. Since the problem is NP-hard for arbitrary , 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 , 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.
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