1 Introduction

Cellular automata are studied as a computation model with a theoretical computer science approach [2], and as a dynamical complex system with a multi-disciplinary approach [3]. The former approach uses specific portions of the whole configuration to encode computation and manages to achieve strong results on complexity or decidability. The latter looks at all configurations and try to prove results on the global behaviour. Roughly speaking, most results for computation deal with the existence of a specific configuration, whereas dynamics study the evolution for all of them.

It is a matter of fact there exists a few results that exploit the computational tools to prove behaviours on all configurations. The key example of such a result is the undecidability of nilpotency by Kari [1] in which he uses an aperiodic tiling to recursively embed everywhere in the configuration some parts of computation of arbitrary size. Using this tool, he can send ill-formed configurations “into a sink-hole” and work on the correct ones. More recently, a result has been obtained in the context of synchronisation using the same aperiodic tiling [4]. This construction generates linear zones embedding the aperiodic tiling is used.

In this paper, we investigate the possibility of constructing zones of various shapes embedding aperiodic tiling. Intuitively, we wonder whether we can fill inside of curves generated by methods similar to those used in [5, 6] with Kari’s tiling. The results also open interesting questions on determinism of tile sets.

The paper is organised as follow: in Sect. 2, we present the two used models (cellular automata and tile sets) along with notions of constructing and filling. In Sect. 3, we focus on determinism in tiling and look with more details at Kari’s tiling. In Sect. 4, we state several results about aperiodic filling. At last, we propose some perspectives in Sect. 5.

2 Constructions and Fillings

2.1 Cellular Automata

In this paper, we consider cellular automata in dimension one with nearest neighbours. Therefore, a cellular automaton is a pair \((Q,\delta )\) where Q is a finite set of states and \(\delta : Q^3 \rightarrow Q\) is the local transition function. We assume that the automaton has a quiescent state \(B \in Q\) satisfying \(\delta (B,B,B)=B\). The global dynamics is achieved by applying uniformly and synchronously the local transition function to a bi-infinite line of cells: a space-time diagram D is an element of \(S^{\mathbb {Z}\times \mathbb {N}}\) satisfying for all \((i,j) \in \mathbb {Z}\times \mathbb {N}, D(i,j+1)=\delta \left( D(i-1,j),D(i,j),D(i+1,j)\right) \). One can note that the space-time diagram is fully determined by the initial line \(\{ D(i,0) \mid i \in \mathbb {Z}\}\). In this paper, we shall look at the space-time diagram \(D_q\) generated by an initial state \(q \in Q\), defined as \(D_q(0,0) = q\) and \(D_q(i,0) = B\) for \(i \ne 0\). By the previous remark, this is sufficient to define the whole space-time diagram.

We want to look at functions which can be constructed by cellular automaton as depicted in Fig. 1: in the space time diagram generated from a configuration containing only one cell in q and all other cells blank, the curve f is drawn with a subset of marked states \(M \subset Q\). The portion above the curve is filled with non-marked non-blank symbols whereas the portion below the curve is filled with blanks.

Definition 1

A function \(f: \mathbb {N}\rightarrow \mathbb {N}\) is constructible if there exists a cellular automaton \((Q \cup \{B\},\delta )\), \(q \in Q\), and \(M \subset Q\), such that \(D_q\) satisfies:

  • \(D_q(i,j)=B\) for \(i<0\) and \(j \in \mathbb {N}\);

  • \(D_q(i,f(i))\in M\) for \(i > 0\);

  • \(D_q(i,j) = B\) for \(i > 0\) and \(j < f(i)\);

  • \(D_q(i,j) \in Q {\setminus } M\) for \(i \in \mathbb {N}\) and \(j > f(i)\).

Fig. 1.
figure 1

A basic example of constructible function

It can be seen that the definition only makes sense for function \(f: \mathbb {N}\rightarrow \mathbb {N}\) that are strictly increasing and satisfy \(f(0)=0\).

This notion of constructibility has already been investigated, leading to hierarchy results [7] or even impossibility results [6]. Here, we will focus on filling the zone above the curve with an aperiodic tiling.

2.2 Tile Set

