A Frameless 2-Coloring of the Plane Lattice

05/19/2020 ∙ by Craig S. Kaplan, et al. ∙ University of Waterloo 0

A picture frame in two dimensions is a rectangular array of symbols, with at least two rows and columns, where the first and last rows are identical, and the first and last columns are identical. If a coloring of the plane lattice has no picture frames, we call it frameless. In this note we show how to create a simple 2-coloring of the plane lattice that is frameless.



There are no comments yet.


page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

A classic problem from combinatorics on words is the avoidance of overlaps. An overlap is a word of the form , where is a single symbol and is a (possibly empty) word. The English word alfalfa, for example, forms an overlap with and . The Norwegian mathematician Axel Thue (1863–1922) proved that there exists a (one-sided) infinite word over a binary alphabet that contains no overlaps. His classic paper, in German, was published in 1912 in an obscure Norwegian journal [12]. Thankfully, an English translation is available [4].

Today the word that Thue produced is called the Thue-Morse word, and is often abbreviated . Its first few terms are

The Thue-Morse word has many equivalent definitions [1], but the following three are the most important:

  • is the number of bits, taken modulo , in the binary representation of .

  • is the limit of , where is the morphism defined by and , and the exponent on denotes -fold composition of morphisms. This limit is well-defined since starts with , implying that is a prefix of for all , and is written as .

  • There is a finite automaton of two states, which given expressed in base as an input, computes . This means that is a -automatic sequence [2, 10].

Thue’s original proof was neither very difficult nor very simple. Today, however, however, theorem-proving software can easily prove his result in less than a second. The idea is as follows: we write a predicate in first-order logic that asserts that is overlap-free. We then type this predicate into Walnut, software written by Hamoon Mousavi that can prove or disprove any suitable predicate concerning automatic sequences [9], and read the result.

If has an overlap , then there exist integers and such that for . So the nonexistence of overlaps is specified by the predicate

A Walnut variable T encodes the Thue-Morse word. We can translate the predicate above into a Walnut query named tmpred as follows:

eval tmpred "A i,n (n >= 1) => (Ej j<=n & T[i+j] != T[i+n+j])":

Walnut evaluates this predicate as true, which we can take as proof that the Thue-Morse word is overlap-free! (We don’t have to include and in our Walnut predicate because the domain of variables in its predicates is assumed to be by default.)

Today, the field of pattern avoidance in words is extremely broad and dynamic, with many generalizations: avoidance in circular words [5], two-dimensional words [3], graphs [8], and so forth.

Thue himself proved a generalization of his result to “two-sided” infinite words. These are maps from to a finite alphabet . We can turn a “right-infinite” infinite word into a “left-infinite” word with the reversal operator, which is denoted by an exponent of . And we can concatenate a left-infinite word to a right-infinite word to produce a two-sided infinite word. Thue proved

Theorem 1.

The two-sided infinite word is overlap-free.


Recall that a morphism is a map from words to words that obeys the rule for all words .

Let be the morphism defined by and . An easy induction shows that gives the last bits of . Similarly, another easy induction shows that . So the “central” bits of , that is, the word , equals . But

which since , appears in and hence is overlap-free. ∎

Thue’s two-sided infinite word can alternatively be defined simply by extending the domain of as follows: if is negative, then set


Then .

In this note we give a surprising example of pattern avoidance in the plane lattice . Although our result can be stated in the language of two-dimensional words, here it seems somehow more natural to use the language of colorings instead. A coloring of the plane lattice is a map into a finite alphabet , where the elements of are called colors. If the number of elements of is , we call a -coloring.

The particular kind of pattern we avoid is called a “picture frame”, or just “frame” for short. A picture frame is a finite rectangular array of points in the plane lattice, with at least two rows and columns, such that the first row equals the last row, and the first column equals the last column. The following diagram illustrates part of a plane coloring having a picture frame in it. In this case the alphabet consists of English letters, and the highlighted frame is bordered by the horizontal word ERMINE and the vertical word EWE.

Now the following natural question occurs: is there a -coloring of the plane lattice containing no picture frames at all? We might call such a coloring frameless.

At first, one might suspect the answer is no, since that is the case for the one-dimensional analogue of picture frames. The one-dimensional analogue is a word of the form , where is a single letter, over a -letter alphabet. By the pigeonhole principle, every word of length at least contains a repeated letter, and hence a word of the form . So there are no infinite words without -dimensional picture frames. Furthermore, the four corners of a two-dimensional picture frame must all contain the same symbol, and we know that for any finite alphabet, rectangles (in fact, squares) of identical symbols must occur in any sufficiently large region of the plane [6].

In this note we prove the following result:

Theorem 2.

There exists a frameless -coloring of the infinite plane lattice.

2 The coloring and the proof

We start by proving the result for the quarter plane .

Theorem 3.

For define the coloring by , where is the Thue-Morse sequence. Then is a frameless -coloring of .

Here are the first few rows and columns of this coloring, where is denoted by a white square and by a black square. The coloring is easily seen to consist of shifted copies of the one-dimensional Thue-Morse word.

Figure 1: Portion of a frameless 2-coloring

There are at least two ways to prove the result. One uses the theorem-proving software Walnut again:


Let us write a first-order statement for the nonexistence of a picture frame in :

Using the fact that , this can be translated into Walnut as follows:
eval frameless "~( E m,n,p,q (p>=1) & (q>=1) &

(Ai (i<=q) => T[m+n+i]=T[m+p+n+i]) & (Aj (j<=p) => T[m+j+n]=T[m+j+n+q]))":

Evaluating this statement in Walnut gives the response true, and requires less than a second of CPU time on a laptop. ∎

Alternatively, we can prove Theorem 3 directly. We use the abbreviation to denote the rectangular block with rows from to and columns from to .


