English

Elastic-Degenerate String Comparison

Data Structures and Algorithms 2024-11-13 v1

Abstract

An elastic-degenerate (ED) string TT is a sequence of nn sets T[1],,T[n]T[1],\ldots,T[n] containing mm strings in total whose cumulative length is NN. We call nn, mm, and NN the length, the cardinality and the size of TT, respectively. The language of TT is defined as L(T)={S1Sn:SiT[i]L(T)=\{S_1 \cdots S_n\,:\,S_i \in T[i] for all i[1,n]}i\in[1,n]\}. 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 T1T_1 and T2T_2 of lengths n1n_1 and n2n_2, cardinalities m1m_1 and m2m_2, and sizes N1N_1 and N2N_2, respectively, we show the following: - There is no O((N1N2)1ϵ)O((N_1N_2)^{1-\epsilon})-time algorithm, for any constant ϵ>0\epsilon>0, for EDSI even when T1T_1 and T2T_2 are over a binary alphabet, unless the Strong Exponential-Time Hypothesis is false. - There is no combinatorial O((N1+N2)1.2ϵf(n1,n2))O((N_1+N_2)^{1.2-\epsilon}f(n_1,n_2))-time algorithm, for any constant ϵ>0\epsilon>0 and any function ff, for EDSI even when T1T_1 and T2T_2 are over a binary alphabet, unless the Boolean Matrix Multiplication conjecture is false. - An O(N1logN1logn1+N2logN2logn2)O(N_1\log N_1\log n_1+N_2\log N_2\log n_2)-time algorithm for outputting a compact (RLE) representation of the intersection language of two unary ED strings. In the case when T1T_1 and T2T_2 are given in a compact representation, we show that the problem is NP-complete. - An O(N1m2+N2m1)O(N_1m_2+N_2m_1)-time algorithm for EDSI. - An O~(N1ω1n2+N2ω1n1)\tilde{O}(N_1^{\omega-1}n_2+N_2^{\omega-1}n_1)-time algorithm for EDSI, where ω\omega is the exponent of matrix multiplication; the O~\tilde{O} notation suppresses factors that are polylogarithmic in the input size.

Keywords

Cite

@article{arxiv.2411.07782,
  title  = {Elastic-Degenerate String Comparison},
  author = {Esteban Gabory and Moses Njagi Mwaniki and Nadia Pisanti and Solon P. Pissis and Jakub Radoszewski and Michelle Sweering and Wiktor Zuba},
  journal= {arXiv preprint arXiv:2411.07782},
  year   = {2024}
}
R2 v1 2026-06-28T19:57:02.794Z