Abstract
In this paper we study colorings (or tilings) of the twodimensional grid \({\mathbb {Z}}^{2}\). A coloring is said to be valid with respect to a set P of n × m rectangular patterns if all n × m subpatterns of the coloring are in P. A coloring c is said to be of low complexity with respect to a rectangle if there exist \(m,n\in \mathbb {N}\) and a set P of n × m rectangular patterns such that c is valid with respect to P and P≤ nm. Open since it was stated in 1997, Nivat’s conjecture states that such a coloring is necessarily periodic. If Nivat’s conjecture is true, all valid colorings with respect to P such that P≤ mn must be periodic. We prove that there exists at least one periodic coloring among the valid ones. We use this result to investigate the tiling problem, also known as the domino problem, which is well known to be undecidable in its full generality. However, we show that it is decidable in the lowcomplexity setting. Then, we use our result to show that Nivat’s conjecture holds for uniformly recurrent configurations. These results also extend to other convex shapes in place of the rectangle. After that, we prove that the nm bound is multiplicatively optimal for the decidability of the domino problem, as for all ε > 0 it is undecidable to determine if there exists a valid coloring for a given \(m,n\in \mathbb {N}\) and set of rectangular patterns P of size n × m such that P≤ (1 + ε)nm. We prove a slightly better bound in the case where m = n, as well as constructing aperiodic SFTs of pretty low complexity. This paper is an extended version of a paper published in STACS 2020 (Kari and Moutot 12).
1 Introduction
The tiling problem, also known as the domino problem, asks whether the twodimensional grid \({\mathbb {Z}}^{2}\) can be colored in a way that avoids a given finite collection of forbidden local patterns. The problem is undecidable in its full generality. The undecidability relies on the fact that there are aperiodic systems of forbidden patterns that enforce any valid coloring to be nonperiodic [2].
An example of such systems are Wang tiles: square tiles with colored edges that can be placed next to each other if their abutting edge are matching. In other words the forbidden patterns are all pairs of tiles with nonmatching edges. A set of tiles is called aperiodic if all its valid tilings are non periodic. In this context, the minimum size of the alphabet (or number of tiles) for a tileset to be aperiodic is know to be 11 [9]. However, if instead of the number of tiles we are interested in the number of local patterns that can appear in the tilings, we do not know what is the minimal number (or function) that gives an aperiodic SFT.
In this paper we first consider the low complexity setup where the number of allowed local patterns is small. More precisely, suppose we are given at most nm legal rectangular patterns of size n × m, and we want to know whether there exists a coloring of \(\mathbb {Z}^{2}\) containing only legal n × m patterns. We prove that if such a coloring exists then also a periodic coloring exists (Corollary 6). This further implies, using standard arguments, that in this setup there is an algorithm to determine if the given patterns admit at least one coloring of the grid (Corollary 7). The results also extend to other convex shapes in place of the rectangle (see Section 7).
Then, we investigate what can happen if the complexity slightly increases. In order to better understand the boundaries of the undecidability of the domino problem in terms of pattern complexity, we consider what we call the pretty low complexity case, where we prove that the domino problem becomes undecidable again for several bounds on the size of the set of allowed patterns. This pretty low complexity setting was introduced in [10]. We show that the previous nm bound is multiplicatively optimal, that is that for all ε > 0, it is undecidable to determine whether it is possible to color a biinfinite grid only using patterns from a given set of at most (1 + ε)nm allowed patterns of size n × m. In the case where m = n, we prove a slightly better bound where (1 + ε)nm is replaced with n^{2} + f(n)n with \(f:\mathbb {N}\rightarrow \mathbb {N}\) any unbounded computable function (Corollary 11). We also obtain a construction of pretty low aperiodic SFTs (Corollary 12).
We believe the low complexity setting has relevant applications. There are numerous examples of processes in physics, chemistry and biology where macroscopic patterns and regularities arise from simple microscopic interactions. Formation of crystals and quasicrystals is a good example where physical laws govern locally the attachments of particles to each other. Predicting the structure of the crystal from its chemical composition is a notoriously difficult problem (as already implied by the undecidability of the tiling problem) but if the number of distinct local patterns of particle attachments is sufficiently low, our results indicate that the situation may be easier to handle. For a good reference on quasicrystal and aperiodic order, see [1].
Our work is also motivated by Nivat’s conjecture [14], an open problem concerning periodicity in low complexity colorings of the grid. The conjecture claims the following: if a coloring of \(\mathbb {Z}^{2}\) is such that, for some \(n,m\in \mathbb {N}\), the number of distinct n × m patterns is at most nm, then the coloring is necessarily periodic in some direction. If true, this conjecture directly implies a strong form of our periodicity result: in the low complexity setting, not only a coloring exists that is periodic, but in fact all valid colorings are periodic. Our contribution to Nivat’s conjecture is that we show that under the hypotheses of the conjecture, the coloring must contain arbitrarily large periodic regions (Theorem 5).
2 Preliminaries
We denote \(\llbracket n,m \rrbracket =\{n,n+1,{\dots } ,m\}\) for integers n ≤ m, and for any positive integer n we set ⟦n⟧ = ⟦0,n − 1⟧. We index the columns and rows of the n × m rectangle ⟦n⟧×⟦m⟧ by \(0,{\dots } ,n1\) and \(0,{\dots } ,m1\), respectively. The n × m rectangle at position \(\mathbf {u}\in \mathbb {Z}^{2}\) of the twodimensional grid is \(\mathbf {u}+\llbracket n\rrbracket \times \llbracket m\rrbracket \subseteq {\mathbb {Z}}^{2}\).
Let A be a finite alphabet. A coloring \(c\in A^{{\mathbb {Z}}^{2}}\) of the twodimensional grid \({\mathbb {Z}}^{2}\) with elements of A is called a (twodimensional) configuration. We use the notation c_{n} for the color c(n) ∈ A of cell \(\mathbf {n}\in \mathbb {Z}^{2}\). For any \(\mathbf {t}\in \mathbb {Z}^{2}\), the translation \(\tau ^{\mathbf {t}}:A^{\mathbb {Z}^{2}}\longrightarrow A^{\mathbb {Z}^{2}}\) by t is defined by τ^{t}(c)_{n} = c_{n−t}, for all \(c\in A^{\mathbb {Z}^{2}}\) and all \(\mathbf {n}\in \mathbb {Z}^{2}\). If τ^{t}(c) = c for a nonzero \(\mathbf {t}\in \mathbb {Z}^{2}\), we say that c is periodic and that t is a vector of periodicity. If there are two linearly independent vectors of periodicity then c is twoperiodic, and in this case there are horizontal and vertical vectors of periodicity (k,0) and (0,k) for some k > 0, and consequently a vector of periodicity in every rational direction.
A finite pattern is a coloring p ∈ A^{D} of some finite domain \(D\subset {\mathbb {Z}}^{d}\). For a fixed D, we call such p also a Dpattern. The set \([p]=\{c\in A^{\mathbb {Z}^{2}}\ \ c_{D}=p\}\) of configurations that contain pattern p in domain D is the cylinder determined by p. We say that a pattern p appears in configuration c, or that c contains pattern p, if some translate τ^{t}(c) of c is in [p]. For a fixed finite D, the set of Dpatterns that appear in a configuration c is denoted by \({\mathscr{L}}_{D}({c})\), that is,
We denote by \({\mathscr{L}}(c)\) the set of all finite patterns that appear in c, i.e., the union of \({{\mathscr{L}}_{D}(c)}\) over all finite \(D\subseteq {\mathbb {Z}}^{2}\).
We say that c has low complexity with respect to shape D if \({{\mathscr{L}}_{D}(c)}\leq D\), and we call c a low complexity configuration if it has low complexity with respect to some finite D.
Conjecture 1 (Maurice Nivat 1997 [14])
Let \(c\in A^{{\mathbb {Z}}^{2}}\) be a twodimensional configuration. If c has low complexity with respect to some rectangle D = ⟦n⟧×⟦m⟧ then c is periodic.
The analogous claim in dimensions higher than two fails, as does an analogous claim in two dimensions for many shapes other than rectangles [6].
2.1 Algebraic Concepts
Kari and Szabados introduced in [13] an algebraic approach to study low complexity configurations. The present paper heavily relies on this technique. In this approach we replace the colors in A by distinct integers, so that we assume \(A\subseteq \mathbb {Z}\). We then express a configuration \(c\in A^{\mathbb {Z}^{2}}\) as a formal power series c(x,y) over two variables x and y in which the coefficient of monomial x^{i}y^{j} is c_{i,j}, for all \(i,j\in \mathbb {Z}\). Note that the exponents of the variables range from \(\infty \) to \(+\infty \). Note also that variables x and y in our power series and polynomials are treated only as “position indicators”: in this work we never plug in any values to the variables. In the following, polynomials may have negative powers of variables, that is, the polynomials we consider here and in the following are Laurent polynomials. Let us denote by \(\mathbb {Z}\left [x^{\pm 1}, y^{\pm 1}\right ]\) and \(\mathbb {Z}\left [\left [x^{\pm 1}, y^{\pm 1}\right ]\right ]\) the sets of such polynomials and power series, respectively. We call a power series \(c\in \mathbb {Z}\left [\left [x^{\pm 1}, y^{\pm 1}\right ]\right ]\) finitary if its coefficients take only finitely many different values. Since we color the grid using finitely many colors, configurations are identified with finitary power series.
Multiplying a configuration \(c\in {\mathbb {Z}}\left [\left [x^{\pm 1}, y^{\pm 1}\right ]\right ]\) by a monomial corresponds to translating it, and the periodicity of the configuration by vector t = (n,m) is then equivalent to \(\left (x^{n}y^{m}1\right )c=0\), the zero power series. More generally, we say that a polynomial \(f\in \mathbb {Z}\left [x^{\pm 1}, y^{\pm 1}\right ]\) annihilates power series c if the formal product fc is the zero power series.
The set of polynomials that annihilates a power series is a Laurent polynomial ideal, and is denoted by
It was observed in [13] that if a configuration has low complexity with respect to some shape D then it is annihilated by some nonzero polynomial f≠ 0.
Lemma 1
[13] Let \(c\in {\mathbb {Z}}\left [\left [x^{\pm 1}, y^{\pm 1}\right ]\right ]\) be a low complexity configuration. Then Ann(c) contains a nonzero polynomial.
One of the main results of [13] states that if a configuration c is annihilated by a nonzero polynomial then it has annihilators of particularly nice form:
Theorem 2
[13] Let \(c\in {\mathbb {Z}}\left [\left [x^{\pm 1}, y^{\pm 1}\right ]\right ]\) be a configuration (a finitary power series) annihilated by some nonzero polynomial. Then there exist pairwise linearly independent \((i_{1}, j_{1}), \ldots , (i_{m}, j_{m})\in \mathbb {Z}^{2}\) such that
Note that both Lemma 1 and Theorem 2 were proved in [13] for configurations \(c\in A^{\mathbb {Z}^{d}}\) in arbitrary dimension d. In this work we only deal with twodimensional configurations, so above we stated these results for d = 2.
If \(X\subseteq A^{{\mathbb {Z}}^{2}}\) is a set of configurations, we denote by Ann(X) the set of Laurent polynomials that annihilate all elements of X. We call Ann(X) the annihilator ideal of X.
2.2 Dynamical Systems Concepts
Cylinders [p] are a base of a compact topology on \(A^{{\mathbb {Z}}^{2}}\), namely the product of discrete topologies on A. See, for example, the first few pages of [7]. The topology is equivalently defined by a metric on \(A^{\mathbb {Z}^{2}}\) where two configurations are close to each other if they agree with each other on a large region around cell 0.
A subset X of \(A^{{\mathbb {Z}}^{2}}\) is a subshift if it is closed in the topology and closed under translations. Equivalently, every configuration c that is not in X contains a finite pattern p that prevents it from being in X: no configuration that contains p is in X. We can then define subshifts using forbidden patterns as well: for a set F of finite patterns, define
the set of configurations that avoid all patterns in F. A set X_{F} is a subshift, and every subshift is X_{F} for some F. If X = X_{F} for some finite F then X is a subshift of finite type (SFT). For a subshift \(X\subseteq A^{\mathbb {Z}^{2}}\) we denote by \({\mathscr{L}}_{D}({X})=\cup _{c\in X} {\mathscr{L}}_{D}({c})\) and \({\mathscr{L}}({X})=\cup _{c\in X} {\mathscr{L}}({c})\) the sets of Dpatterns and all finite patterns that appear in elements of X, respectively. Set \({\mathscr{L}}({X})\) is called the language of the subshift.
Subshifts of finite type can be defined in terms of allowed patterns as well. To do so we fix a finite domain \(D\subseteq \mathbb {Z}^{2}\), and take a set \(P\subseteq A^{D}\) of allowed patterns with domain D. Forbidding all other Dpatterns yields the SFT
the set of configurations whose Dpatterns are among P. We call elements of \(\mathcal {V}(P)\) valid configurations for P.
We call an SFT aperiodic if it is nonempty but does not contain any periodic configurations.
The tiling problem (aka the domino problem) is the decision problem that asks whether a given SFT is empty, that is, whether there exists a configuration avoiding a given finite collection P of forbidden finite patterns. Usually this question is asked in terms of socalled Wang tiles, but our formulation is equivalent. The tiling problem is undecidable [2]. An SFT is called aperiodic if it is nonempty but does not contain any periodic configurations. It is significant that aperiodic SFTs exist [2], and in fact they must exist because of the undecidability of the tiling problem [19]. We recall the reason for this fact in the proof of Corollary 7. It is also worth noting that a twodimensional SFT that contains a periodic configuration must also contain a twoperiodic configuration [15].
Convergence of a sequence c^{(1)},c^{(2)},… of configurations to a configuration c in our topology has the following simple meaning: For every cell \(\mathbf {n}\in \mathbb {Z}^{2}\) we must have \(c^{(i)}_{\mathbf {n}} = c_{\mathbf {n}}\) for all sufficiently large i. As usual, we denote then \(c=\lim _{i\rightarrow \infty } c^{(i)}\). Note that if all c^{(i)} are in a subshift X, so is the limit. Compactness of space \(A^{\mathbb {Z}^{2}}\) means that every sequence has a converging subsequence. In the proof of Theorem 4 in Section 4 we frequently use this fact and extract converging subsequences from sequences of configurations.
The orbit of configuration c is the set \(\mathcal {O}(c) = \left \{\tau ^{\mathbf {t}}(c)\ \ \mathbf {t}\in {\mathbb {Z}}^{2} \right \}\) that contains all translates of c. The orbit closure \(\overline {\mathcal {O}(c)}\) of c is the topological closure of the orbit \(\mathcal {O}(c)\). It is a subshift, and in fact it is the intersection of all subshifts that contain c. The orbit closure \(\overline {\mathcal {O}(c)}\) can hence be called the subshift generated by c. In terms of finite patterns, \(c^{\prime }\in \overline {\mathcal {O}(c)}\) if and only if every finite pattern that appears in \(c^{\prime }\) appears also in c. \(\overline {\mathcal {O}(c)}\) can be seen as the subshift containing all the translates of c (its orbit) and all the limits of those translates. Thus it can be different of \(\mathcal {O}(c)\): if c is the configuration that with a black cell at the origin and white everywhere else, all the configurations of its orbit will contain a black cell, but at different positions; however its orbit closure contains the configuration with only white cells, as it is a limit of translations of c.
A configuration c is called uniformly recurrent if for every \(c^{\prime }\in \overline {\mathcal {O}(c)}\) we have \(\overline {\mathcal {O}(c^{\prime })} = \overline {\mathcal {O}(c)}\). This is equivalent to \(\overline {\mathcal {O}(c)}\) being a minimal subshift in the sense that it has no proper nonempty subshifts inside it. A classical result by Birkhoff [4] implies that every nonempty subshift contains a minimal subshift, so there is a uniformly recurrent configuration in every nonempty subshift.
We use the notation 〈x,y〉 for the inner product of vectors \(\mathbf {x},\mathbf {y}\in {\mathbb {Z}}^{2}\). For a nonzero vector \(\mathbf {u}\in \mathbb {Z}^{2}\setminus \{\mathbf {0}\}\) we denote
for the discrete half plane in direction u. See Fig. 1(a) for an illustration. A subshift X is deterministic in direction u if for all \(c,c^{\prime }\in X\)
that is, if the contents of a configuration in the half plane H_{u} uniquely determines the contents in the rest of the cells. Note that it is enough to verify that the value c_{0} on the boundary of the half plane is uniquely determined. Indeed, if \(c_{H_{\mathbf {u}}}\) uniquely determines the line at its boundary, it is also true for all the translations of c, so the next line is also uniquely determined. By repeating this process the whole configuration is determined by \(c_{H_{\mathbf {u}}}\). Moreover, by compactness, determinism in direction u implies that there is a finite number k such that already the contents of a configuration in the discrete box
are enough to uniquely determine the contents in cell 0, where we denote by u^{⊥} a vector that is orthogonal to u and has the same length as u, e.g., (n,m)^{⊥} = (m,−n). See Fig. 1(b) for an illustration.
If X is deterministic in directions u and −u we say that u is a direction of twosided determinism. If X is deterministic in direction u but not in direction −u we say that u is a direction of onesided determinism. Directions of twosided determinism correspond to directions of expansivity in the symbolic dynamics literature. If X is not deterministic in direction u we call u a direction of nondeterminism. Finally, note that the concept of determinism in direction u only depends on the orientation of vector u and not on its magnitude.
2.3 Wang Tiles
Twodimensional SFTs are commonly studied in terms of Wang tiles, and the first aperiodic SFTs were constructed and the undecidability of the domino problem was originality proved in the Wang tile formalism. A Wang tile is a unit square tile with colored edges, represented as a 4tuple
of colors of the north, the east, the south and the west edges of the tile, respectively, where C is a set of colors. (See Fig. 2.) A Wang tile set T is a finite set of Wang tiles. A Wang tile set T defines a subshift of \(T^{{\mathbb {Z}}^{2}}\), where forbidden patterns are all the dominoes of two tiles that do not have the same color on their abutting edges. We say that a configuration \(c\in T^{\mathbb {Z}^{2}}\) is correctly tiled at position \((i,j)\in \mathbb {Z}^{2}\) if c(i,j) matches with its four neighbors on the abutting edges so that
Otherwise there is a tiling error at position (i,j). We let
be the set of valid tilings by tile set T. Clearly \(\mathcal {V}({T})\) is an SFT, and in fact any given set \(P\subseteq A^{D}\) of allowed patterns can be effectively converted into an equivalent Wang tile set T so that \(\mathcal {V}({T})\) and \(\mathcal {V}({P})\) are conjugate, i.e., homeomorphic under a translation invariant homeomorphism. In this sense Wang tiles capture the entire complexity of twodimensional subshifts of finite type. Note that we use the same notation \(\mathcal {V}({T})\) and \(\mathcal {V}({P})\) for the sets of valid tilings by a Wang tile set T and of valid configurations under allowed patterns P, respectively. This should not cause any confusion since it is always clear from the context whether we are talking about Wang tiles or allowed patterns.
The cartesian product \(T_{1}\times T_{2}\subseteq (C_{1}\times C_{2})^{4}\) of Wang tile sets \(T_{1}\subseteq {C_{1}^{4}}\) and \(T_{2}\subseteq {C_{2}^{4}}\) is the Wang tile set that contains for all \((a_{\uparrow }, a_{\rightarrow }, a_{\downarrow }, a_{\leftarrow })\in T_{1}\) and \((b_{\uparrow }, b_{\rightarrow }, b_{\downarrow }, b_{\leftarrow })\in T_{2}\) the tile \(( (a_{\uparrow },b_{\uparrow }), (a_{\rightarrow },b_{\rightarrow }), (a_{\downarrow },b_{\downarrow }), (a_{\leftarrow },b_{\leftarrow }))\). The “sandwich” tiles in T_{1} × T_{2} have hence two layers that tile the plane independently according to T_{1} and T_{2}, respectively.
The results reported below are based on Berger’s theorem, stating in the Wang tile formalism the existence of aperiodic SFTs and the undecidability of the domino problem.
Theorem 3 (R. Berger 2)

