Fast Computation of Abelian Runs
arXiv:1506.08518 · doi:10.1016/j.tcs.2015.12.010
Abstract
Given a word and a Parikh vector , an abelian run of period in is a maximal occurrence of a substring of having abelian period . Our main result is an online algorithm that, given a word of length over an alphabet of cardinality and a Parikh vector , returns all the abelian runs of period in in time and space , where is the norm of , i.e., the sum of its components. We also present an online algorithm that computes all the abelian runs with periods of norm in in time , for any given norm . Finally, we give an -time offline randomized algorithm for computing all the abelian runs of . Its deterministic counterpart runs in time.
To appear in Theoretical Computer Science