A Wang tile t is a square tile with coloured edges, as represented in Fig. 2. Formally, it is given by a quadruplet \((t_e,t_w,t_n,t_s)\) of symbols chosen among a finite alphabet. A tile set \(\tau \) is a finite set of Wang tiles. A tiling of the plane by \(\tau \) is a map \(T : \mathbb {Z}^2 \rightarrow \tau \) from the discrete plane to the tile set so that two tiles that share a common edge agree on the colour: For all integers ij we have \(T(i, j)_e = T(i+1, j)_w\) and \(T(i, j)_n = T(i, j+1)_s\). A tiling T is said periodic if there exists \(p,p' > 0\) such that for any \(i,j \in \mathbb {Z}\), \(T(i,j)=T(i+p,j)=T(i,j+p')\).

Fig. 2.
figure 2

Wang tiles

Given a constructible function, we want to see in which case the portion above the curve can be (in a constructive way) filled with tiles from a chosen tile set.

Definition 2

A function f is fillable by a tile set \(\tau \) if it is constructible by a cellular automaton \((Q \cup \{B\},\delta )\) and there exists a projection \(\pi : Q \rightarrow \tau \) and a tiling T such that for any \(i \in \mathbb {N}\) and \(j > f(i)\), \(\pi (D_q(i,j))=T(i,j)\).

With this definition, it is not so difficult to prove that any constructible function can be filled by a tile set which has a periodic tiling.

Proposition 1

Let \(\tau \) be a tile set which admits a periodic tiling, then any constructible function f is fillable with \(\tau \).

Proof

