Abstract

AbstractAn elastic-degenerate (ED) string is a sequence of n finite sets of strings of total length N, introduced to represent a set of related DNA sequences, also known as a pangenome. The ED string matching (EDSM) problem consists in reporting all occurrences of a pattern of length m in an ED text. The EDSM problem has recently received some attention by the combinatorial pattern matching community, culminating in an \(\mathcal {\tilde{O}}(nm^{\omega -1})+\mathcal {O}(N)\)-time algorithm [Bernardini et al., SIAM J. Comput. 2022], where \(\omega \) denotes the matrix multiplication exponent and the \(\mathcal {\tilde{O}}(\cdot )\) notation suppresses polylog factors. In the k-EDSM problem, the approximate version of EDSM, we are asked to report all pattern occurrences with at most k errors. k-EDSM can be solved in \(\mathcal {O}(k^2mG+kN)\) time under edit distance, where G denotes the total number of strings in the ED text [Bernardini et al., Theor. Comput. Sci. 2020]. Unfortunately, G is only bounded by N, and so even for \(k=1\), the existing algorithm runs in \(\varOmega (mN)\) time in the worst case. Here we make progress in this direction. We show that 1-EDSM can be solved in \(\mathcal {O}((nm^2 + N)\log m)\) or \(\mathcal {O}(nm^3 + N)\) time under edit distance. For the decision version of the problem, we present a faster \(\mathcal {O}(nm^2\sqrt{\log m} + N\log \log m)\)-time algorithm. Our algorithms rely on non-trivial reductions from 1-EDSM to special instances of classic computational geometry problems (2d rectangle stabbing or range emptiness), which we show how to solve efficiently.KeywordsString algorithmsApproximate string matchingEdit distanceDegenerate stringsElastic-degenerate strings

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.