How many double squares can a string contain?
Antoine Deza, Frantisek Franek, and Adrien Thierry

TL;DR
This paper investigates the maximum number of distinct squares in a string, improving the upper bound from previous results by analyzing the structure of double squares.
Contribution
It introduces a new upper bound of 5n/3 for the number of distinct squares and provides a structural analysis of double squares, offering a novel proof of earlier bounds.
Findings
A string of length n contains at most 5n/3 distinct squares.
A string of length n contains at most 2n/3 double squares.
The structural properties of double squares lead to a new proof of existing bounds.
Abstract
Counting the types of squares rather than their occurrences, we consider the problem of bounding the number of distinct squares in a string. Fraenkel and Simpson showed in 1998 that a string of length n contains at most 2n distinct squares. Ilie presented in 2007 an asymptotic upper bound of 2n - Theta(log n). We show that a string of length n contains at most 5n/3 distinct squares. This new upper bound is obtained by investigating the combinatorial structure of double squares and showing that a string of length n contains at most 2n/3 double squares. In addition, the established structural properties provide a novel proof of Fraenkel and Simpson's result.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · semigroups and automata theory · Coding theory and cryptography