Let us take a tile set \(\tau \) and \(T : \mathbb {Z}\rightarrow \tau \), \(T(i [p],j [p'])=\tau _{(i,j)}\) be one of its periodic tiling. Let f be a constructible function by a cellular automaton \((Q \cup \{B\},\delta )\). We extend this automaton by adding a new layer containing the tiling \(( (Q \cup \{B\}, \tau \cup \{ C \}), \delta ')\) where

$$ \delta '( (q_l,t_l), (q_c,t_c), (q_r,t_r) ) = (\delta (q_l,q_c,q_r), t(\delta (q_l,q_c,q_r),t_l,t_c)) $$

and

$$ t(q,t_l,t_c) = \left\{ \begin{array}{c c } \tau _{(i,j +1 [p'])} &{} \text {if } q \in Q {\setminus } M \text { and } t_c = \tau _{(i, j)} \\ \tau _{(i + 1 [p],j + 1 [p'])} &{} \text { if } q \in M \text { and } t_l = \tau _{(i, j)} \\ C &{} \text {otherwise} \end{array} \right. $$

If we set \(B' = (B,C)\) and \(q'_0 = (q_0,\tau _{(0,0)})\) then it is easy to show by recurrence over j and i that the cellular automaton fills f.    \(\square \)

This notion of fillable can be extended to get rid of the constructible constraint. This extension can model the fact that the curve dominated by an external action.

Definition 3

A function f is loosely fillable with a tile set \(\tau \) if there exists, a cellular automaton \((Q \cup \{B\},\delta )\), \(q \in Q\), a tiling T, a diagram \(\tilde{D} \in \mathbb {Z}\times \mathbb {N}\rightarrow Q\), and a projection \(\pi : Q \rightarrow \tau \) such that,

if we define the diagram \(\tilde{D} \in \mathbb {Z}\times \mathbb {N}\rightarrow Q\) as

  • \(\tilde{D}(i,j)=B\) for \(i<0\) and \(j \in \mathbb {N}\);

  • \(\tilde{D}(i,j)=B\) for any \(i \ge 0\) and \(j < f(i)\);

  • \(\tilde{D}(0,0)=q\);

  • \(\tilde{D}(i,j)=\delta (\tilde{D}(i-1,j-1),\tilde{D}(i,j-1),\tilde{D}(i+1,j-1))\) otherwise,

we have for any \(i \in \mathbb {N}\) and \(j > f(i)\), \(\pi (\tilde{D}(i,j))=T(i,j)\)

As previously, this definition makes sense only for functions \(f: \mathbb {N}\rightarrow \mathbb {N}\) that are strictly increasing and satisfy \(f(0)=0\).

Remark that even if this definition removes the set M to mark the points (if(i)), it is possible to construct an automaton having this additional property since those points are the first ones in the column which are not in state B. The last remark implies that the construction of Proposition 1 applies as well to this extension.

Proposition 2

Let \(\tau \) be a tile set which admits a periodic tiling, then any function f is loosely fillable with \(\tau \).

Proof

Just replace the test \(q \in M\) by \(q \ne B\) and \(t_c = C\) in the previous construction.

3 Aperiodic Tile Set

Since filling is easy when the tile set admits a periodic tiling, let us look at what happens in the other case: A tile set \(\tau \) is said to be aperiodic if there exists at least a valid tiling of the plane but no periodic tiling. A tile set of this kind was first found by Berger [8] to prove undecidability of the AEA fragment of logic. Since, several other aperiodic tile sets have been found [9,10,11,12].

3.1 From Tile Set Determinism to Cellular Automaton

In our case, the filling by cellular automata introduces some kind of determinism in the tiling. The corresponding notion has been introduced by Jarkko Kari: a tile set is said to be north-west deterministic if there is at most one possible tile \((t_e,t_w,t_n,t_s)\) for every possible choice of \((t_e,t_s)\). To keep the original terminology, north is going down.

This definition introduces one difficulty: the determinism has defined previously does not go in the same direction than the one induced by cellular automata. To overcome this problem, we shift each column of 1 relative to the previous one as depicted in Fig. 3.

With this operation, for any \(x,y \in \mathbb {N}\), the point at coordinates (xy) is mapped to the position \((i,j)=(x,y+x)\). Since we have taken f strictly increasing, \(f(n) \ge n\) and thus those points are the only ones used in the definition of filling.

Fig. 3.
figure 3

From tile set determinism to cellular automata

We slightly alter the definition of fillable to match this transformation:

Definition 4

A function f is fillable by a north-west deterministic tile set \(\tau \) if it is constructible by a cellular automaton \((Q \cup \{B\},\delta )\) and there exists a projection \(\pi : Q \rightarrow \tau \) and a tiling T such that for any \(i \in \mathbb {N}\) and \(j > f(i)\), \(\pi (D_q(i,j))=T(i,j-i)\).

The loose fillable variant can be adapted in the same way.

This transformation achieves one easy implication from tile set determinism to cellular automata determinism: if a tile set is north-west deterministic, it can be “simulated” by a cellular automata. The converse is also true: any cellular automata can be “simulated” by a north-west deterministic tiling.

3.2 A NW-Deterministic Aperiodic Tile Set

This part is devoted to present the north-west deterministic tile set constructed by Kari in [1] which is built over the tiling from Robinson [9]). The reader can refer to those papers for the formal proof of aperiodicity.

This tile set can be described with two layers (corresponding to a Cartesian product). The first one is just a regular 4 coloured grid. The second one is usually depicted using lines. The tiles are depicted in Fig. 4.

Theorem 1

(Kari [1]). The tile set depicted in Fig. 4 is north-west deterministic and aperiodic.

Fig. 4.
figure 4

A north-west deterministic aperiodic tile set

Proof

(Idea). The north-west deterministic property is easy to check. The aperiodicity is more complex but relies on the following fact: the first layer forces a 4-periodic background supporting squares of size 2 on the second layer. The second layer is designed such that squares of size n force the existence of squares of size 2n.    \(\square \)

We are particularly interested in the specific tiling depicted in Fig. 5. Due to the auto-similar characteristic of the tile set, we can see (as represented in Fig. 6) that the tiling can be extended to the infinite quarter of plan. Also note that we can even construct a full tiling of the plan but this will not be of use here. The main useful point of this partial tiling is that its regularity will allow to achieve filling.

Fig. 5.
figure 5

A valid quarter of the plan tiling

4 Aperiodic Filling

In this section, we shall fill curves using Kari’s tile set \(\tau _K\) presented in the previous section and especially the portion of the tiling depicted in Fig. 5. To better see what happens in this tiling, Fig. 6 decorates the lines with different widths (that are not present in the tile set) to highlight the hierarchical structure in which squares assemble themselves into larger squares.

Fig. 6.
figure 6

Hierarchical vision of Kari’s tiling

Since the tile set is NW deterministic, we define as \(K: \tau _K \times \tau _K \rightarrow (\tau _K \cup \emptyset )\) the application which associate to two tiles, the unique one fitting in the NW corner (if it exists).

4.1 Linear Functions

The first result concerns identity function and corresponds to the case used in [4].

Proposition 3

The function \(f(n)=n\) is fillable by Kari’s tile set.

Proof

The constructibility of f is trivial.

To fill the curve, we shall add a layer similarly than in the proof of Proposition 1. This layer correspond to the tiling depicted previously. Inside the curve, we use NW determinism to guess the tile; On the borders (vertical on the left and diagonal on the right), we use the property that this correspond to lines over which the tiling has periodic behaviour of period 2 (see Fig. 6. Let us call \(\tau ^l_0 = T(0,2i), i \ge 0\), \(\tau ^l_1 = T(0,2i+1),i \ge 0\), \(\tau ^r_0 = T(2i,0), i > 0\), and \(\tau ^r_1 = T(2i+1,0), i \ge 0\).

Let \(f(n)=n\) be constructible by a cellular automaton \((Q \cup \{B\},\delta )\). We extend this automata by adding a new layer containing the tiling \(( (Q \cup \{B\}, \tau _K \cup \{ C \}), \delta ')\) where \(\delta '( (q_l,t_l), (q_c,t_c), (q_r,t_r) ) = (\delta (q_l,q_c,q_r), t(\delta (q_l,q_c,q_r),t_l,t_c))\) and

$$ t(q,t_l,t_c) = \left\{ \begin{array}{c c } K(t_l,t_c) &{} \text {if } q \in Q {\setminus } M, t_l \ne C \text { and } K(t_l,t_c) \ne \emptyset \\ \tau ^r_{i+1 [2]} &{} \text { if } q \in M \text { and } t_l = \tau ^r_i \\ \tau ^r_{1} &{} \text { if } q \in M \text { and } t_l = \tau ^l_0 \\ \tau ^l_{i+1 [2]} &{} \text {if } q \in Q {\setminus } M \text {, } t_l = C \text { and } t_c = \tau ^l_i \\ C &{} \text {otherwise} \\ \end{array} \right. $$

If we set \(B' = (B,C)\) and \(q'_0 = (q_0,T(0,0)=\tau ^l_0)\), we can see that the forth case of t correspond to cells which are on the Y-axis of both the tiling and the space-time diagram; the second case correspond to the X-axis of the tiling and the marked diagonal of the space-time diagram (the third case is the specific case happening at (0, 0). At last, the first case cover the inside of the tiling and the curve.

As we have chosen a valid tiling, it can be noted that the condition \(K(t_l,t_c) \ne \emptyset \) is always valid in the first case and thus C only occurs outside the curve. It follows that our conditions do correctly match boundaries and fill it with correct tiles.    \(\square \)

The previous proof relies on the fact that the tiling we use has two non-collinear lines on which it is periodic. It may be interesting to search whether this condition is sufficient or necessary to achieve the result and eventually look at aperiodic deterministic tile set not exhibiting such condition if they exists.

The previous result can be extended to linear functions for which the coefficient is a rational number.

Corollary 1

For any \(\alpha \in \mathbb {Q}\), \(\alpha > 1\) The function \(f(n)=\alpha n\) is fillable by an aperiodic tile set.

Proof

Constructing f consist on a signal of slope \(1/\alpha \) which is the most simple one to construct.

To fill, it is sufficient to apply a grouping by bloc of \((n \times m)\) where \(\alpha = m\)/n to Kari’s tiling and reuse the previous proof. The grouping preserves the NW-determinism and the regular lines in the tiling are shifted to the correct place. \(\square \)

4.2 Over-Logarithmic Growth Functions

For now, we haven’t still make use of the regularity visible in the tiling. This will allow us to gave a more general result:

Proposition 4

Let f be a constructible function such that, for all \(n \in \mathbb {N}\), \(f(n+1)-f(n) > 2\log _2(n)\), then f is fillable with Kari’s tile set.

Proof

Once again, we shall use the same method as in the proof of Proposition 3. In fact, the only difference is in the second and third case in the definition of t (the method to find the correct tile on the curve). All other cases are unchanged. Thus, the only case posing problem is to find the tile to put at positions marked (if(i)).

Let us look at the corresponding part in the tiling (see Fig. 7). It can be easily seen that among the information needed, most of it can be deduced from the cell to the bottom left of it (the east one). In fact, the background colour, the diagonal and the horizontal signals can be deduced leaving only the vertical signal.

Fig. 7.
figure 7

Guessing the correct tile at position (if(i))

Looking more in detail at Fig. 6, we can see that this signal has a high regularity: if we consider the x-th vertical line, the signal is periodic of period \(2^{i+2}\) where i is the least significant non-zero bit of \(x+1\) (that is, all odd columns have period 4, all even but not multiple of 4 have period 8, ...). More specifically, the signal alternates every \(2^{i}\) on a cycle of 4 colours with the same starting point on the X-axis. Thus, to find the last missing piece of information, it is sufficient to keep track of \(x+1\) and y (Y-value) corresponding to the position in the tiling and extract the correct bits.

Let us now look if it is possible to compute such values inside the interval. To do this, it is possible to maintain two integers recording x and y. To increment the value of y at each time steps, we need to use an increment with a lazy carry as in Fig. 8a. In this setup, the value of the counter can be read diagonally. It is also possible to shift the counter to the right keeping the same value as in Fig. 8b. The counter x is done in a similar way. Once both counters are present, the value needed can be easily extracted in \(2 \log (n)\) steps as depicted in Fig. 8c.

Fig. 8.
figure 8

Finding missing information for a new tile

The previous method is correct but gives the result with a \(2 \log (n)\) delay (which explain the condition on the growth of f). However, since there are only 4 possibilities, it is easy to try all of them simultaneously and erase the incorrect one when the result arrives. To be fully coherent with our definition, which require the projection to know exactly which is the tile, the previous method can be slightly altered to guess one vertical line in advance and keep it in addition to the current tile.

One last point to underline is that our proof assume that there is always enough place to keep the counters. If it is true for x, it may not be the case for y. However, in the latter case, it means that \(y = O(2^x)\) and since the vertical strip of width x the tiling is periodic of period \(4^x\), we can forget the high bits of y and still fill with a valid tiling.   \(\square \)

Even if our proof only use the marked M subset from the constructible function, this set can be emulated also in loose fill which allows to extend the result to this case.

Corollary 2

Let f be a function such that, for all \(n \in \mathbb {N}\), \(f(n+1)-f(n) > 2 \log _2(n)\), then f is loosely fillable with Kari’s tile set.

For the constructibility, there exists a gap between \(n - \log (n)\) and n where any function is not constructible [6]. At the moment, our result would suggest that there may be a similar gap for filling. This kind of result could prove interesting to better understand computation by cellular automata.

5 Conclusions and Perspectives

In this paper, we have shown that Kari’s tile set can be used deterministically to fill curves. This method may open new possibilities to results on the whole set of configuration using computability tricks since it is easy to force this tile set to embed computation.

With respect to this specific tile set, the question of optimality of results in Sect. 4 is still an open question. The logarithmic growth condition is due to the maximal complexity of our method to find the next valid tile. It can be noted that the mean complexity is constant so there is perhaps room for improvement even using our proof.

All those results are based on the “regularity” of one tiling in periodic or Kari’s tile set. This leads directly to try and generalise this for a wider range of tile set. In particular, one question is to find if there exists tile set for which the set of fillable function is different and understand why.

In this way, one class of tile set which may prove interesting are the one that can be depicted using substitutions. One first look at this set was done by Fernique and Ollinger [13]. The introduction of determinism and fill may allow to further discriminate into this class.

At last, one cannot end without asking how results extend in dimension two. Here, the main point is that this changes a lot the problem since the determinism is no more inside the tiling but only on its frontier and that it involves more complex geometric concepts since the border is no longer restricted to two points. Although very different, it may also be interesting in particular linking with the concept of self-assembly tile sets [14].