## 1 Introduction

The tiling problem, also known as the domino problem, asks whether the two-dimensional 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 non-periodic [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 non-matching 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 bi-infinite 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 n2 + 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 quasi-crystals 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 nm, 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 } ,n-1$$ and $$0,{\dots } ,m-1$$, respectively. The n × m rectangle at position $$\mathbf {u}\in \mathbb {Z}^{2}$$ of the two-dimensional 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 two-dimensional grid $${\mathbb {Z}}^{2}$$ with elements of A is called a (two-dimensional) configuration. We use the notation cn 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 = cnt, for all $$c\in A^{\mathbb {Z}^{2}}$$ and all $$\mathbf {n}\in \mathbb {Z}^{2}$$. If τt(c) = c for a non-zero $$\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 two-periodic, 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 pAD of some finite domain $$D\subset {\mathbb {Z}}^{d}$$. For a fixed D, we call such p also a D-pattern. 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 D-patterns that appear in a configuration c is denoted by $${\mathscr{L}}_{D}({c})$$, that is,

$${\mathcal{L}_{D}(c)}=\left\{\tau^{\mathbf{t}}(c)|_{D}\ |\ \mathbf{t}\in{\mathbb{Z}}^{2}\ \right\}.$$

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 two-dimensional 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 xiyj is ci,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

$$\text{Ann}(c) = \left\{ f\in {\mathbb{Z}}\left[x^{\pm 1}, y^{\pm 1}\right] ~|~ fc=0 \right\} .$$

It was observed in [13] that if a configuration has low complexity with respect to some shape D then it is annihilated by some non-zero 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 non-zero polynomial.

One of the main results of [13] states that if a configuration c is annihilated by a non-zero 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 non-zero polynomial. Then there exist pairwise linearly independent $$(i_{1}, j_{1}), \ldots , (i_{m}, j_{m})\in \mathbb {Z}^{2}$$ such that

$$\left(x^{i_{1}}y^{j_{1}} - 1\right) {\cdots} \left(x^{i_{m}}y^{j_{m}} - 1\right) \in \text{Ann}(c) .$$

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 two-dimensional 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

$$X_{F}=\left\{c\in A^{{\mathbb{Z}}^{2}}\ \mid \mathcal{L}(c)\cap F=\emptyset\right\},$$

the set of configurations that avoid all patterns in F. A set XF is a subshift, and every subshift is XF for some F. If X = XF 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 D-patterns 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 D-patterns yields the SFT

$$\mathcal{V}(P) = X_{A^{D}\setminus P}=\left\{c\in A^{{\mathbb{Z}}^{2}}\ \mid {\mathcal{L}_{D}(c)}\subseteq P \right\},$$

the set of configurations whose D-patterns are among P. We call elements of $$\mathcal {V}(P)$$ valid configurations for P.

We call an SFT aperiodic if it is non-empty 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 so-called Wang tiles, but our formulation is equivalent. The tiling problem is undecidable [2]. An SFT is called aperiodic if it is non-empty 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 two-dimensional SFT that contains a periodic configuration must also contain a two-periodic 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 non-empty subshifts inside it. A classical result by Birkhoff [4] implies that every non-empty subshift contains a minimal subshift, so there is a uniformly recurrent configuration in every non-empty 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

$$H_{\mathbf{u}} = \left\{\mathbf{x}\in\mathbb{Z}^{2}\ |\ \langle{\mathbf{x}}, {\mathbf{u}}\rangle < 0\right \}$$

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$$

$$c|_{H_{\mathbf{u}}}=c^{\prime}|_{H_{\mathbf{u}}} \Longrightarrow c=c^{\prime},$$

that is, if the contents of a configuration in the half plane Hu uniquely determines the contents in the rest of the cells. Note that it is enough to verify that the value c0 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

$$B_{\mathbf{u}}^{k} = \left\{\mathbf{x}\in{\mathbb{Z}}^{2}\ |\ -k < {\langle \mathbf{x}, \mathbf{u} \rangle} < 0 \text{ and } -k < {\langle \mathbf{x}, \mathbf{u}^{\bot} \rangle} < k \right\}$$

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 two-sided determinism. If X is deterministic in direction u but not in direction −u we say that u is a direction of one-sided determinism. Directions of two-sided 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 non-determinism. 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

Two-dimensional 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 4-tuple

$$a=\left(a_{\uparrow}, a_{\rightarrow}, a_{\downarrow}, a_{\leftarrow}\right)\in C^{4}$$

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

$$\begin{array}{@{}rcl@{}}c(i,j)_{\uparrow} &=& c(i,j+1)_{\downarrow}, \\ c(i,j)_{\downarrow} &=& c(i,j-1)_{\uparrow}, \\ c(i,j)_{\rightarrow} &=& c(i+1,j)_{\leftarrow}, \\ c(i,j)_{\leftarrow} &=& c(i-1,j)_{\rightarrow}. \end{array}$$

