Elastic-Degenerate String Comparison
arXiv:2411.07782
Abstract
An elastic-degenerate (ED) string is a sequence of sets containing strings in total whose cumulative length is . We call , , and the length, the cardinality and the size of , respectively. The language of is defined as for all . ED strings have been introduced to represent a set of closely-related DNA sequences, also known as a pangenome. The basic question we investigate here is: Given two ED strings, how fast can we check whether the two languages they represent have a nonempty intersection? We call the underlying problem the ED String Intersection (EDSI) problem.For two ED strings and of lengths and , cardinalities and , and sizes and , respectively, we show the following: - There is no -time algorithm, for any constant , for EDSI even when and are over a binary alphabet, unless the Strong Exponential-Time Hypothesis is false. - There is no combinatorial -time algorithm, for any constant and any function , for EDSI even when and are over a binary alphabet, unless the Boolean Matrix Multiplication conjecture is false. - An -time algorithm for outputting a compact (RLE) representation of the intersection language of two unary ED strings. In the case when and are given in a compact representation, we show that the problem is NP-complete. - An -time algorithm for EDSI. - An -time algorithm for EDSI, where is the exponent of matrix multiplication; the notation suppresses factors that are polylogarithmic in the input size.