(a)
There exists a Wang tile set T that is aperiodic, that is, such that \(\mathcal {V}(T)\) is nonempty but does not contain any periodic configurations.

(b)
It is undecidable to determine for a given Wang tile set T whether \(\mathcal {V}(T)\) is empty or not.
3 Our Results
In this section, we sum up our main results, and the proofs will be given in later sections
Theorem 4
Let c be a twodimensional configuration that has a nontrivial annihilator. Then \(\overline {\mathcal {O}(c)}\) contains a configuration \(c^{\prime }\) such that \(\overline {\mathcal {O}(c^{\prime })}\) has no direction of onesided determinism.
From this result, using a technique by Cyr and Kra [8], we then obtain the second main result, stating that under the hypotheses of Nivat’s conjecture, a configuration contains arbitrarily large periodic regions.
Theorem 5
Let c be a twodimensional configuration that has low complexity with respect to a rectangle. Then \(\overline {\mathcal {O}(c)}\) contains a periodic configuration.
These two theorems are proved in Sections 4 and 5, respectively. But let us first demonstrate how these results imply relevant corollaries. First we consider SFTs defined in terms of allowed rectangular patterns. Let D = ⟦n⟧×⟦m⟧ for some \(m,n\in \mathbb {N}\).
Corollary 6
Let \(P\subseteq A^{D}\) be a set of Dpatterns over alphabet A. If P≤ nm and \(\mathcal {V}(P)\neq \emptyset \) then \(\mathcal {V}({P})\) contains a periodic configuration.
Proof
Let \(c\in \mathcal {V}(P)\) be arbitrary. By Theorem 5 then, \(\overline {\mathcal {O}(c)}\subseteq \mathcal {V}(P)\) contains a periodic configuration. □
Corollary 7
There is an algorithm that, given as input a set of Dpatterns over a finite alphabet, with P≤ nm, determines whether \(\mathcal {V}({P})\neq \emptyset \).
Proof
This is a classical argumentation by H. Wang [19]: there is a semialgorithm to test if a given SFT is empty, and there is a semialgorithm to test if a given SFT contains a periodic configuration. Let us denote \(P\subseteq A^{D}\) the set of Dpatterns given as input. Since \(\mathcal {V}({P})\) is an SFT, we can execute both of these semialgorithms on \(\mathcal {V}({P})\). By Corollary 6, if \(\mathcal {V}({P})\neq \emptyset \) then \(\mathcal {V}({P})\) contains a periodic configuration. Hence, exactly one of these two semialgorithms will return a positive answer. □
The next corollary solves Nivat’s conjecture for uniformly recurrent configurations.
Corollary 8
A uniformly recurrent configuration c that has low complexity with respect to a rectangle is periodic.
Proof
Because c has low complexity with respect to a rectangle then by Theorem 5 there is a periodic configuration \(c^{\prime }\in \overline {\mathcal {O}(c)}\). Because \(\overline {\mathcal {O}(c^{\prime })}\) contains only translates and limits of translates of \(c^{\prime }\), all configurations in \(\overline {\mathcal {O}(c^{\prime })}\) are periodic. Finally, because c is uniformly recurrent we have \(\overline {\mathcal {O}(c)}=\overline {\mathcal {O}(c^{\prime })}\), which implies that all elements of \(\overline {\mathcal {O}(c)}\), including c itself, are periodic. □
In Section 7 we briefly argue that all of these results remain true if the n × m rectangle is replaced by any convex discrete shape.
Our third main result shows that we are able to encode any set of Wang tiles into a pretty low complexity SFT.
Theorem 9
Let T be a given Wang tile set. One can effectively find positive integers N and k such that for the given T and for any given n ≥ N and m ≥ 2 one can effectively construct a set P of binary rectangular patterns of size n × m such that the cardinality of P is at most nm + k(n + m) and \(\mathcal {V}({P})\) contains a (periodic) tiling if and only if \(\mathcal {V}({T})\) contains a (periodic, resp.) configuration.
As a consequence, we are able to prove bounds on the complexity of SFTs for which the domino problem is undecidable.
Corollary 10
Let \(f:{\mathbb {N}}\longrightarrow {\mathbb {N}}\) be a computable function, \(f\not \in \mathcal {O}(1)\). The following problem is undecidable for any fixed m ≥ 2: Given n and a set P of at most nm + f(n)n binary rectangular patterns of size n × m, is \(\mathcal {V}({P})\) empty ?
Proof
We manyone reduce the domino problem. Let T be any given set of Wang tiles. Compute constants N and k of Theorem 9. For \(n=N, N+1, N+2,\dots \) compute f(n) until number n ≥ N is found such that f(n) ≥ k + km/n. Because \(f\not \in \mathcal {O}(1)\) such n exists. Using Theorem 9 construct a set P of at most nm + k(n + m) ≤ nm + f(n)n binary patterns of size n × m. By Theorem 9 tiles T admit a valid tiling if and only if \(\mathcal {V}({P})\) is nonempty. □
Corollary 10 is stated for thin blocks of constant height m. It is also worth to consider fat blocks, e.g., of square shape. By the analogous proof, using m = n instead of constant m we obtain the following result where the additive term is almost linear in n.
Corollary 11
Let \(f:{\mathbb {N}}\longrightarrow {\mathbb {N}}\) be a computable function, \(f\not \in \mathcal {O}(1)\). The following problem is undecidable: Given n and a set P of at most n^{2} + f(n)n binary square patterns of size n × n, is \(\mathcal {V}({P})\) empty ?
Proof
We proceed as in the proof of Corollary 10, except that we choose n such that f(n) ≥ 2k. By Theorem 9 we can effectively construct a set P of at most n^{2} + k(n + n) ≤ n^{2} + f(n)n binary patterns of size n × n such that \(\mathcal {V}(P)\) is nonempty if and only if T admits a valid tiling. □
In particular, for any real number ε > 0 it is undecidable if a given set P of at most (1 + ε)n^{2} square patterns of size n × n admit a valid configuration.
As usual, undecidability comes together with aperiodicity. We obtain pretty low complexity aperiodic SFTs.
Corollary 12
Let \(f:{\mathbb {N}}\longrightarrow {\mathbb {N}}\) be a function, \(f\not \in \mathcal {O}(1)\). There exists n and an aperiodic SFT \(\mathcal {V}({P})\) where P consists of at most n^{2} + f(n)n binary square patterns of size n × n. Also, for every fixed height m ≥ 2, there exists a width n and an aperiodic SFT \(\mathcal {V}({P^{\prime }})\) where \(P^{\prime }\) consists of at most nm + f(n)n binary rectangular patterns of size n × m.
Proof
Let T be an aperiodic Wang tile set. Let N and k be as in Theorem 9, and let \(n\in {\mathbb {N}}\) be such that f(n) ≥ 2k. By Theorem 9 there is a collection P of at most n^{2} + k(n + n) ≤ n^{2} + f(n)n binary n × n patterns such that \(\mathcal {V}({P})\) is aperiodic. For fixed m, choosing n such that f(n) ≥ k + km/n gives \(P^{\prime }\) in the second claim. □
4 Removing Onesided Determinism
In this section we prove Theorem 4 by showing how we can “remove” onesided directions of determinism from subshifts with annihilators.
Let c be a configuration over alphabet \(A\subseteq {\mathbb {Z}}\) that has a nontrivial annihilator. By Theorem 2 it has then an annihilator ϕ_{1}⋯ϕ_{m} where each ϕ_{i} is of the form
Moreover, vectors v_{i} can be chosen pairwise linearly independent, that is, in different directions. If m = 0 it means that c = 0, therefore we may assume m ≥ 1.
Denote \(X=\overline {\mathcal {O}(c)}\), the subshift generated by c. A polynomial that annihilates c annihilates all elements of X, because they only have local patterns that already appear in c. It is easy to see that X can only be nondeterministic in a direction that is perpendicular to one of the directions v_{i} of the polynomials ϕ_{i}:
Proposition 13
Let c be a configuration annihilated by ϕ_{1}⋯ϕ_{m} where each ϕ_{i} is of the form (1). Let \(\mathbf {u}\in \mathbb {Z}^{2}\) be a direction that is not perpendicular to v_{i} for any i ∈{1,…,m}. Then \(X=\overline {\mathcal {O}(c)}\) is deterministic in direction u.
Proof
Suppose X is not deterministic in direction u. By definition, there exist d,e ∈ X such that d≠e but \(d_{H_{\mathbf {u}}}=e_{H_{\mathbf {u}}}\). Denote Δ = d − e. Because Δ≠ 0 but ϕ_{1}⋯ϕ_{m} ⋅Δ = 0, for some i we have ϕ_{1}⋯ϕ_{i− 1} ⋅Δ≠ 0 and ϕ_{1}⋯ϕ_{i} ⋅Δ = 0. Denote \({{\Delta }^{\prime }}=\phi _{1}\cdots \phi _{i1}\cdot {\Delta }\). Because \(\phi _{i}\cdot {{\Delta }^{\prime }}=0\), configuration \({{\Delta }^{\prime }}\) is periodic in direction v_{i}. But because Δ is zero in the half plane H_{u}, also \({{\Delta }^{\prime }}\) is zero in some translate \(H^{\prime }={H_{\mathbf {u}}}\mathbf {t}\) of the half plane. Since the periodicity vector v_{i} of \({{\Delta }^{\prime }}\) is not perpendicular to u, the periodicity transmits the values 0 from the region \(H^{\prime }\) to the entire \(\mathbb {Z}^{2}\). Hence \({{\Delta }^{\prime }}=0\), a contradiction. □
Let \(\mathbf {u}\in {\mathbb {Z}}^{2}\) be a onesided direction of determinism of X. In other words, u is a direction of determinism but −u is not. By the proposition above, u is perpendicular to some v_{i}. Without loss of generality, we may assume i = 1. We denote ϕ = ϕ_{1} and v = v_{1}.
Let k be such that the contents of the discrete box \(B=B_{\mathbf {u}}^{k}\) determine the content of cell 0, that is, for d,e ∈ X
As pointed out in Section 2.2, any sufficiently large k can be used. We can choose k so that k > 〈u^{⊥},v〉. To shorten notations, let us also denote H = H_{−u}.
Lemma 14
For any d,e ∈ X such that ϕd = ϕe holds:
Proof
Let d,e ∈ X be such that ϕd = ϕe and d_{B} = e_{B}. Denote Δ = d − e. Then ϕΔ = 0 and Δ_{B} = 0. Property ϕΔ = 0 means that Δ has periodicity vector v, so this periodicity transmits values 0 from the region B to the stripe
See Fig. 3 for an illustration of the regions H, B and S. As Δ_{S} = 0, we have that d_{S} = e_{S}. Applying (2) on suitable translates of d and e allows us to conclude that d_{H} = e_{H}. □
A reason to prove the lemma above is the following corollary, stating that X can only contain a bounded number of configurations that have the same product with ϕ:
Corollary 15
Let c_{1},…,c_{n} ∈ X be pairwise distinct. If ϕc_{1} = ⋯ = ϕc_{n} then n ≤A^{B}.
Proof
Let \(H^{\prime }=H\mathbf {t}\), for \(\mathbf {t}\in {\mathbb {Z}}^{2}\), be a translate of the half plane H = H_{−u} such that c_{1},…,c_{n} are pairwise different on \(H^{\prime }\). Consider the translated configurations d_{i} = τ^{t}(c_{i}). We have that d_{i} ∈ X are pairwise different on H and ϕd_{1} = ⋯ = ϕd_{n}. By Lemma 14, configurations d_{i} must be pairwise different on domain B. There are only A^{B} different patterns in domain B. □
Let c_{1},…,c_{n} ∈ X be pairwise distinct such that ϕc_{1} = ⋯ = ϕc_{n}, with n as large as possible. By Corollary 15 such a maximal n exists. Let us repeatedly translate the configurations c_{i} by τ^{u} and take a limit: by compactness there exists n_{1} < n_{2} < n_{3}… such that
exists for all i ∈{1,…,n}. Configurations d_{i} ∈ X inherit the following properties from c_{i}:
Lemma 16
Let d_{1},…,d_{n} be defined as above. Then

