# On the number of squares in partial words

Vesa Halava; Tero Harju; Tomi Kärki

RAIRO - Theoretical Informatics and Applications (2010)

- Volume: 44, Issue: 1, page 125-138
- ISSN: 0988-3754

## Access Full Article

top## Abstract

top## How to cite

topHalava, Vesa, Harju, Tero, and Kärki, Tomi. "On the number of squares in partial words." RAIRO - Theoretical Informatics and Applications 44.1 (2010): 125-138. <http://eudml.org/doc/250794>.

@article{Halava2010,

abstract = {
The theorem of Fraenkel and Simpson states that the maximum number
of distinct squares that a word w of length n can contain is
less than 2n. This is based on the fact that no more than two
squares can have their last occurrences starting at the same
position. In this paper we show that the maximum number of the last
occurrences of squares per position in a partial word containing one
hole is 2k, where k is the size of the alphabet. Moreover, we
prove that the number of distinct squares in a partial word with one
hole and of length n is less than 4n, regardless of the size of
the alphabet. For binary partial words, this upper bound can be
reduced to 3n.
},

author = {Halava, Vesa, Harju, Tero, Kärki, Tomi},

journal = {RAIRO - Theoretical Informatics and Applications},

keywords = {Square; partial word; theorem of Fraenkel and Simpson.; square; theorem of Fraenkel and Simpson},

language = {eng},

month = {2},

number = {1},

pages = {125-138},

publisher = {EDP Sciences},

title = {On the number of squares in partial words},

url = {http://eudml.org/doc/250794},

volume = {44},

year = {2010},

}

TY - JOUR

AU - Halava, Vesa

AU - Harju, Tero

AU - Kärki, Tomi

TI - On the number of squares in partial words

JO - RAIRO - Theoretical Informatics and Applications

DA - 2010/2//

PB - EDP Sciences

VL - 44

IS - 1

SP - 125

EP - 138

AB -
The theorem of Fraenkel and Simpson states that the maximum number
of distinct squares that a word w of length n can contain is
less than 2n. This is based on the fact that no more than two
squares can have their last occurrences starting at the same
position. In this paper we show that the maximum number of the last
occurrences of squares per position in a partial word containing one
hole is 2k, where k is the size of the alphabet. Moreover, we
prove that the number of distinct squares in a partial word with one
hole and of length n is less than 4n, regardless of the size of
the alphabet. For binary partial words, this upper bound can be
reduced to 3n.

LA - eng

KW - Square; partial word; theorem of Fraenkel and Simpson.; square; theorem of Fraenkel and Simpson

UR - http://eudml.org/doc/250794

ER -

## References

top- J.-P. Allouche and J. Shallit, The ubiquitous Prouhet-Thue-Morse sequence, in Sequences and Their Applications: Proceedings of SETA'98, edited by C. Ding, T. Helleseth and H. Niederreiter. Springer, London (1999) 1–16. Zbl1005.11005
- J. Berstel and L. Boasson, Partial words and a theorem of Fine and Wilf. Theoret. Comput. Sci.218 (1999) 135–141. Zbl0916.68120
- F. Blanchet-Sadri, Algorithmic Combinatorics on Partial Words. Chapman & Hall/CRC Press, Boca Raton, FL (2007). Zbl1180.68205
- F. Blanchet-Sadri, R. Mercaş and G. Scott, Counting distinct squares in partial words, in Proceedings of the 12th International Conference on Automata and Formal Languages (AFL 2008), edited by E. Csuhaj-Varjú and Z. Ésik. Balatonfüred, Hungary (2008) 122–133. Also available at Zbl1199.68199URIhttp://www.uncg.edu/cmp/research/freeness/distinctsquares.pdf
- M. Crochemore and W. Rytter, Squares, cubes, and time-space efficient string searching. Algorithmica13 (1995) 405–425. Zbl0849.68044
- A.S. Fraenkel and J. Simpson, How many squares can a string contain? J. Combin. Theory Ser. A82 (1998) 112–120. Zbl0910.05001
- V. Halava, T. Harju, T. Kärki and P. Séébold, Overlap-freeness in infinite partial words. Theoret. Comput. Sci.410 (2009) 943–948. Zbl1165.68058
- V. Halava, T. Harju and T. Kärki, Square-free partial words. Inform. Process. Lett.108 (2008) 290–292. Zbl1191.68385
- L. Ilie, A simple proof that a word of length n has at most 2n distinct squares. J. Combin. Theory Ser. A112 (2005) 163–164. Zbl1088.68146
- L. Ilie, A note on the number of squares in a word. Theoret. Comput. Sci.380 (2007) 373–376. Zbl1119.68141
- M. Lothaire, Combinatorics on Words. Encyclopedia of Mathematics 17, Addison-Wesley (1983). Zbl0514.20045
- M. Lothaire, Algebraic combinatorics on words. Encyclopedia of Mathematics and its Applications 90, Cambridge University Press (2002). Zbl1001.68093
- F. Manea and R. Mercaş, Freeness of partial words. Theoret. Comput. Sci.389 (2007) 265–277. Zbl1154.68457
- A. Thue, Über unendliche Zeichenreihen. Norske Vid. Skrifter I Mat.-Nat. Kl., Christiania7 (1906) 1–22.
- A. Thue, Über die gegenseitige Lage gleicher Teile gewisser Zeichenreihen. Norske Vid. Skrifter I Mat.-Nat. Kl., Christiania1 (1912) 1–67. Zbl44.0462.01

## NotesEmbed ?

topTo embed these notes on your page include the following JavaScript code on your page where you want the notes to appear.