English

Fast Computation of Abelian Runs

Data Structures and Algorithms 2017-01-02 v2

Abstract

Given a word ww and a Parikh vector P\mathcal{P}, an abelian run of period P\mathcal{P} in ww is a maximal occurrence of a substring of ww having abelian period P\mathcal{P}. Our main result is an online algorithm that, given a word ww of length nn over an alphabet of cardinality σ\sigma and a Parikh vector P\mathcal{P}, returns all the abelian runs of period P\mathcal{P} in ww in time O(n)O(n) and space O(σ+p)O(\sigma+p), where pp is the norm of P\mathcal{P}, i.e., the sum of its components. We also present an online algorithm that computes all the abelian runs with periods of norm pp in ww in time O(np)O(np), for any given norm pp. Finally, we give an O(n2)O(n^2)-time offline randomized algorithm for computing all the abelian runs of ww. Its deterministic counterpart runs in O(n2logσ)O(n^2\log\sigma) time.

Keywords

Cite

@article{arxiv.1506.08518,
  title  = {Fast Computation of Abelian Runs},
  author = {Gabriele Fici and Tomasz Kociumaka and Thierry Lecroq and Arnaud Lefebvre and Elise Prieur-Gaston},
  journal= {arXiv preprint arXiv:1506.08518},
  year   = {2017}
}

Comments

To appear in Theoretical Computer Science