(a)
ϕd_{1} = ⋯ = ϕd_{n}, and

(b)
Configurations d_{i} are pairwise different on translated discrete boxes \(B^{\prime }=B\mathbf {t}\) for all \(\mathbf {t}\in \mathbb {Z}^{2}\).
Proof
Let i_{1},i_{2} ∈{1,…,n} be arbitrary, i_{1}≠i_{2}.

(a)
Because \(\phi c_{i_{1}} = \phi c_{i_{2}}\) we have, for any \(n\in {\mathbb {N}}\),
$$\phi \tau^{n\mathbf{u}}(c_{i_{1}}) = \tau^{n\mathbf{u}}(\phi c_{i_{1}}) = \tau^{n\mathbf{u}}(\phi c_{i_{2}}) = \phi \tau^{n\mathbf{u}}(c_{i_{2}}).$$Function c↦ϕc is continuous in the topology so
$$ \phi d_{i_{1}} =\phi \underset{j\rightarrow \infty}{\lim} \tau^{n_{j}\mathbf{u}}(c_{i_{1}}) = \underset{j\rightarrow \infty}{\lim} \phi\tau^{n_{j}\mathbf{u}}(c_{i_{1}}) = \underset{j\rightarrow \infty}{\lim} \phi\tau^{n_{j}\mathbf{u}}(c_{i_{2}}) = \phi \underset{j\rightarrow \infty}{\lim} \tau^{n_{j}\mathbf{u}}(c_{i_{2}}) = \phi d_{i_{2}}. $$ 
(b)
Let \(B^{\prime }=B\mathbf {t}\) for some \(\mathbf {t}\in {\mathbb {Z}}^{2}\). Suppose \(d_{i_{1}}_{B^{\prime }} = d_{i_{2}}_{B^{\prime }}\). By the definition of convergence, for all sufficiently large j we have \(\tau ^{n_{j}\mathbf {u}}(c_{i_{1}})_{B^{\prime }} = \tau ^{n_{j}\mathbf {u}}(c_{i_{2}})_{B^{\prime }}\). This is equivalent to \(\tau ^{n_{j}\mathbf {u}+\mathbf {t}}(c_{i_{1}})_{B} = \tau ^{n_{j}\mathbf {u}+\mathbf {t}}(c_{i_{2}})_{B}\). By Lemma 14 then also \(\tau ^{n_{j}\mathbf {u}+\mathbf {t}}(c_{i_{1}})_{H} = \tau ^{n_{j}\mathbf {u}+\mathbf {t}}(c_{i_{2}})_{H}\) where H = H_{−u}. This means that for all sufficiently large j the configurations \(c_{i_{1}}\) and \(c_{i_{2}}\) are identical on the domain H − n_{j}u −t. But these domains cover the whole \(\mathbb {Z}^{2}\) as \(j\longrightarrow \infty \) so that \(c_{i_{1}}=c_{i_{2}}\), a contradiction.
□
Now we pick one of the configurations d_{i} and consider its orbit closure. Choose d = d_{1} and set \(Y=\overline {\mathcal {O}(d)}\). Then \(Y\subseteq X\). Any direction of determinism in X is also a direction of determinism in Y. Indeed, this is trivially true for any subset of X. But, in addition, we have the following:
Lemma 17
Subshift Y is deterministic in direction −u.
Proof
Suppose the contrary: there exist configurations x,y ∈ Y such that x≠y but x_{H} = y_{H} where, as usual, H = H_{−u}. In the following we construct n + 1 configurations in X that have the same product with ϕ, which contradicts the choice of n as the maximum number of such configurations.
By the definition of Y all elements of Y are limits of sequences of translates of d = d_{1}, that is, there are translations τ_{1},τ_{2},… such that \(x=\lim _{i\rightarrow \infty } \tau _{i}(d)\), and translations σ_{1},σ_{2},… such that \(y=\lim _{i\rightarrow \infty } \sigma _{i}(d)\). Apply the translations τ_{1},τ_{2},… on configurations d_{1},…,d_{n}, and take jointly converging subsequences: by compactness there are k_{1} < k_{2} < … such that
exists for all i ∈{1,…,n}. Here, clearly, e_{1} = x.
Let us prove that e_{1},…,e_{n} and y are n + 1 configurations that (i) have the same product with ϕ, and (ii) are pairwise distinct. This contradicts the choice of n as the maximum number of such configurations, and thus completes the proof.

