Skip to Main content Skip to Navigation
Journal articles

Fast computation of abelian runs

Abstract : Given a word $w$ and a Parikh vector $\mathcal{P}$, an abelian run of period $\mathcal{P}$ in $w$ is a maximal occurrence of a substring of $w$ having abelian period $\mathcal{P}$. Our main result is an online algorithm that, given a word $w$ of length $n$ over an alphabet of cardinality $\sigma$ and a Parikh vector $\mathcal{P}$, returns all the abelian runs of period $\mathcal{P}$ in $w$ in time $O(n)$ and space $O(\sigma+p)$, where $p$ is the norm of $\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 $p$ in $w$ in time $O(np)$, for any given norm $p$. Finally, we give an $O(n^2)$-time offline randomized algorithm for computing all the abelian runs of $w$. Its deterministic counterpart runs in $O(n^2\log\sigma)$ time.
Complete list of metadata

https://hal.archives-ouvertes.fr/hal-01956124
Contributor : Thierry Lecroq Connect in order to contact the contributor
Submitted on : Friday, December 14, 2018 - 9:07:14 PM
Last modification on : Wednesday, March 2, 2022 - 10:10:10 AM

Links full text

Identifiers

Citation

Gabriele Fici, Tomasz Kociumaka, Thierry Lecroq, Arnaud Lefebvre, Elise Prieur-Gaston. Fast computation of abelian runs. Theoretical Computer Science, Elsevier, 2016, 656, pp.256-264. ⟨10.1016/j.tcs.2015.12.010⟩. ⟨hal-01956124⟩

Share

Metrics

Record views

23