English

Near-Optimal Quantum Algorithm for Finding the Longest Common Substring between Run-Length Encoded Strings

Quantum Physics 2024-11-06 v1

Abstract

We give a near-optimal quantum algorithm for the longest common substring (LCS) problem between two run-length encoded (RLE) strings, with the assumption that the prefix-sums of the run-lengths are given. Our algorithm costs O~(n2/3/d1/6o(1)polylog(n~))\tilde{\mathcal{O}}(n^{2/3}/d^{1/6-o(1)}\cdot\mathrm{polylog}(\tilde{n})) time, while the query lower bound for the problem is Ω~(n2/3/d1/6)\tilde{\Omega}(n^{2/3}/d^{1/6}), where nn and n~\tilde{n} are the encoded and decoded length of the inputs, respectively, and dd is the encoded length of the LCS. We justify the use of prefix-sum oracles for two reasons. First, we note that creating the prefix-sum oracle only incurs a constant overhead in the RLE compression. Second, we show that, without the oracles, there is a Ω(n/log2n)\Omega(n/\log^2n) lower bound on the quantum query complexity of finding the LCS given two RLE strings due to a reduction of PARITY\mathsf{PARITY} to the problem. With a small modification, our algorithm also solves the longest repeated substring problem for an RLE string.

Keywords

Cite

@article{arxiv.2411.02421,
  title  = {Near-Optimal Quantum Algorithm for Finding the Longest Common Substring between Run-Length Encoded Strings},
  author = {Tzu-Ching Lee and Han-Hsuan Lin},
  journal= {arXiv preprint arXiv:2411.02421},
  year   = {2024}
}

Comments

arXiv admin note: substantial text overlap with arXiv:2310.00966

R2 v1 2026-06-28T19:47:52.612Z