6533b853fe1ef96bd12ad5d8

RESEARCH PRODUCT

Fast computation of abelian runs

Thierry LecroqÉLise Prieur-gastonTomasz KociumakaGabriele FiciArnaud Lefebvre

subject

FOS: Computer and information sciencesGeneral Computer ScienceComputationAbelian run[INFO.INFO-DS]Computer Science [cs]/Data Structures and Algorithms [cs.DS]Elementary abelian group0102 computer and information sciences02 engineering and technology01 natural sciencesRank of an abelian groupTheoretical Computer ScienceCombinatoricsComputer Science - Data Structures and Algorithms0202 electrical engineering electronic engineering information engineeringData Structures and Algorithms (cs.DS)[INFO]Computer Science [cs]Online algorithmAbelian groupComputingMilieux_MISCELLANEOUSMathematicsCombinatorics on wordDiscrete mathematicsComputer Science (all)Abelian periodText algorithm16. Peace & justiceSubstringRandomized algorithmCombinatorics on words010201 computation theory & mathematics020201 artificial intelligence & image processingComputer Science::Formal Languages and Automata Theory

description

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.

10.1016/j.tcs.2015.12.010https://hal.archives-ouvertes.fr/hal-01956124