Simple Linear-time Repetition Factorization
Abstract
A factorization of a string of length is called a repetition factorization of if is a repetition, i.e., is a form of , where is a non-empty string, is a (possibly-empty) proper prefix of , and . Dumitran et al. [SPIRE 2015] presented an -time and space algorithm for computing an arbitrary repetition factorization of a given string of length . Their algorithm heavily relies on the Union-Find data structure on trees proposed by Gabow and Tarjan [JCSS 1985] that works in linear time on the word RAM model, and an interval stabbing data structure of Schmidt [ISAAC 2009]. In this paper, we explore more combinatorial insights into the problem, and present a simple algorithm to compute an arbitrary repetition factorization of a given string of length in time, without relying on data structures for Union-Find and interval stabbing. Our algorithm follows the approach by Inoue et al. [ToCS 2022] that computes the smallest/largest repetition factorization in time.
Cite
@article{arxiv.2408.04253,
title = {Simple Linear-time Repetition Factorization},
author = {Yuki Yonemoto and Shunsuke Inenaga},
journal= {arXiv preprint arXiv:2408.04253},
year = {2024}
}
Comments
Accepted for SPIRE 2024