There is wikipedia page about square-free words, and there are a lot of theorems about these words, and examples of infinite square-free words.

I am wondering: why are we interested in these words?

Are there real-life applications of these words? Why are square-free words more useful to consider than other words?

  • $\begingroup$ In any Wikipedia page, a good start for further research is consulting its references. Have you looked up the works listed there? Were none of them useful? $\endgroup$
    – dkaeae
    Feb 21, 2019 at 15:00
  • 3
    $\begingroup$ The study of pure mathematics is not usually motivated by real-life applications. $\endgroup$ Feb 21, 2019 at 15:04
  • 1
    $\begingroup$ Real-life? Hmm, what is that? Is entertainment part of real life? Is entertainment of the mind part of entertainment? $\endgroup$
    – John L.
    Feb 21, 2019 at 17:03
  • $\begingroup$ Because there aren't any for most alphabets? It's a curiosity. $\endgroup$
    – Raphael
    Feb 21, 2019 at 19:21

2 Answers 2


Well, take a moment to reflect. Is a word or a string one of the most important and most common entities in this world? What are the most basic properties of a word or string?

  • its alphabet
  • its length
  • its sound
  • its meaning
  • its syntax or grammar
  • its origin
  • its usage as how to form sentences.
  • hmm, does it repeat part of itself? Or never (square-free)?

It looks like the property of being square-free is almost a fundamental property of a word (or a phrase, or a sentence).

In fact, it is amazing to me that the formal study of square-free words has not made it way into most of textbooks about the theory of automata and computation. It appears that the study of square-free words turns out to be a rather isolated field with less impact.

Nevertheless, the study of square-free words and related concepts is interesting and fruitful, as you have observed. I am, for one, charmed by the square-free words of infinite length over three letters 1.

"Real-life" application related to square-free words are sparse indeed. Abelian square-free words in algorithmic music by Laakso, T. might count as one; however, I cannot find that paper. (Gefwert, C., Orponen, P., Seppänen, J. (eds.) Logic, Mathematics and the Computer, vol. 14, pp. 292–297. Finnish Artificial Intelligence Society, Symposiosarja, Hakapaino, Helsinki).

Here are two related exercise to entertain your mind.

An abelian square is a subsequence of the form $s_1s_2$ where $s_2$ is a permutation of $s_1$. For example, $abcbac$ is an abelian square since $bac$ is a permutation of $abc$.

Exercise 1. (easy) Let the alphabet consist of 3 letters. Show a word of length 7 that is free of abelian square. Show that every word of length eight contains an abelian square.

Exercise 2. (very very hard) There is an infinite abelian-square-free word over an alphabet of size four.

  • $\begingroup$ Thank you very much for your answer. I like this persepective a lot and it makes more sens to me why we care about square-free words. Also thank you for the exercises ! I think I have a solution for the first one : the word : abacaba is of length $7$ and is free abelian. Now let's suppose by contradiction that we found a free abelian word $v$ of length $8$ over the alphabet $\{a,b,c\}$. Then if we write $v = xy$ where $\mid x \mid = \mid y \mid = 4$ then it means that there is a letter in $x$ that is not in $y$ or the contrary. But then $x$ or $y$ is only made of $2$ distincts letters. $\endgroup$
    – user100779
    Feb 21, 2019 at 22:42
  • $\begingroup$ This is impossible since every word of length $4$ over an alphabet of length $2$ is clearly never free-abelian. $\endgroup$
    – user100779
    Feb 21, 2019 at 22:42

Under related concepts on the wiki page for square-free we find the notion of cube-free words. An example of such words is the (Prouhet-)Thue-Morse sequence. Which has a very real-life application.

The sequence has been discovered independently many times, not always by professional research mathematicians; for example, Max Euwe, a chess grandmaster, who held the World Championship title from 1935 to 1937, and mathematics teacher, discovered it in 1929 in an application to chess: by using its cube-free property (see above), he showed how to circumvent a rule aimed at preventing infinitely protracted games by declaring repetition of moves a draw.

  • $\begingroup$ Thank you very much for your answer. This is indeed a nice application. $\endgroup$
    – user100779
    Feb 21, 2019 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.