English

On Abelian Longest Common Factor with and without RLE

Data Structures and Algorithms 2018-04-19 v1

Abstract

We consider the Abelian longest common factor problem in two scenarios: when input strings are uncompressed and are of size nn, and when the input strings are run-length encoded and their compressed representations have size at most mm. The alphabet size is denoted by σ\sigma. For the uncompressed problem, we show an o(n2)o(n^2)-time and \Oh(n)\Oh(n)-space algorithm in the case of σ=\Oh(1)\sigma=\Oh(1), making a non-trivial use of tabulation. For the RLE-compressed problem, we show two algorithms: one working in \Oh(m2σ2log3m)\Oh(m^2\sigma^2 \log^3 m) time and \Oh(m(σ2+log2m))\Oh(m (\sigma^2+\log^2 m)) space, which employs line sweep, and one that works in \Oh(m3)\Oh(m^3) time and \Oh(m)\Oh(m) space that applies in a careful way a sliding-window-based approach. The latter improves upon the previously known \Oh(nm2)\Oh(nm^2)-time and \Oh(m4)\Oh(m^4)-time algorithms that were recently developed by Sugimoto et al.\ (IWOCA 2017) and Grabowski (SPIRE 2017), respectively.

Keywords

Cite

@article{arxiv.1804.06809,
  title  = {On Abelian Longest Common Factor with and without RLE},
  author = {Szymon Grabowski and Tomasz Kociumaka and Jakub Radoszewski},
  journal= {arXiv preprint arXiv:1804.06809},
  year   = {2018}
}

Comments

Submitted to a journal

R2 v1 2026-06-23T01:27:49.473Z