(i)
First, ϕx = ϕy: Because x_{H} = y_{H} we have ϕx_{H−t} = ϕy_{H−t} for some \(\mathbf {t}\in \mathbb {Z}^{2}\). Consider \(c^{\prime }=\tau ^{\mathbf {t}}(\phi x\phi y)\), so that \(c^{\prime }_{H}=0\). As ϕ_{2}⋯ϕ_{m} annihilates ϕx and ϕy, it also annihilates \(c^{\prime }\). An application of Proposition 13 on configuration \(c^{\prime }\) in place of c shows that \(\overline {\mathcal {O}(c^{\prime })}\) is deterministic in direction −u. (Note that −u is not perpendicular to v_{j} for any j≠ 1, because v_{1} and v_{j} are not parallel and −u is perpendicular to v_{1}.) Due to the determinism, \(c^{\prime }_{H}=0\) implies that \(c^{\prime }=0\), that is, ϕx = ϕy.
Second, \(\phi e_{i_{1}}=\phi e_{i_{2}}\) for all i_{1},i_{2} ∈{1,…,n}: By Lemma 16 we know that \(\phi d_{i_{1}}=\phi d_{i_{2}}\). By continuity of the function c↦ϕc we then have
$$ \begin{array}{@{}rcl@{}}\phi e_{i_{1}} &=& \phi \underset{j\rightarrow\infty}{\lim} \tau_{k_{j}}(d_{i_{1}}) = \underset{j\rightarrow\infty}{\lim} \phi \tau_{k_{j}}(d_{i_{1}}) = \underset{j\rightarrow\infty}{\lim} \tau_{k_{j}}(\phi d_{i_{1}}) \\&&{\kern14.5pc}\\ \phi e_{i_{2}}& =& \phi \underset{j\rightarrow\infty}{\lim} \tau_{k_{j}}(d_{i_{2}}) = \underset{j\rightarrow\infty}{\lim} \phi \tau_{k_{j}}(d_{i_{2}}) = \underset{j\rightarrow\infty}{\lim} \tau_{k_{j}}(\phi d_{i_{2}}) \end{array} $$Because e_{1} = x, we have shown that e_{1},…,e_{n} and y all have the same product with ϕ.

