×

How many squares can a string contain? (English) Zbl 0910.05001

Given a word over a fixed alphabet, a square is a subword of the form \(uu= u^2\) where \(u\) is a nonempty word. Denote by \(M(n)\) the maximum number of distinct squares (not translates of each other) possible in a word of length \(n\). Given the word \(a_1a_2\cdots a_n\) let \(s_i\) be the number of squares beginning with \(a_i\) that do not appear later. The authors show \(s_i\leq 2\), \(1\leq i\leq n\), and deduce that \(M(n)< 2n\) for all \(n\). Additionally, for infinitely many \(n\) it is shown that \(M(n)= n- o(n)\). Similar results are obtained for \(P(n)\), the maximum number of distinct primitive squares (\(u\) is not of the form \(v^j\), \(j\geq 2\)) possible in a word of length \(n\).

MSC:

05A05 Permutations, words, matrices
11B75 Other combinatorial number theory
68R15 Combinatorics on words

Keywords:

word; square
PDFBibTeX XMLCite
Full Text: DOI Link

References:

[1] Crochemore, M., An optimal algorithm for computing the repetitions in a word, Inform. Process. Lett., 12, 244-250 (1981) · Zbl 0467.68075
[2] Crochemore, M.; Rytter, W., Text Algorithms (1994), Oxford Univ. Press: Oxford Univ. Press New York · Zbl 0844.68101
[3] Crochemore, M.; Rytter, W., Squares, cubes, and time-space efficient string searching, Algorithmica, 13, 405-425 (1995) · Zbl 0849.68044
[4] Entringer, R.; Jackson, D.; Schatz, J., On nonrepetitive sequences, J. Combin. Theory. Ser. A, 16, 159-164 (1974) · Zbl 0279.05001
[5] Fine, N. J.; Wilf, H. S., Uniqueness theorems for periodic functions, Proc. Amer. Math. Soc., 16, 109-114 (1965) · Zbl 0131.30203
[6] Fraenkel, A. S.; Simpson, R. J., How many squares must a binary sequence contain?, Electron. J. Combin., 2 (1995) · Zbl 0816.11007
[7] A. S. Fraenkel, R. J. Simpson, The exact number of squares in Fibonacci words; A. S. Fraenkel, R. J. Simpson, The exact number of squares in Fibonacci words · Zbl 1303.68098
[8] Lothaire, M., Combinatorics on Words (1983), Addison-Wesley: Addison-Wesley Reading · Zbl 0514.20045
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.