Otherwise there is a tiling error at position (i,j). We let

$$\mathcal{V}(T) = \left\{c\in T^{{\mathbb{Z}}^{2}}\ |\ c \text{is correctly tiled at every position} \mathbf{u}\in{\mathbb{Z}}^{2} \right\}$$

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 two-dimensional 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 T1 × T2 have hence two layers that tile the plane independently according to T1 and T2, 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)

1. (a)

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

2. (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 two-dimensional configuration that has a non-trivial annihilator. Then $$\overline {\mathcal {O}(c)}$$ contains a configuration $$c^{\prime }$$ such that $$\overline {\mathcal {O}(c^{\prime })}$$ has no direction of one-sided 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 two-dimensional 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 D-patterns 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 D-patterns 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 semi-algorithm to test if a given SFT is empty, and there is a semi-algorithm to test if a given SFT contains a periodic configuration. Let us denote $$P\subseteq A^{D}$$ the set of D-patterns given as input. Since $$\mathcal {V}({P})$$ is an SFT, we can execute both of these semi-algorithms 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 semi-algorithms 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 nN 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 many-one 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 nN 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 non-empty. □

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 n2 + 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 n2 + k(n + n) ≤ n2 + f(n)n binary patterns of size n × n such that $$\mathcal {V}(P)$$ is non-empty 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 + ε)n2 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 n2 + 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 n2 + k(n + n) ≤ n2 + 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 One-sided Determinism

In this section we prove Theorem 4 by showing how we can “remove” one-sided directions of determinism from subshifts with annihilators.

Let c be a configuration over alphabet $$A\subseteq {\mathbb {Z}}$$ that has a non-trivial annihilator. By Theorem 2 it has then an annihilator ϕ1ϕm where each ϕi is of the form

$$\phi_{i}=x^{n_{i}}y^{m_{i}}-1 \text{ for some } \mathbf{v}_{i}=(n_{i},m_{i})\in{\mathbb{Z}}^{2}.$$
(1)

Moreover, vectors vi 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 non-deterministic in a direction that is perpendicular to one of the directions vi 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 vi 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,eX such that de but $$d|_{H_{\mathbf {u}}}=e|_{H_{\mathbf {u}}}$$. Denote Δ = de. 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 _{i-1}\cdot {\Delta }$$. Because $$\phi _{i}\cdot {{\Delta }^{\prime }}=0$$, configuration $${{\Delta }^{\prime }}$$ is periodic in direction vi. But because Δ is zero in the half plane Hu, also $${{\Delta }^{\prime }}$$ is zero in some translate $$H^{\prime }={H_{\mathbf {u}}}-\mathbf {t}$$ of the half plane. Since the periodicity vector vi 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 one-sided 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 vi. Without loss of generality, we may assume i = 1. We denote ϕ = ϕ1 and v = v1.

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,eX

$$d|_{B}=e|_{B} \Longrightarrow d_{\mathbf{0}}=e_{\mathbf{0}}.$$
(2)

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 = Hu.

### Lemma 14

For any d,eX such that ϕd = ϕe holds:

$$d|_{B}=e|_{B} \Longrightarrow d|_{H}=e|_{H}.$$

### Proof

Let d,eX be such that ϕd = ϕe and d|B = e|B. Denote Δ = de. 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

$$S=\bigcup\limits_{i\in{\mathbb{Z}}} (B+i\mathbf{v}) = \left\{\mathbf{x}\in{\mathbb{Z}}^{2}\ |\ -k< {\langle \mathbf{x}, \mathbf{u} \rangle} < 0\right\},$$

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 c1,…,cnX be pairwise distinct. If ϕc1 = ⋯ = ϕcn 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 = Hu such that c1,…,cn are pairwise different on $$H^{\prime }$$. Consider the translated configurations di = τt(ci). We have that diX are pairwise different on H and ϕd1 = ⋯ = ϕdn. By Lemma 14, configurations di must be pairwise different on domain B. There are only |A||B| different patterns in domain B. □

Let c1,…,cnX be pairwise distinct such that ϕc1 = ⋯ = ϕcn, with n as large as possible. By Corollary 15 such a maximal n exists. Let us repeatedly translate the configurations ci by τu and take a limit: by compactness there exists n1 < n2 < n3… such that

$$d_{i}=\underset{j\rightarrow \infty}{\lim} \tau^{n_{j}\mathbf{u}}(c_{i})$$

exists for all i ∈{1,…,n}. Configurations diX inherit the following properties from ci:

### Lemma 16

