Testing Quasiperiodicity
Christine Awofeso, Ben Bals, Oded Lachish, Solon P. Pissis
TL;DR
This work studies testing quasiperiodicity in strings by focusing on covers of length at most $q$ and robustness to an $ abla$ distance $ abla n$. It introduces a randomized, query-based tester with input access via an oracle that runs in $O(q^3 \varepsilon^{-1} \log q)$ queries, independent of the string length $n$, and shows how the same ideas yield a simple $O(n)$-time streaming algorithm using $O(q)$ space for short covers. The results connect seeds, covers, and overlap-based constructions through gcd and conical-combination arguments, and provide rigorous correctness guarantees. Together, these contributions enable efficient verification of quasiperiodicity in both static and streaming settings, with practical implications for pattern matching on very long strings.
Abstract
A cover (or quasiperiod) of a string $S$ is a shorter string $C$ such that every position of $S$ is contained in some occurrence of $C$ as a substring. The notion of covers was introduced by Apostolico and Ehrenfeucht over 30 years ago [Theor. Comput. Sci. 1993] and it has received significant attention from the combinatorial pattern matching community. In this note, we show how to efficiently test whether $S$ admits a cover. Our tester can also be translated into a streaming algorithm.
