Online Computation of Abelian Runs

Online Computation of Abelian Runs
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

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}$. We give an algorithm that finds all the abelian runs of period $\mathcal{P}$ in a word of length $n$ in time $O(n\times |\mathcal{P}|)$ and space $O(\sigma+|\mathcal{P}|)$.


💡 Research Summary

This paper presents a novel online algorithm for detecting all “Abelian runs” with a given Parikh vector P within a word w. An Abelian run is defined as a maximal occurrence of a substring that has an Abelian period P. An Abelian period means the substring can be factored into blocks such that all internal blocks are anagrams of each other (having the same Parikh vector P), and the prefix and suffix blocks are contained within P.

The research situates itself within the well-studied field of computing repetitions in strings, generalizing the problem to the commutative (Abelian) setting. The authors contrast their work with a prior offline algorithm by Matsuda et al., which computes all Abelian runs for all possible periods in O(n²) time and space. The key contribution of this paper is an algorithm that, for a specific Parikh vector P, finds all corresponding Abelian runs in O(n × |P|) time and O(σ + |P|) space, processing the string online (i.e., runs ending at position i-1 can be reported while processing position i).

The algorithm’s efficiency is grounded in several critical combinatorial insights. Lemma 5 establishes that at most one Abelian run with period P can start at any given position, limiting the total output. Lemma 7 shows that left-maximal Abelian substrings appear in non-decreasing order of their start positions, providing a structural property for managing candidates. Most importantly, Proposition 8 states a monotonicity property: if the Abelian period with the longest tail can be extended by a new character, then all Abelian periods with shorter tails can also be extended. This allows for early termination during candidate verification.

The algorithm, named Runs(P, w), processes the word sequentially. It maintains a circular array B that stores the starting positions of candidate Abelian substrings ending at the previous position, implicitly indexed by their tail length. For each new character at position i, the algorithm first checks if a full perfect block of period P has been completed (`P_w


Comments & Academic Discussion

Loading comments...

Leave a Comment