(ii)
Pairwise distinctness: First, y and e_{1} = x are distinct by the initial choice of x and y. Next, let i_{1},i_{2} ∈{1,…,n} be such that i_{1}≠i_{2}. Let \(\mathbf {t}\in \mathbb {Z}^{2}\) be arbitrary and consider the translated discrete box \(B^{\prime }=B\mathbf {t}\). By Lemma 16(b) we have \(\tau _{k_{j}}(d_{i_{1}})_{B^{\prime }}\neq \tau _{k_{j}}(d_{i_{2}})_{B^{\prime }}\) for all \(j\in \mathbb {N}\), so taking the limit as \(j\longrightarrow \infty \) gives \(e_{i_{1}}_{B^{\prime }}\neq e_{i_{2}}_{B^{\prime }}\). This proves that \(e_{i_{1}}\neq e_{i_{2}}\). Moreover, by taking t such that \(B^{\prime }\subseteq H\) we see that \(y_{B^{\prime }}=x_{B^{\prime }}=e_{1}_{B^{\prime }}\neq e_{i}_{B^{\prime }}\) for i ≥ 2, so that y is also distinct from all e_{i} with i ≥ 2.
□
The following proposition captures the result established above.
Proposition 18
Let c be a configuration with a nontrivial annihilator. If u is a onesided direction of determinism in \(\overline {\mathcal {O}(c)}\) then there is a configuration \(d\in \overline {\mathcal {O}(c)}\) such that u is a twosided direction of determinism in \(\overline {\mathcal {O}(d)}\).
Proof
Let c be a configuration with a nontrivial annihilator and u a onesided direction of determinism in \(\overline {\mathcal {O}(c)}\). Then, consider c_{1},…,c_{n} as in Corollary 15 and n as large as possible. Then, by taking
Lemma 17 ensures that \(Y=\overline {\mathcal {O}(d)}\) is deterministic both in directions u and −u, as none of the limits used change the determinism along u. □
Now we are ready to prove Theorem 4.
Proof Proof of Theorem 4
Let c be a twodimensional configuration that has a nontrivial annihilator. Every nonempty subshift contains a minimal subshift [4], and hence there is a uniformly recurrent configuration \(c^{\prime }\in \overline {\mathcal {O}(c)}\). If \(\overline {\mathcal {O}(c^{\prime })}\) has a onesided direction of determinism u, we can apply Proposition 18 on \(c^{\prime }\) and find \(d\in \overline {\mathcal {O}(c^{\prime })}\) such that u is a twosided direction of determinism in \(\overline {\mathcal {O}(d)}\). But because \(c^{\prime }\) is uniformly recurrent, \(\overline {\mathcal {O}(d)}=\overline {\mathcal {O}(c^{\prime })}\), a contradiction. □
5 Periodicity in Low Complexity Subshifts
In this section we prove Theorem 5. Every nonempty subshift contains a uniformly recurrent configuration, so we can safely assume that c is uniformly recurrent.
Our proof of Theorem 5 splits in two cases based on Theorem 4: either \(\overline {\mathcal {O}(c)}\) is deterministic in all directions or for some u it is nondeterministic in both directions u and −u. The first case is handled by the following wellknown corollary from a theorem of Boyle and Lind [5]:
Proposition 19
A configuration c is twoperiodic if and only if \(\overline {\mathcal {O}(c)}\) is deterministic in all directions.
For the second case we apply the technique by Cyr and Kra [8]. This technique was also used in [17] to address Nivat’s conjecture. It is possible to use a direct combination of lemmas from [8] or [17] to prove the following:
Proposition 20
Let c be a twodimensional uniformly recurrent configuration that has low complexity with respect to a rectangle. If for some u both u and −u are directions of nondeterminism in \(\overline {\mathcal {O}(c)}\) then c is periodic in a direction perpendicular to u.
We will prove this proposition below using lemmas from [17]. We first recall some definitions, adjusted to our terminology. Let \(D\subseteq \mathbb {Z}^{2}\) be nonempty and let \(\mathbf {u}\in {\mathbb {Z}}^{2}\setminus \{\mathbf {0}\}\). The edge E_{u}(D) of D in direction u consists of the cells in D that are extremal in the direction u:
We call D convex if \(D=C\cap {\mathbb {Z}}^{2}\) for a convex subset \(C\subseteq {\mathbb {R}}^{2}\) of the real plane. For \(D,E\subseteq \mathbb {Z}^{2}\) we say that D fits in E if \(D+\mathbf {t}\subseteq E\) for some \(\mathbf {t}\in \mathbb {Z}^{2}\).
The (closed) stripe of width k perpendicular to u is the set
Consider the stripe \(S=S_{\mathbf {u}}^{k}\). The reader can refer to Fig. 3 for an illustration of a closed stripe, the only difference being the inclusion of the upper boundary of S. Clearly its edge E_{u}(S) in direction u is the discrete line \(\mathbb {Z}^{2}\cap L\) where \(L\subseteq \mathbb {R}^{2}\) is the real line through 0 that is perpendicular to u. The interior S^{∘} of S is S ∖ E_{u}(S), that is, \(S^{\circ } = \{\mathbf {x}\in \mathbb {Z}^{2}\ \ k< \langle {\mathbf {x}},{\mathbf {u}}\rangle < 0\}\).
A central concept from [8, 17] is the following. Let c be a configuration and let \(\mathbf {u}\in \mathbb {Z}^{2}\setminus \{\mathbf {0}\}\) be a direction. Recall that \({\mathscr{L}}_{D}({c})\) denotes the set of Dpatterns that appear in c. A finite discrete convex set \(D\subseteq \mathbb {Z}^{2}\) is called ubalanced in c if the following three conditions are satisfied, where we denote E = E_{u}(D) for the edge of D in direction u:

