Lyndon Words, the Three Squares Lemma, and Primitive Squares

Abstract

We revisit the so-called "Three Squares Lemma" by Crochemore and Rytter [Algorithmica 1995] and, using arguments based on Lyndon words, derive a more general variant which considers three overlapping squares which do not necessarily share a common prefix. We also give an improved upper bound of n2 n on the maximum number of (occurrences of) primitively rooted squares in a string of length n, also using arguments based on Lyndon words. To the best of our knowledge, the only known upper bound was n φ n ≈ 1.441n2 n, where φ is the golden ratio, reported by Fraenkel and Simpson [TCS 1999] obtained via the Three Squares Lemma.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…