Suppose there exist such that and and . Then, since , we have

where . Without loss of generality, assume . But then is an overlap, a contradiction. ∎

There’s another way to view this result, using the notion of two-dimensional morphisms. These are morphisms that replace each letter by a rectangular block of letters [11]. If is a matrix, and is an matrix, then is a matrix.

Now consider the two-dimensional morphism defined as follows:

and the coding defined by .

Theorem 4.

is given by .


(Sketch) The basic idea is that if we have the values of and , for , then the values of for can be computed as follows:

where the bar indicates binary complement ( and ). ∎

Let’s look at the first few iterates, and their images under :

The arrays in the second line form larger and larger portions of the upper left corner of the array in Figure 1.

3 Extending our coloring to the whole plane

Now that we have a coloring of , we can extend it to as follows, and prove this explicit version of Theorem 2.

Theorem . Using the extended definition of given in Eq. (1), define for . Then is frameless.


Exactly the same as the proof of Theorem 3, using the fact that the two-sided infinite word is overlap-free. ∎

A slightly different example can be given using the matrix-valued morphism and the coding defined in Section 2. To do so, we start with the array and consider the center of the array to be a point from which all four quarter-planes extend outward, as in the figure:

Figure 2: Iterating a -D morphism to cover the plane

We then want to iterate on each block. In order for this procedure to work, we would need the image of each letter to match the letter in the corresponding corner:

  • should appear in the lower right of its image;

  • should appear in the upper right and lower left of its image; and

  • should appear in the upper left of its image.

These properties do not hold for . But they do hold for  !:

Applying to gives

Hence, by iterating infinitely, and then applying , we get a -coloring of the entire plane with the desired property.

4 Connection to aperiodic tilings

A periodic tiling is a tiling of the plane that has two linearly independent translation symmetries. That is, there are two directions in which you can slide the tiling and have the tiles line up perfectly with translated copies. A set of shapes is called aperiodic when they admit tilings of the plane, but none that are periodic. Non-periodic tilings are not necessarily interesting of their own accord, because they might be constructed from shapes that can trivially be rearranged into periodic tilings. The interesting case is when the shapes themselves force long-range aperiodicity, which is why aperiodicity is a property ascribed to the shapes, known as prototiles. The most famous aperiodic tile sets are those discovered independently by Penrose and Ammann [7].

Consider a tiling whose prototiles are polyominoes (unit squares glued together along their edges). Every member of the set appears in one of (at most) eight rotated and reflected orientations in the tiling. Assign the integers to the squares that make up all prototiles; then every cell in a tiling from those prototiles can be given a label from , describing the identity and orientation of the prototile square covering that cell. In other words, a tiling by polyominoes is also a coloring of the plane lattice. The figure shows two annotated prototiles on the left, and a portion of a tiling/coloring on the right.

We know that there exist aperiodic sets of polyominoes—Winslow offers one example adapted from an earlier tiling by Ammann [13]. The existence of such prototiles suggests an indirect proof that frameless colorings of the plane lattice must exist. Consider a coloring constructed by applying the labelling method above to a tiling by an aperiodic set of polyominoes. If a frame existed in such a coloring, we would be able to repeat it in a rectangular arrangement, with adjacent horizontal and vertical copies overlapping by one column and one row, respectively. The periodic coloring thus obtained would imply a periodic tiling by the original polyominoes, contradicting the assumption that they were aperiodic.


  • [1] J.-P. Allouche and J. O. Shallit, The ubiquitous Prouhet-Thue-Morse sequence. In C. Ding, T. Helleseth, and H. Niederreiter, editors, Sequences and Their Applications, Proceedings of SETA ’98, pp. 1–16. Springer-Verlag, 1999.
  • [2] J.-P. Allouche and J. O. Shallit, Automatic Sequences, Cambridge University Press, 2003.
  • [3] D. A. Bean, A. Ehrenfeucht, and G. McNulty, Avoidable patterns in strings of symbols, Pacific J. Math. 85 (1979), 261–294.
  • [4] J. Berstel, Axel Thue’s Papers on Repetitions in Words: a Translation, number 20 in Publications du Laboratoire de Combinatoire et d’Informatique Mathématique, Université du Québec à Montréal, February 1995.
  • [5] J. D. Currie, Pattern avoidance: themes and variations, Theoret. Comput. Sci. 339 (2005), 7–18.
  • [6] Ronald L. Graham, Bruce L. Rothschild, and Joel H. Spencer, Ramsey Theory, Wiley, second edition, 1990.
  • [7] Branko Grünbaum and G. C. Shephard, Tilings and Patterns, Dover, second edition, 2016.
  • [8] J. Grytczuk, Pattern avoidance on graphs, Discrete Math. 307 (2007), 1341–1346.
  • [9] H. Mousavi, Automatic theorem proving in Walnut. Available at http://arxiv.org/abs/1603.06017, 2016.
  • [10] E. Rowland, What is an automatic sequence?, Notices Amer. Math. Soc. 62(3) (2015), 274–276.
  • [11] J. O. Shallit and J. Stolfi, Two methods for generating fractals, Computers and Graphics 13 (1989), 185–191.
  • [12] A. Thue, Über die gegenseitige Lage gleicher Teile gewisser Zeichenreihen, Norske vid. Selsk. Skr. Mat. Nat. Kl. 1 (1912), 1–67. Reprinted in Selected Mathematical Papers of Axel Thue, T. Nagell, editor, Universitetsforlaget, Oslo, 1977, pp. 413–478.
  • [13] Andrew Winslow, Some open problems in polyomino tilings. In Mizuho Hoshi and Shinnosuke Seki, editors, Developments in Language Theory, DLT 2018, pp. 74–82. Springer International Publishing, Cham, 2018.