(i)
\({{\mathscr{L}}_{D}(c)}\leq D\),

(ii)
\({{\mathscr{L}}_{D}(c)} < {{\mathscr{L}}_{D\setminus E}(c)}+E\), and

(iii)
D ∩ L≥E− 1 for every line L perpendicular to u such that D ∩ L≠∅.
The first condition states that c has low complexity with respect to shape D. The second condition implies that there are fewer than E different (D ∖ E)patterns in c that can be extended in more than one way into a Dpattern of c. The last condition states that the edge E is nearly the shortest among the parallel cuts across D.
Lemma 21 (Lemma 2 in 17)
Let c be a twodimensional configuration that has low complexity with respect to a rectangle, and let \(\mathbf {u}\in \mathbb {Z}^{2}\setminus \{\mathbf {0}\}\). Then c has a ubalanced or a (−u)balanced set \(D \subseteq \mathbb {Z}^{2}\).
A crucial observation in [8] connects balanced sets and nondeterminism to periodicity. This leads to the following statement.
Lemma 22 (Lemma 4 in 17)
Let d be a twodimensional configuration and let \(\mathbf {u}\in {\mathbb {Z}}^{2}\setminus \{\mathbf {0}\}\) be such that d admits a ubalanced set \(D \subseteq {\mathbb {Z}}^{2}\). Assume there is a configuration \(e\in \overline {\mathcal {O}(d)}\) and a stripe \(S=S_{\mathbf {u}}^{k}\) perpendicular to u such that D fits in S and \(d_{S^{\circ }}=e_{S^{\circ }}\) but d_{S}≠e_{S}. Then d is periodic in direction perpendicular to u.
With these we can prove Proposition 20.
Proof Proof of Proposition 20
Let c be a twodimensional uniformly recurrent configuration that has low complexity with respect to a rectangle. Let u be such that both u and −u are directions of nondeterminism in \(\overline {\mathcal {O}(c)}\). By Lemma 21 configuration c admits a ubalanced or a (−u)balanced set \(D \subseteq {\mathbb {Z}}^{2}\). Without loss of generality, assume that D is ubalanced in c. As \(\overline {\mathcal {O}(c)}\) is nondeterministic in direction u, there are configurations \(d,e\in \overline {\mathcal {O}(c)}\) such that \(d_{H_{\mathbf {u}}}=e_{H_{\mathbf {u}}}\) but d_{(0,0)}≠e_{(0,0)}. Because c is uniformly recurrent, exactly the same finite patterns appear in d as in c. This means that D is ubalanced also in d. From the uniform recurrence of c we also get that \(e\in \overline {\mathcal {O}(d)}\). Pick any k large enough so that D fits in the stripe \(S=S_{\mathbf {u}}^{k}\). Because 0 ∈ S and \(S^{\circ }\subseteq H_{\mathbf {u}}\), the conditions in Lemma 22 are met. By the lemma, configuration d is pperiodic for some p that is perpendicular to u. Because d has the same finite patterns as c, it follows that c cannot contain a pattern that breaks period p. So c is also pperiodic. □
Now Theorem 5 follows from Propositions 19 and 20, using Theorem 4 and the fact that every subshift contains a uniformly recurrent configuration.
Proof Proof of Theorem 5
Let c be a twodimensional configuration that has low complexity with respect to a rectangle. Replacing c by a uniformly recurrent element of \(\overline {\mathcal {O}(c)}\), we may assume that c is uniformly recurrent. Since c is a lowcomplexity configuration, by Lemma 1 it has a nontrivial annihilator. By Theorem 4 there exists \(c^{\prime }\in \overline {\mathcal {O}(c)}\) such that \(\overline {\mathcal {O}(c^{\prime })}\) has no direction of onesided determinism. If all directions are deterministic in \(\overline {\mathcal {O}(c^{\prime })}\), it follows from Proposition 19 that \(c^{\prime }\) is twoperiodic. Otherwise there is a direction u such that both u and −u are directions of nondeterminism in \(\overline {\mathcal {O}(c^{\prime })}\). Now it follows from Proposition 20 that \(c^{\prime }\) is periodic. □
6 Recoding Wang Tiles
In this section we prove Theorem 9. We convert an arbitrary Wang tile set T into a pretty small set P of binary rectangular allowed patterns that is equivalent to T in the sense that P admits a (periodic) configuration if and only if T admits a (resp. periodic) configuration. Configurations valid for P have bits 1 sparsely positioned so that each bit 1 represents a single Wang tile of a valid tiling, and the relative positions of bits 1 uniquely identify the corresponding Wang tiles. Allowed patterns in P are restricted so that only matching Wang tiles are allowed next to each other. We detail this construction in the next pages.
So let T be a given finite set of Wang tiles. We first modify the set to make sure that no tile matches itself as its neighbor. This is easy to enforce by making two copies of T and forcing the copies be used alternatingly on even and odd cells. More precisely, we replace T by the cartesian product T ×{even,odd} where even has color 0 on its north and east sides and color 1 on south and west, while in odd the colors are reversed. The even/odd components of tiles form an infinite checkerboard tiling of the plane. The new tile set admits a (periodic) tiling if and only if T admits a (periodic, resp.) tiling.
From now on we assume that no tile of T matches in color with itself. Let t = T be the number of tiles, and denote
and s = 2^{t− 1}. The set \(S\subseteq \llbracket s\rrbracket \) has the property that for a,b ∈ S, a≠b, the difference a − b uniquely identifies both a and b. The proof of this fact is easy.
Lemma 23
For a_{1},a_{2},b_{1},b_{2} ∈ S, if a_{1} − b_{1} = a_{2} − b_{2}≠ 0 then a_{1} = a_{2} and b_{1} = b_{2}.
Fix a bijection α : T→S. In our coding tile t will be represented as a horizontal sequence of s bits where bit number α(t) is set to 1 and all other bits are 0’s.
Choose N = 3s and fix m ≥ 2 and n ≥ N, the dimensions of the rectangular patterns considered, and define
Denote \(n^{\prime }=ns\) and \(m^{\prime }=m1\). In our coding of a Wang tiling we paste to position \((i\cdot n^{\prime }, j\cdot m^{\prime })\) the bit sequence representing the Wang tile in position (i,j). A configuration \(c\in T^{\mathbb {Z}^{2}}\) is then represented as a binary configuration \(\beta (c)\in \{0,1\}^{\mathbb {Z}^{2}}\) where for all \((i,j)\in \mathbb {Z}^{2}\), tile c(i,j) contributes symbol 1 in position \((in^{\prime }+\alpha (c(i,j)), jm^{\prime })\). All positions without a contribution from any tile of c have value 0.
In β(c) all symbols 1 appear in the intersections of vertical strips
and horizontal strips
for \(i,j\in {\mathbb {Z}}\). There is exactly one symbol 1 in each intersection I_{i,j} = V_{i} ∩ H_{j}, representing the Wang tile in position (i,j). See Fig. 4 for an illustration.
Let us first count all rectangular n × m patterns that may appear in β(c) for some \(c\in T^{\mathbb {Z}^{2}}\), that is, find an upper bound on the cardinality of the set
As \(n=n^{\prime }+s\) we have that for all \(j\in {\mathbb {Z}}\) there is \(i\in {\mathbb {Z}}\) such that \(in^{\prime }+\llbracket s\rrbracket \subseteq j+\llbracket n\rrbracket \), that is, every n × m rectangle on the grid fully intercepts one of the vertical strips V_{i}. Analogously, the rectangle intercepts a horizontal strip H_{j} and hence some I_{i,j} is fully contained in the rectangle. This implies that every pattern in Q contains at least one symbol 1. On the other hand, \(n\leq 2n^{\prime }s\) so that an n × m rectangle can not intersect with more than two strips V_{i}, and analogously it cannot intersect more than two horizontal strips H_{j}. This means that there are at most four symbols 1 in each pattern of Q.
Let p ∈ Q and let \(c\in T^{{\mathbb {Z}}^{2}}\) be such that \(p\in {{\mathscr{L}}_{D}(\beta (c))}\). Let E = u + D be a rectangle containing pattern p in β(c). We have the following four possibilities.