Let d1,…,dn be defined as above. Then

1. (a)

ϕd1 = ⋯ = ϕdn, and

2. (b)

Configurations di are pairwise different on translated discrete boxes $$B^{\prime }=B-\mathbf {t}$$ for all $$\mathbf {t}\in \mathbb {Z}^{2}$$.

### Proof

Let i1,i2 ∈{1,…,n} be arbitrary, i1i2.

1. (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}}.$$
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 = Hu. This means that for all sufficiently large j the configurations $$c_{i_{1}}$$ and $$c_{i_{2}}$$ are identical on the domain Hnjut. 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 di and consider its orbit closure. Choose d = d1 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,yY such that xy but x|H = y|H where, as usual, H = Hu. 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 = d1, 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 d1,…,dn, and take jointly converging subsequences: by compactness there are k1 < k2 < … such that

$$e_{i}=\underset{j\rightarrow\infty}{\lim} \tau_{k_{j}}(d_{i})$$

exists for all i ∈{1,…,n}. Here, clearly, e1 = x.

Let us prove that e1,…,en 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.

1. (i)

First, ϕx = ϕy: Because x|H = y|H we have ϕx|Ht = ϕy|Ht 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 vj for any j≠ 1, because v1 and vj are not parallel and −u is perpendicular to v1.) 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 i1,i2 ∈{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 e1 = x, we have shown that e1,…,en and y all have the same product with ϕ.

2. (ii)

Pairwise distinctness: First, y and e1 = x are distinct by the initial choice of x and y. Next, let i1,i2 ∈{1,…,n} be such that i1i2. 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 ei with i ≥ 2.

The following proposition captures the result established above.

### Proposition 18

Let c be a configuration with a non-trivial annihilator. If u is a one-sided direction of determinism in $$\overline {\mathcal {O}(c)}$$ then there is a configuration $$d\in \overline {\mathcal {O}(c)}$$ such that u is a two-sided direction of determinism in $$\overline {\mathcal {O}(d)}$$.

### Proof

Let c be a configuration with a non-trivial annihilator and u a one-sided direction of determinism in $$\overline {\mathcal {O}(c)}$$. Then, consider c1,…,cn as in Corollary 15 and n as large as possible. Then, by taking

$$d = \underset{j\rightarrow \infty}{\lim} \tau^{n_{j}\mathbf{u}}(c_{1}) ,$$

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 two-dimensional configuration that has a non-trivial annihilator. Every non-empty 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 one-sided 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 two-sided 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 non-empty 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 non-deterministic in both directions u and −u. The first case is handled by the following well-known corollary from a theorem of Boyle and Lind [5]:

### Proposition 19

A configuration c is two-periodic 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 two-dimensional uniformly recurrent configuration that has low complexity with respect to a rectangle. If for some u both u and −u are directions of non-determinism 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 non-empty and let $$\mathbf {u}\in {\mathbb {Z}}^{2}\setminus \{\mathbf {0}\}$$. The edge Eu(D) of D in direction u consists of the cells in D that are extremal in the direction u:

$$E_{\mathbf{u}}(D) = \{ \mathbf{v}\in D\ |\ \forall \mathbf{x}\in D\ {\langle \mathbf{x}, \mathbf{u} \rangle} \leq {\langle \mathbf{v}, \mathbf{u} \rangle} \}.$$

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

$$S_{\mathbf{u}}^{k} = \left\{\mathbf{x}\in{\mathbb{Z}}^{2}\ |\ -k< {\langle \mathbf{x}, \mathbf{u} \rangle} \leq 0\right\}.$$

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 Eu(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 SEu(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 D-patterns that appear in c. A finite discrete convex set $$D\subseteq \mathbb {Z}^{2}$$ is called u-balanced in c if the following three conditions are satisfied, where we denote E = Eu(D) for the edge of D in direction u:

1. (i)

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

2. (ii)

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

3. (iii)

|DL|≥|E|− 1 for every line L perpendicular to u such that DL.

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 (DE)-patterns in c that can be extended in more than one way into a D-pattern 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 two-dimensional 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 u-balanced or a (−u)-balanced set $$D \subseteq \mathbb {Z}^{2}$$.

A crucial observation in [8] connects balanced sets and non-determinism to periodicity. This leads to the following statement.

### Lemma 22 (Lemma 4 in 17)

Let d be a two-dimensional configuration and let $$\mathbf {u}\in {\mathbb {Z}}^{2}\setminus \{\mathbf {0}\}$$ be such that d admits a u-balanced 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|Se|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 two-dimensional uniformly recurrent configuration that has low complexity with respect to a rectangle. Let u be such that both u and −u are directions of non-determinism in $$\overline {\mathcal {O}(c)}$$. By Lemma 21 configuration c admits a u-balanced or a (−u)-balanced set $$D \subseteq {\mathbb {Z}}^{2}$$. Without loss of generality, assume that D is u-balanced in c. As $$\overline {\mathcal {O}(c)}$$ is non-deterministic 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 u-balanced 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 0S and $$S^{\circ }\subseteq H_{\mathbf {u}}$$, the conditions in Lemma 22 are met. By the lemma, configuration d is p-periodic 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 p-periodic. □

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 two-dimensional 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 low-complexity configuration, by Lemma 1 it has a non-trivial annihilator. By Theorem 4 there exists $$c^{\prime }\in \overline {\mathcal {O}(c)}$$ such that $$\overline {\mathcal {O}(c^{\prime })}$$ has no direction of one-sided determinism. If all directions are deterministic in $$\overline {\mathcal {O}(c^{\prime })}$$, it follows from Proposition 19 that $$c^{\prime }$$ is two-periodic. Otherwise there is a direction u such that both u and −u are directions of non-determinism 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

$$S=\left\{2^{j}-1\ |\ j=0,1,{\dots} ,t-1\right\}$$

and s = 2t− 1. The set $$S\subseteq \llbracket s\rrbracket$$ has the property that for a,bS, ab, the difference ab uniquely identifies both a and b. The proof of this fact is easy.

### Lemma 23

For a1,a2,b1,b2S, if a1b1 = a2b2≠ 0 then a1 = a2 and b1 = b2.

Fix a bijection α : TS. 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 nN, the dimensions of the rectangular patterns considered, and define

$$D=\llbracket n\rrbracket \times \llbracket m\rrbracket.$$

Denote $$n^{\prime }=n-s$$ and $$m^{\prime }=m-1$$. 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

$$V_{i}=\left(in^{\prime}+\llbracket s\rrbracket\right) \times {\mathbb{Z}}$$

and horizontal strips

$$H_{j}={\mathbb{Z}}\times \{jm^{\prime}\},$$

for $$i,j\in {\mathbb {Z}}$$. There is exactly one symbol 1 in each intersection Ii,j = ViHj, 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

$$Q = \bigcup\limits_{c\in T^{{\mathbb{Z}}^{2}}} {\mathcal{L}_{D}(\beta(c))}.$$

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 Vi. Analogously, the rectangle intercepts a horizontal strip Hj and hence some Ii,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 Vi, and analogously it cannot intersect more than two horizontal strips Hj. This means that there are at most four symbols 1 in each pattern of Q.

Let pQ 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 non-empty intersection with two consecutive vertical strips Vi and Vi+ 1 and with two consecutive horizontal strips Hj and Hj+ 1. Rectangle E can be positioned in at most 2s positions relative to these strips, and there at most t4 choices of the Wang tiles encoded in the intersections of the two horizontal and two vertical strips. This means that there are at most 2st4 patterns p that can be extracted this way.

• Suppose that E has non-empty intersection with two consecutive vertical strips Vi and Vi+ 1 and with only one horizontal strip Hj. There are at most 2sm ways to position the rectangle and at most t2 choices for the two tiles encoded within the block. There are hence at most 2smt2 patterns p of this type.

• Symmetrically, if E has non-empty intersection with two consecutive horizontal strips Hj and Hj+ 1 and with only one vertical strip Vj then the number of extracted patterns is bounded by nt2.

• 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

$$nm+2st^{4}+2st^{2}m+t^{2}n \leq nm+k(n+m)$$

for the cardinality of Q, where we can choose k = 2st4, assuming t ≥ 1. This choice of k works by a direct calculation due to t2 ≥ 1, st2 ≥ 1 and n ≥ 2: subtracting the left-hand-side from the right-hand-side yields

$$2st^{4}(n+m)-\left(2st^{4}+2st^{2}m+t^{2}n\right)=2st^{2}\left(t^{2}-1\right)m+t^{2}\left(2st^{2}-1\right)(n-1)-t^{2}\geq 0.$$

Note that constant k = 2st4 = |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 ab 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 Mian-Chowla 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 pQ.

• 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,bT 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 $$j-i=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 is < 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,bT 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 ji = α(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,

$$\mathcal{V}(P) = \left\{\tau^{\mathbf{t}}(\beta(c))\ |\ \mathbf{t}\in{\mathbb{Z}}^{2} \text{ and } c\in \mathcal{V}(T)\right\}.$$

### 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,wT, 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,yT 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 xy 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,wT. 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 vi,j, for all $$i,j\in \mathbb {Z}$$, that is, the unique tT 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 = 2t− 1, N = 3s and k = 2st4. Let nN 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 two-dimensional 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 non-periodic 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 two-dimensional 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.