Suppose that E has a nonempty intersection with two consecutive vertical strips V_{i} and V_{i+ 1} and with two consecutive horizontal strips H_{j} and H_{j+ 1}. Rectangle E can be positioned in at most 2s positions relative to these strips, and there at most t^{4} choices of the Wang tiles encoded in the intersections of the two horizontal and two vertical strips. This means that there are at most 2st^{4} patterns p that can be extracted this way.

Suppose that E has nonempty intersection with two consecutive vertical strips V_{i} and V_{i+ 1} and with only one horizontal strip H_{j}. There are at most 2sm ways to position the rectangle and at most t^{2} choices for the two tiles encoded within the block. There are hence at most 2smt^{2} patterns p of this type.

Symmetrically, if E has nonempty intersection with two consecutive horizontal strips H_{j} and H_{j+ 1} and with only one vertical strip V_{j} then the number of extracted patterns is bounded by nt^{2}.

Finally, if E only intersects a single vertical and horizontal strip then E contains a single symbol 1. There are at most nm positions for this 1 inside the n × m rectangle.
Adding up the four cases above gives the upper bound
for the cardinality of Q, where we can choose k = 2st^{4}, assuming t ≥ 1. This choice of k works by a direct calculation due to t^{2} ≥ 1, st^{2} ≥ 1 and n ≥ 2: subtracting the lefthandside from the righthandside yields
Note that constant k = 2st^{4} = T^{4} ⋅ 2^{T} does not depend on n or m but only on the number of tiles in T. Note also that the patterns in Q can be effectively constructed. We have established the following result.
Lemma 24
The number of different n × m patterns that appear in β(c) over all \(c\in T^{{\mathbb {Z}}^{2}}\) is at most nm + k(n + m) for k = T^{4} ⋅ 2^{T}. These patterns can be effectively constructed for a given T.
Remark 1
A smaller constant k can be obtained by using a more succinct representation α of tiles T as numbers. One just needs to encode tiles as natural numbers whose differences a − b identify uniquely a and b, so that Lemma 23 is satisfied. Instead of the exponentially growing sequence of representatives \(0,1,3,7,15,\dots \) that we use here one can use, for example, numbers of the MianChowla sequence \(1, 2, 4, 8, 13, 21, 31, \dots \) (sequence A005282 in [16]) that only grows polynomially. Then constant k will be bounded by a polynomial of T.
Let us further limit the allowed patterns by removing from Q patterns that contain two 1’s whose relative positions indicate neighboring Wang tiles whose colors do not match. More precisely, let p ∈ Q.

Suppose p contains on some row two symbols 1, in columns i and j, for i < j. In order for p to appear in β(c) for some valid tiling c we necessarily must have that the two symbols 1 are the contributions of two matching horizontally neighboring tiles in c, so that i = k + α(a) and \(j=k+n^{\prime }+\alpha (b)\) for some integer k and tiles a,b ∈ T such that the east color of a is the same as the west color of b. Hence we remove p from Q if no matching a,b exist such that \(ji=n^{\prime }+\alpha (b)\alpha (a)\).

Suppose p contains symbol 1 in some column i of the bottom row and some column j of the top row where i − s < j < i + s. Now p can appear in β(c) only if the two symbols 1 are the contributions of two vertically neighboring tiles in c, so that i = k + α(a) and j = k + α(b) for some integer k and tiles a,b ∈ T such that the north color of a is the same as the south color of b. We remove p from Q if no matching a,b exist such that j − i = α(b) − α(a).
Let P be the set of patterns in Q that are not removed by the conditions (H) and (V) above. Set P can be effectively constructed and, since \(P\subseteq Q\), the upper bound P≤ nm + k(n + m) from Lemma 24 holds.
Let us next prove that allowing the patterns in P admits precisely the configurations β(c) and all their translates, for all \(c\in T^{\mathbb {Z}^{2}}\) that are valid Wang tilings.
Lemma 25
With the notations above,
Proof
By the definition of P it is clear that for every valid tiling \(c\in \mathcal {V}(T)\) the encoded configuration β(c) only contains allowed patterns in P. Hence the inclusion “\(\supseteq \)” holds.
To prove the converse inclusion, consider an arbitrary configuration \(e\in \mathcal {V}(P)\), that is, \(e\in \{0,1\}^{\mathbb {Z}^{2}}\) such that \({{\mathscr{L}}_{D}(e)}\subseteq P\). Every pattern in P contains a symbol 1 so configuration e must contain a symbol 1 in every n × m block.
Let us denote, for any x,y,z,w ∈ T, by \({\text {Bin}}\left (\begin {array}{cc} z & w\\ x & y \end {array}\right )\) the n × m binary pattern with exactly four 1’s, two of which are on the bottom row in columns α(x) and \(n^{\prime }+\alpha (y)\), and two are on the topmost row in columns α(z) and \(n^{\prime }+\alpha (w)\). In other words, the bit sequences that encode tiles x,y,z and w are in the four corners of the pattern, as in the dark grey block in Fig. 4. Let us call \({\text {Bin}}\left (\begin {array}{cc} z & w\\ x & y \end {array}\right )\) a standard block if the Wang tiles x,y,z,w match each other in colors as a 2 × 2 pattern with x,y,z and w at the lower left, lower right, upper left and upper right position of the 2 × 2 pattern, respectively.
Consider now any occurrence of a symbol 1 in e, that is, \(\mathbf {u}\in {\mathbb {Z}}^{2}\) such that e(u) = 1. Let us prove that there is a standard block \({\text {Bin}}\left (\begin {array}{cc} z & w\\ x & y \end {array}\right )\) in e with this occurrence of 1 representing Wang tile x. Let p = τ^{u}(e)_{D} be the n × m pattern with lower left corner at cell u, so there is a symbol 1 at the lower left corner of p. By the definition of P, pattern p appears in β(f) for some \(f\in T^{{\mathbb {Z}}^{2}}\). The structure of β(f) implies that there is another symbol 1 in pattern p on the same horizontal row, say i position to the right of the lower left corner. By condition (H) above, \(i=n^{\prime }+\alpha (y)\alpha (x)\) for some tiles x,y ∈ T such that the east color of x is the same as the west color of y. Because no tile in T matches with itself in color, we have x≠y and hence x and y are unique by Lemma 23.
Let v = u − (α(x),0), and extract the n × m pattern q = τ^{v}(e)_{D} located α(x) positions to the left of p in e. Pattern q contains symbol 1 on the bottom row at columns α(x) and \(n^{\prime }+\alpha (y)\). Pattern q appears in \(\beta (f^{\prime })\) for some \(f^{\prime }\in T^{{\mathbb {Z}}^{2}}\) and therefore, due to the structure of encoded configurations, q must be \({\text {Bin}}\left (\begin {array}{cc} z & w\\ x & y \end {array}\right )\) for some z,w ∈ T. Conditions (H) and (V) then ensure that x,y,z and w match in color with each other to form a valid 2 × 2 pattern of Wang tiles, so \(q={\text {Bin}}\left (\begin {array}{cc} z & w\\ x & y \end {array}\right )\) is a standard block.
We have seen that any occurrence of 1 in e represents a Wang tile x in the lower left corner of some standard block \(q={\text {Bin}}\left (\begin {array}{cc} z & w\\ x & y \end {array}\right )\) in e. With an analogous reasoning we see that the same occurrence of bit 1 is also encoding the tile \(z^{\prime }\) at the upper left corner of a standard block \(q^{\prime }={\text {Bin}}\left (\begin {array}{cc} z^{\prime } & w^{\prime }\\ x^{\prime } & y^{\prime } \end {array}\right )\) in e. In \(q^{\prime }\) the symbol 1 that represents the Wang tile \(w^{\prime }\) at the upper right corner is the same as the one that represents tile y at the lower right corner in q, so that \(\alpha (x)\alpha (y)=\alpha (z^{\prime })\alpha (w^{\prime })\). By Lemma 23 the tiles are unique so that \(x=z^{\prime }\) and \(y=w^{\prime }\). (See Fig. 5 for an illustration.) We have that \(q^{\prime }=\tau ^{\mathbf {v^{\prime }}}(e)_{D}\) for \(\mathbf {v^{\prime }}=\mathbf {v}(0,m^{\prime })\).
Analogously, symbol 1 in position u is also in the lower right and upper right corners of standard blocks in e that overlap with q and \(q^{\prime }\) in two encoded Wang tiles that by Lemma 23 are uniquely identified as x and z and as \(x^{\prime }\) and \(z^{\prime }=x\), respectively. So also the n × m blocks in e with lower left corners at cells \(\mathbf {v}(n^{\prime },0)\) and \(\mathbf {v}(n^{\prime },m^{\prime })\) are standard blocks.
As cell u is any position containing bit 1 in configuration e, we can repeat the reasoning on the other corners of the standard blocks. By easy induction we see that \(\tau ^{\mathbf {v}_{i,j}}(e)_{D}\) is a standard block for all \(i,j\in {\mathbb {Z}}\) where \(\mathbf {v}_{i,j}=\mathbf {v}+(in^{\prime },jm^{\prime })\). We now take \(c\in T^{\mathbb {Z}^{2}}\) such that c(i,j) is the Wang tile encoded in e position v_{i,j}, for all \(i,j\in \mathbb {Z}\), that is, the unique t ∈ T such that \(\tau ^{\mathbf {v}_{i,j}}(e)(\alpha (t))=1\). Clearly τ^{v}(e) = β(c). Because standard blocks correspond to correctly tiled 2 × 2 blocks of Wang tiles we have that \(c\in \mathcal {V}(T)\). □
We are now ready to prove Theorem 9.
Proof Proof of Theorem 9
We first construct an equivalent tile set \(T^{\prime }\) where no tile matches in color with itself, as shown in the beginning of the section. We then set \(t=T^{\prime }\), s = 2^{t− 1}, N = 3s and k = 2st^{4}. Let n ≥ N and m ≥ 2 be arbitrary, and let us construct P as above. By Lemma 24 set P contains at most nm + k(n + m) patterns. By Lemma 25 we have that \(\mathcal {V}(P)=\emptyset \) if and only if \(\mathcal {V}(T)=\emptyset \). Encoding β maps periodic configurations to periodic configurations so also by Lemma 25 there is a periodic configuration in \(\mathcal {V}({P})\) if and only if there is a periodic configuration in \(\mathcal {V}({T})\). □
7 Conclusions
We have demonstrated how the low local complexity assumption enforces global regularities in the valid configurations, yielding algorithmic decidability results. The results were proved in full detail for low complexity configurations with respect to an arbitrary rectangle. The reader can easily verify that the fact that the considered shape is a rectangle is not used in any proofs presented here, and the only quoted result that uses this fact is Lemma 21. A minor modification in the proof of Lemma 21 presented in [17] yields that the lemma remains true for any twodimensional configuration that has low complexity with respect to any convex shape. We conclude that also Theorem 5, Corollaries 6, 7 and 8 remain true if we use any convex discrete shape in place of a rectangle.
If the considered shape is not convex the situation becomes more difficult. Theorem 5 is not true for an arbitrary shape in place of the rectangle but all counter examples we know are based on periodic sublattices [6, 11]. For example, even lattice cells may form a configuration that is horizontally but not vertically periodic while the odd cells may have a vertical but no horizontal period. Such a nonperiodic configuration may be uniformly recurrent and have low complexity with respect to a scattered shape D that only sees cells of equal parity. It remains an interesting direction of future study to determine if a sublattice structure is the only way to contradict Theorem 5 for arbitrary shapes. We conjecture that Corollaries 6 and 7 hold for arbitrary shapes, that is, that there does not exist a twodimensional low complexity aperiodic SFT. A special case of this is the recently solved periodic cluster tiling problem [3, 18].
Corollary 10 naturally raises the question whether the additive term f(n)n can be replaced by some constant, or can at least f(n) in it be replaced by a constant. By Corollary 7 we know that constant c = 0 does not work, but some other constant might work.
Naturally, there exists m,n,c and a set P of nm + c allowed patterns such that \(\mathcal {V}(P)\) is aperiodic (take for example any aperiodic SFT and choose c accordingly). It is not known what might be the smallest such c, and this constitutes an interesting open problem. We just know that c > 0 by Corollary 6.
References
Baake, M., Grimm, U: Aperiodic order, Volume 1: A mathematical invitation. https://doi.org/10.1017/CBO9781139025256 (2014)
Berger, R.: The undecidability of the domino problem. Memoirs of the american mathematical society american mathematical society (1966)
Bhattacharya, S.: Periodicity and decidability of tilings of \(\mathbb {Z}^{2}\). https://muse.jhu.edu/article/746679/summary (2016)
Birkhoff, G.D.: Quelques théorèmes sur le mouvement des systèmes dynamiques. Bull. Soc. Math. Fr. 40, 305–323 (1912). https://doi.org/10.24033/bsmf.909
Boyle, M., Lind, D.: Expansive subdynamics. Trans. Am. Math. Soc. 349(1), 55–102 (1997). http://www.jstor.org/stable/2155304
Cassaigne, J.: Subword complexity and periodicity in two or more dimensions. In: Grzegorz, R., Wolfgang, T. (eds.) Developments in Language Theory. Foundations, Applications, and Perspectives, 69 July 1999, pp 14–21. World Scientific, Aachen Germany (1999)
CeccheriniSilberstein, T., Coornaert, M.: Cellular Automata and Groups. Springer Monographs in Mathematics. Springer, Berlin Heidelberg (2010)
Cyr, V., Kra, B.: Nonexpansive \(\mathbb {Z}^{2}\)subdynamics and Nivat’s Conjecture. Trans. Am. Math. Soc. 367(9), 6487–6537 (2015). https://doi.org/10.1090/s000299472015063910
Jeandel, E., Rao, M.: An aperiodic set of 11 wang tiles. https://www.advancesincombinatorics.com/article/18614anaperiodicsetof11wangtiles (2015)
Jarkkom K.: Automata and Complexity. Essays presented to Eric Goles on the occasion of his 70th birthday. In: Adamatzky, A. (ed.) . in press. Springer Verlag (2021)
Kari, J., Moutot, E.: Nivat’s conjecture and pattern complexity in algebraic subshifts. Theor. Comput. Sci. https://doi.org/10.1016/j.tcs.2018.12.029 (2019)
Kari, J., Moutot, E.: Decidability and periodicity of low complexity tilings. In: Paul, C., Bläser, M. (eds.) 37th International Symposium on Theoretical Aspects of Computer Science (STACS 2020), volume 154 of Leibniz International Proceedings in Informatics (LIPIcs). https://doi.org/10.4230/LIPIcs.STACS.2020.14, pp 14:1–14:12. Schloss Dagstuhl–LeibnizZentrum für Informatik, Dagstuhl, Germany (2020)
Kari, J., Szabados, M.: An algebraic geometric approach to nivat’s conjecture. In: Halldórsson, M.M., Iwama, K., Kobayashi, N., Speckmann, B. (eds.) Automata, Languages, and Programming  42nd International Colloquium, ICALP 2015, July 610, 2015, Proceedings, Part II, pp 273–285. Springer, Kyoto, Japan (2015)
Nivat, M.: Keynote address at the 25th anniversary of EATCS, during ICALP 1997 Bologna (1997)
Robinson, R.M.: Undecidability and nonperiodicity for tilings of the plane. Invent. Math. 12(3), 177–209 (1971)
Sloane, N.J.A.: The online encyclopedia of integer sequences. http://oeis.org(2020)
Szabados, M.: Nivat’s conjecture holds for sums of two periodic configurations. In: Tjoa, A.M., Bellatreche, L., Biffl, S., Leeuwen, J.v., Wiedermann, J. (eds.) SOFSEM 2018: Theory and Practice of Computer Science, pp 539–551. Springer International Publishing, Cham (2018)
Szegedy, M.: Algorithms to tile the infinite grid with finite clusters. In: 39th Annual Symposium on Foundations of Computer Science, FOCS ’98, November 811, 1998. https://doi.org/10.1109/SFCS.1998.743437, pp 137–147. IEEE Computer Society, Palo Alto, California, USA (1998)
Wang, H.: Proving theorems by pattern recognition – II. Bell Syst. Tech. J. 40(1), 1–41 (1961). https://doi.org/10.1002/j.15387305.1961.tb03975.x
Acknowledgements
The authors thank the anonymous reviewers for their numerous helpful remarks.
Funding
Open access funding provided by University of Turku (UTU) including Turku University Central Hospital. Jarkko Kari Supported by the Academy of Finland grant 296018. Etienne Moutot Supported by ANR project CoCoGro (ANR16CE400005).
Author information
Authors and Affiliations
Corresponding authors
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This article belongs to the Topical Collection: Special Issue on Theoretical Aspects of Computer Science (STACS 2020) Guest Editors: Christophe Paul and Markus Bläser
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Kari, J., Moutot, E. Decidability and Periodicity of Low Complexity Tilings. Theory Comput Syst 67, 125–148 (2023). https://doi.org/10.1007/s00224021100638
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00224021100638