Abstract 1 Introduction 2 Configurations and Subshifts 3 Plane-walking Automata and Associated Subshifts 4 Alternating Hierarchy for Plane-walking Automata 5 Conclusion References

Subshifts Defined by Nondeterministic and Alternating Plane-Walking Automata

Benjamin Hellouin de Menibus ORCID Université Paris-Saclay, CNRS, Laboratoire Interdisciplinaire des Sciences du Numérique, 91400, Orsay, France Pacôme Perrotin ORCID Université Paris-Saclay, CNRS, Laboratoire Interdisciplinaire des Sciences du Numérique, 91400, Orsay, France
Abstract

Plane-walking automata were introduced by Salo & Törma to recognise languages of two-dimensional infinite words (subshifts), the counterpart of 4-way finite automata for two-dimensional finite words. We extend the model to allow for nondeterminism and alternation of quantifiers. We prove that the recognised subshifts form a strict subclass of sofic subshifts, and that the classes corresponding to existential and universal nondeterminism are incomparable and both larger that the deterministic class. We define a hierarchy of subshifts recognised by plane-walking automata with alternating quantifiers, which we conjecture to be strict.

Keywords and phrases:
Formal languages, Finite automata, Subshifts, Symbolic dynamics, Tilings
Copyright and License:
[Uncaptioned image] © Benjamin Hellouin de Menibus and Pacôme Perrotin; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Automata over infinite objects
; Theory of computation Tree languages ; Theory of computation Regular languages
Acknowledgements:
Many people have contributed to this article through discussions, suggestions and failed attempts; we wish to thank (in alphabetical order) Florent Becker, Amélia Durbec, Pierre Guillon and Guillaume Theyssier. We are grateful to Ville Salo for providing the proof of Theorem 8 and pointing us towards the Kari-Moore rectangles of Section 5.3, and to Denis Kuperberg and Thomas Colcombet for pointing us towards works on tree-walking automata cited in Section 5.2.
Funding:
The authors acknowledge financial support from the ANR-22-CE40-0011 project Inside Zero Entropy Systems.
Editors:
Olaf Beyersdorff, Michał Pilipczuk, Elaine Pimentel, and Nguyễn Kim Thắng

Il voulut être sofic,
il ne fut que pompé.

1 Introduction

One-dimensional finite automata are a classical model to recognise languages of finite words. They have been extended to recognise languages of finite patterns in two and more dimensions, often called picture languages, starting with the work of Blum and Hewitt in 1967 [3]. While the one-dimensional model is very robust to changes in definition, this is not the case in higher dimensions and many different models have been introduced with varying computational power; see [11] for a survey that focuses on the non-deterministic case.

Symbolic dynamics are concerned with subshifts, which are languages of infinite words or patterns. In dimension 1, sofic subshifts can be seen as the infinite counterparts to regular languages, and have three equivalent definitions: the set of infinite walks on a labelled graph (finite automaton without initial nor final states); the set of infinite words avoiding a regular set of forbidden subwords; the letter-to-letter projection of a subshift of finite type. The latter definition carries through to higher dimensions without difficulties to define higher-dimensional sofic subshifts.

There are many ways to extend regular languages to higher dimensions. Some models such as 4-way automata keep the notion of a linear run where the head reads the input pattern, letter by letter, by moving (“walking”) over the pattern; this contrasts with models such as recognisable languages where acceptance consists in checking local constraints instead of a run. Broadly speaking, the latter models are more powerful than the former, and the same phenomenon arises for languages on trees: tree automata vs. tree-walking automata. [7] provides a catalogue of the different kinds of models, while a more recent survey on the “walking” models can be found in [11].

When applying these models to subshifts, recognisable languages yields an alternative definition of sofic subshifts; this was first done in [8] to our knowledge, and we present this construction in Section 2.3. Recently, Salo and Törma introduced plane-walking automata (PWA) [14], a particular case of graph-walking automata, which are a counterpart of 4-way automata for infinite patterns. In particular, they proved that deterministic plane-walking automata define a class of subshifts that is strictly between subshifts of finite type and sofic subshifts, extending to infinite patterns a result from [9] on 4-way automata. It is also proved in [9] that, for finite patterns, nondeterministic 4-way automata are strictly more powerful than the deterministic version and that languages of alternating 4-way automata are incomparable with recognisable languages, a sharp contrast with the one-dimensional case.

In this paper, we introduce nondeterminism and alternations to plane-walking automata and consider the classes of higher-dimensional subshifts obtained this way. We prove that subshifts accepted by Σ1 PWA (existential nondeterminism) and Π1 PWA (universal nondeterminism) form incomparable classes (Theorem 14), both strictly larger than the deterministic case, and that subshifts accepted by arbitrary alternating PWA still form a strict subclass of sofic subshifts (Theorem 8). This yields two new classes of higher-dimensional subshifts that are intermediate between finite type and sofic subshifts, and natural in that they generalise one-dimensional sofic subshifts. We introduce an alternating hierarchy of nondeterministic power from deterministic up to unbounded alternating plane-walking automata, and conjecture that this hierarchy of subshifts does not collapse; to our knowledge, this is not known even for finite words. Our proofs involve equivalents of the pumping lemma for two-dimensional infinite patterns.

Definitions and results are written with the two-dimensional case (2) in mind, although they extend easily to any higher dimension, and our definitions also extend to any finitely generated groups (see [15]).

2 Configurations and Subshifts

2.1 Symbolic Dynamics

We call positions the elements of 2, which is endowed with the Manhattan distance d. We use =(1,0) and =(0,1), =(0,0) and so on; we often write 0 as a position instead of (0,0).

Let Σ be a finite set called alphabet. A configuration x is an element of Σ2, while a pattern p is an element of ΣS for some finite S2, called the support of p and denoted supp(p)=S. For i2, σi(x) is a new configuration shifted by i, i.e. (σi(x))j=xi+j. In dimension one, we call a pattern a word.

Given π:ΣΣ, we extend π to Σ2 by putting π(x)p=π(xp) for all p2.

A subshift X is a set of configurations that is closed in the product topology and invariant by all shifts; more concretely, it is defined as the set of configurations where no pattern from a set of forbidden patterns appears.

A subshift defined by a finite set of forbidden patterns is called of finite type (SFT for short). By a standard technique of higher block coding, replacing the alphabet Σ by Σ[0,n]×[0,n] for n large enough, we can assume without loss of generality that forbidden patterns all have support {,} or {,}, and we do throughout the paper.

A subshift that can be written as π(X), where X is an SFT on alphabet Σ and π:ΣΣ, is called sofic. In dimension one, sofic subshifts have alternative definitions as the set of bi-infinite walks on some labelled graph or as the set of bi-infinite words avoiding some regular set of forbidden words.

We denote the classes of SFT and sofic subshifts SFT and Sofic, respectively.

2.2 Two-dimensional Automata

We define an abstract model of two-dimensional automata. We use different notions of acceptance in the paper, and add additional restrictions to the model as necessary.

Definition 1.

A two-dimensional automaton on 2 is a labelled directed graph A=(V,E,Σ,D,I), where

  • V and E are finite sets of vertices and edges, respectively, where EV2×2 (we call the second component the direction);

  • Σ is a finite alphabet and D:VΣ associates a symbol to each vertex.

  • IV are the initial states and D is a bijection from I to Σ. For any aΣ, we denote ia the only state in I such that D(ia)=a.

If the automaton is alternating, then there is additionally a map Q:V{,} associating a quantifier to each vertex.

Notice that since E is finite, the set of possible directions is a finite subset of 2.

2.3 Recognisable Picture Languages

Recognisable languages, as introduced in [6], are a possible extension of regular languages to higher-dimensional words (or picture languages) as projections of local languages, which can be expressed using two-dimensional automata.

The same model applied on subshifts yields an alternative definition of sofic subshifts using two-dimensional automata.

Definition 2.

Let A be a non-alternating two-dimensional automaton whose set of directions is {,}. Given a pattern or a configuration x, an recognising run of A on x is a function r:supp(x)V such that:

  • for all isupp(x),D(r(i))=xi;

  • for all isupp(x) such that i+supp(x), there is an edge (r(i),r(i+),)E, and similarly for .

Then:

  • the recognised language Rf(A) is the set of all patterns that admit a recognising run.

  • the recognised subshift R(A) is the set of all configurations that admit a recognising run.

Notice that this definition is intrinsically nondeterministic in the choice of the run and makes no use of initial states, so we omit I in this section. The first equivalence of the following result appeared in [8, Proposition 7]; we provide a short proof in our framework.

Proposition 3.

For a subshift X, the following are equivalent:

  1. 1.

    X is sofic;

  2. 2.

    X=R(A) for some automaton A;

  3. 3.

    X is defined by a set of forbidden patterns Rf(A)c for some automaton A,

where A is assumed to satisfy the hypotheses of Definition 2.

Proof.

(12) Let Y be a SFT on alphabet Σ given by a finite set of forbidden patterns and π:ΣΣ be such that π(Y)=X; remember that we assume that patterns in have support {,} or {,}. We define A=(V,E,Σ,D) by setting V=Σ and D=π, and E is defined as follows: for all pΣ{,}, (p,p,)E if and only if p, and similarly for . By construction, yΣ2 is a recognising run of A on x if and only if yY and π(y)=x, so X=R(A).

(21). Let A=(V,E,Σ,D) be an automaton and define the SFT YV2 by the set of forbidden patterns:

={pV{,}:(p,p,)E}){pV{,}:(p,p,)E}.

Again by construction, y is a recognising run of A on x if and only if yY and D(y)=x, so X=D(Y) is sofic.

(23) The two statements are equivalent for any automaton A. If xR(A) has a recognising run, then the restriction of this run to any finite pattern in x is recognising, so all patterns in x belong to Rf(A). Conversely, if all patterns in x admit a recognising run, then x does as well by a standard compactness argument.

Notice that the third condition involves complementation, in contrast with the one-dimensional case; recognisable languages are not closed by complement in dimension 2 [1].

3 Plane-walking Automata and Associated Subshifts

Plane-walking automata generalise the definition of one-dimensional sofic subshifts seen as the set of infinite walks on a labelled graph.

3.1 Definitions

The automata we use in this section correspond to the plane-walking automata (PWA) from Salo and Törma [14] with one head and added nondeterminism. They are alternating two-dimensional automata with a specific acceptance condition, that we call alternating plane-walking automata to be consistent with the literature.

Definition 4 (Subshifts defined by plane-walking automata).

Let A=(V,E,Σ,D,I,Q) be an alternating PWA. Given xΣ2, p2 and vV, there is an accepting run on x starting from (p,v) if D(v)=xp and:

  • Q(v)= and there is an edge (v,v,d)E and an accepting run starting from (p+d,v), or

  • Q(v)= and all edges (v,v,d)E with D(v)=xp+d have an accepting run starting from (p+d,v); furthermore, there must be one such edge.

A configuration x is accepted by A if, for every p2, there is an accepting run of A on x starting from (p,ixp). The set of configurations accepted by A is a subshift, denoted L(A).

The lack of a base case in the previous definition means that an accepting run must be infinite; in other words, a run accepts if it never reaches a position and state with no possible move. The model of Salo and Törma used rejecting states, which we opted not to do by symmetry w.r.t the lack of accepting states; this is a stylistic choice as a rejecting state can be simulated by a state with no outgoing edge, and an accepting state by a state with a loop with direction .

An alternating plane-walking automaton and its associated subshift are illustrated in Figure 1. Without loss of generality, by adding additional states, the set of directions can be restricted to {,,,,} which we assume in the rest of this article.

Figure 1: On the left, an example of an alternating plane-walking automaton. On the right, a finite pattern of a configuration accepted by the automaton. The associated subshift is the subshift where all vertical and horizontal runs of 1s are either of even size or infinite.

We denote Alt the class of subshifts X such that X=L(A) for some alternating PWA A. It is not difficult, as in Proposition 3, to extend the notion of acceptance to finite patterns (considering a run as accepting when it leaves the support of the pattern), where it coincides with alternating 4-way picture-walking automata. Subshifts in Alt can equivalently be defined by a set of forbidden patterns that are the complement of the language of some alternating PWA. As for recognisable languages, these languages are not closed by complement [11, Theorem 7].

Plane-walking automata as considered by Salo & Törma [14] are deterministic, in the sense that there is only one outgoing edge from each state on which the run does not fail immediately; therefore the quantifiers in the definition are unused. We denote by Δ1 the class of subshifts defined by such deterministic plane-walking automata, and we call deterministic every state where the quantifier is not relevant, so we omit it in the pictures for clarity.

Definition 5 (Branch, Footprint).

A run on x can be represented by a tree where each vertex corresponds to a current position and state.

A branch of a run is a branch in that tree, in the usual sense.

The footprint of a subtree or a branch is the set of all visited positions.

3.2 Comparison with SFT and Sofic Subshifts

We show that subshifts defined by alternating plane-walking automata are an intermediate class between the two classical classes of SFT and sofic subshifts. Notice that, in dimension one, the classical powerset construction tells us that added nondeterminism does not impact the power of the finite automata, so every class defined in this article coincide with sofic subshifts.

The next result is proved in [14] (Inclusion is stated without proof, Strictness is Lemma 1; Inclusion also follows from Lemma 15 below).

Proposition 6.

SFTΔ1Alt.

The following result appeared in [9] (Theorem 1) for finite patterns. We translate the proof in our framework since our statements differ due to differing models.

Proposition 7.

AltSofic.

Proof.

Let A=(V,E,Σ,D,I,Q) be an alternating PWA. Let Σ=Σ×𝒫(V), where a symbol from Σ encodes the set of states starting from which there is an accepting run in the current position. Let π1 and π2 be the projections on the first and second component, respectively.

We define a SFT YΣ2 by the following set of forbidden patterns: for pΣ{,,,,}, denote p=(s,S) where sΣ and S𝒫(V). Then p if and only if:

  1. 1.

    vS,D(v)s, or

  2. 2.

    SI=, or

  3. 3.

    there is vS such that

    • Q(v)= and for all (v,v,d)E, we have pd=(s,S) with vS.

    • Q(v)= and there is (v,v,d)E such that pd=(s,S) with vS.

We claim that L(A)=π1(Y).

Given a configuration yY, we prove inductively the following statement: there is an accepting run starting from (i,v) on π1(y) for all i2 and vπ2(yi). If Q(v)=, then Condition 3 ensures we find an edge (v,v,d) with vπ2(yi+d). Condition 1 and iterating this argument yields an accepting run starting from (i+d,v). A similar argument works for . Condition 2 ensures that there is an initial state in π2(yi), so π1(y) is accepted by A.

Conversely, given a configuration xL(A), we define yi=(xi,Si) where SiV is the set of states v such that there is an accepting run on x from (i,v). Since x admits an accepting run from any position for some initial state, it is easy to see that all three conditions above are satisfied and yY.

The proof of the following result is due to Ville Salo (personal communication).

Theorem 8.

AltSofic.

Definition 9.

Given a one-dimensional subshift XΣ, its two-dimensional lift is defined as

X={yΣ2:xX,i,j,yi,j=xi}.

By the constructions of Aubrun-Sablik [2] or Durand-Romaschenko-Shen [5], the lift of any one-dimensional subshift given by a computable set of forbidden patterns is a sofic subshift.

Lemma 10.

If X is accepted by an alternating PWA, then X is sofic.

Proof.

Let A be the automaton that accepts X in the sense that X=L(A), and A be the automaton obtained by replacing every direction or by in A.

Since every configuration in X is constant in the vertical direction, A accepts every configuration in X (as well as additional configurations that are not constant vertically). Since A only travels horizontally, it can be seen as a two-way one-dimensional automaton that accepts exactly the one-dimensional configurations that lift to X; in other words, A accepts X. It follows that X is defined by a regular set of forbidden patterns, so it is sofic.

To prove Theorem 8, see that the lift X of any non-sofic one-dimensional subshift X given by a computable set of forbidden patterns is sofic and not accepted by any alternating PWA. It is well-known that such subshifts exist; see e.g. [12, Example 3.1.7].

4 Alternating Hierarchy for Plane-walking Automata

In this paper, we are interested in comparing the power of plane-walking automata with varying access to nondeterminism. We introduce an alternating hierarchy of subshifts, similar to the classic alternating hierarchies of propositional logic formulæ. We are not able to prove that this forms a strict hierarchy of subshifts, but we show that the hierarchy does not collapse at the first level.

4.1 Definitions

Starting from Δ1 (deterministic) PWA, we define Σ1, resp. Π1, PWA as the existential, resp. universal, PWA, that is, all states are labelled by quantifiers, resp. quantifiers. We call Σ1 and Π1 the corresponding classes of subshifts.

By definition, Δ1Σ1Π1. The rest of this paper is dedicated to show that Σ1 and Π1 are incomparable sets (and thus strictly larger than Δ1). First, we define the whole hierarchy inductively by using automata decompositions.

Definition 11 (Decomposition).

A two-dimensional automaton A=(V,E,Σ,D,I,Q) has a decomposition (S,VS) for SV if there exists no path from VS to S in E. By extension, we call decomposition the pair of induced subautomata.

Definition 12 (Σn and Πn).

An alternating plane-walking automaton is Σn+1 if it admits a decomposition into a Σ1-automaton and a Πn-automaton. We denote Σn+1 the class of subshifts X such that X=L(A) for a Σn+1-automaton.

The definitions for Πn+1 are symmetrical.

Equivalently, a Σn automata is such that the image by Q of any path starting from I is a word of with n blocks (n1 alternations). This justifies the following definition:

Definition 13 (Δn).

An alternating plane-walking automaton is Δn if the image by Q of any path starting from I is a word of {,} with n1 blocks (n2 alternations). We denote by Δn the class of subshifts X such that X=L(A) for some Δn PWA A.

Is is not difficult to see that ΔnΣnΔn+1 and ΔnΠnΔn+1. We do not know whether ΣnΠn=Δn.

We are ready to state our main result:

Theorem 14.

Σ1Π1, and Π1Σ1. As a consequence, Δ1Σ1 and Δ1Π1.

In the next two subsections, we build two subshifts in Σ1\Π1 and Π1\Σ1, respectively. We begin by a technical lemma:

Lemma 15.

Let XΣn be a subshift and Y be a SFT. Then XYΣn. The same holds for Π and Δ.

Proof.

Given a PWA A, define A as follows. From the initial state, check the area {,,} around the initial position. If a forbidden pattern is found, reject; this is done deterministically. Otherwise, come back to the initial position and execute a run of A. A belongs to the same class as A and accepts all configurations in L(A) where no forbidden pattern appears.

4.2 Sunny Side Up

Definition 16 (Sunny side up).

The sunny side up subshift Xssu is the set of configurations x{0,1}2 with at most one i2 such that xi=1.

The sunny side up subshift can be easily accepted using a -automaton that has the ability of exploring an unbounded space and rejecting if any “problem” is found in any of the branches.

Proposition 17.

XssuΠ1.

Figure 2: A -automaton accepting Xssu. A branch visiting the central state has no next move, so it rejects.
Proof.

Let A be the automaton represented in Figure 2. Every run starting from a position containing 0 accepts. Therefore every configuration with no 1 is accepted.

If A starts on a 1 at position i, it nondeterministically picks a quarter-plane to explore and rejects if this branch encounters another 1. A run never visits a given position twice, so if x contains a single 1, all runs accept.

If x contains two 1 at positions i and j, draw a path from i to j using at most two directions in {,,,}. This path yields a rejecting run starting from i.

Proposition 18.

XssuΣ1.

The following proof is related to Proposition 1 in [14], which only holds for deterministic PWA (and a larger class of subshifts). Intuitively, Σ1-automata are ill-fitted to explore unbounded spaces, as a run may reject from a given starting point only if all branches reject, but every branch may only visit a small part of the space.

In the next proof, we use the notation p±K={p±i:iK} for p2,K2.

Proof.

Let A be a Σ1 PWA with C states; we show that XssuL(A). For v2 and r, we denote by B+(v,r) the set {j2:k+,d(j,kv)r} (for the Manhattan distance on 2), and B(v,r)=B+(v,r)B+(v,r). In other words, this is the band of width r around the (half-)line of direction v starting from 0; if v=0, B(0,r)=B+(0,r) is a ball of radius r. When r is not indicated, we assume that r=C.

Let A be a Σ1-automaton that accepts all configurations in Xssu. Define xXssu such that xi=0 for all i; yXssu such that y0=1 and yi=0 for all other positions i; and, for any p0, zpXssu such that z0p=zpp=1 and zip=0 for all other positions i. We find some p such that A accepts zp, showing that A does not accept Xssu.

To find some accepted zp, we use the following property: if there is an accepting branch in x that visits neither 0 nor p, the same branch is accepting in zp. Similarly, if an accepting branch in y does not visit p or an accepting branch in σp(y) does not visit 0, then the same branch is accepting in zp.

Let S1(r)V×B(0,r) be such that (s,k)S1 if and only if there is an accepting run on y from (s,k). For each (s,k)S1, pick an arbitrary accepting branch b. It is described by a sequence (sn,pn)n(V×2). If b stays in B(0), we find two steps i<j such that (si,pi)=(sj,pj) and, by a pumping argument, we build another accepting branch bp which is eventually periodic and stays in B(0). If b leaves B(0), we find two steps i<j such that si=sj and d(0,pj)d(0,pi) and, by a pumping argument, we build another accepting branch bp which is eventually periodic up to translation by the pumping vector v(s,k)=pjpi every ji steps; in other words, bp stays in some band B(v(s,k)). Denote P1(r)={v(s,k):(s,k)S1(r)} the set of all such pumping vectors.

Let S0V be the set of states reachable from i0 through a path labelled by 0. Since x is accepted, there must be a cycle that stays in S0. For any such simple cycle (without repeated states), the associated pumping vector is the sum of all directions. Denote P0 the finite set of all such pumping vectors.

We distinguish two cases that we illustrate in Figure 3.

All vectors in 𝑷𝟎 are colinear to some 𝒗

We choose p such that pB(v)v1P1(0)B(v1). This avoids a finite set of one-dimensional subsets, so such a choice is possible.

Take any position k2 and assume that kpB+(v). Pick an accepting branch b in y from k. As long as b never visits the 1 in position 0, it stays in a state of S0, so we can pump to build a periodic accepting branch that stays in k+B+(v) and does not visit p. If b visits 0, then it is in some state s such that (s,0)S1(0), and so we can pump to build another accepting branch bp that stays in B(0) or in B+(v1) for some v1P1(0). Either way, we built an accepting branch in y from k that does not visit p, so it is accepting in zp.

If kpB+(v), then k0B+(v) since we chose p in such a way that the sets are disjoint. With a similar argument, we build an accepting branch that does not visit 0 on σp(y).

Every starting position in zp has an accepting branch, so zp is accepted by A.

There are two noncolinear vectors 𝒗𝒂,𝒗𝒃 in 𝑷𝟎

This means that, in x, the accepting run from (i0,0) has two accepting branches that stay in B+(va) and B+(vb), respectively. Since va and vb are not colinear, there is r>0 large enough that B(va)B(vb)B(0,r).

We choose p such that pv1P1B(v1,r+C) and such that p is in the quarterplane generated by va,vb, at distance at least r+2C from the border.

Take a position k2. If kB(0,r), then we pump to build an accepting branch bp in y that stays either in B(0) or in k+B+(v1) for some v1P1(r), so that bp does not visit p. If kB(p,r), the same argument applies on σp(y).

If kB(0,r)B(p,r), then one of the two bands Ba=k+B+(va) and Bb=k+B+(vb) contains neither 0 nor p. Indeed,

  • BaBb contains neither position by definition of r;

  • If both positions appeared, we would have |p0±(avabvb)|2C for some a,b0, which contradicts the choice of p.

Assuming that it is Ba, we pump to build an accepting branch in x from k that stays in Ba and visits neither 0 nor p.

Every position in zp has an accepting branch, so zp is accepted by A.

Figure 3: Left: the first case when all vectors in P0 are colinear to v. Right: the second case when {va,vb}P0. In both cases, P1={v1,v1} and the circles represent positions 0 and p. The proof shows that each initial position admits a path that never visits 0 or p and accepts in y or σp(y).

4.3 The Cone Labyrinth

Definition 19.

Let Σ={0,1,#}. The cone labyrinth subshift (denoted Xcl) is the set of configurations x which contains none of the forbidden patterns 010,11,#1#,0#,#0,1#,#1 and such that from any position with a pattern #1, there is a path to a position with a pattern 1# using steps ,, that only visits positions with symbols 0.

In a configuration x{0,1,#}2 of Xcl, every column contains either only # symbols, or only 0 and 1 symbols. The # marks the outside areas, the 0 the inside areas, and 1 corresponds to entrances / exits to change areas. In particular, a 1 can only be between a 0 and a #. Furthermore, every entrance #1 can be matched to at least one exit 1#, in the sense that one can walk from #1 to 1# through zeroes using steps ,,.

In other words, if the width of the inside area is k, then every entrance must be matched to an exit at a vertical distance at most k.

Proposition 20.

XclΣ1.

Proof.

We build a automaton that accepts Xcl assuming that patterns from Definition 19 do not appear; we can do this assumption by Lemma 15. The automaton is represented in Figure 4.

Figure 4: -automaton accepting Xcl. We assumed for readability that the patterns from Definition 19 have already been forbidden.

If the initial position is not the entrance of a labyrinth #1, accept (by looping). Otherwise, walk nondeterministically in all directions ,,. Keep going as long as you see 0, accept if you find a 1, reject if you find a #. Therefore the automata accepts if and only if, starting from every entrance, one branch found a matching exit.

Proposition 21.

XclΠ1.

Intuitively, in order for a run to reject a labyrinth with no exit, some individual branch must reject, which requires visiting a region of unbounded size (depending on the width on the labyrinth). By making the width large enough, we disorient this run into rejecting a valid configuration because it cannot check all required cells.

Proof.

Let A be a Π1-automaton that rejects all configurations not in Xcl. We build a configuration yXcl that A rejects, the process being illustrated in Figure 5.

First define a configuration xnXcl for some n>|Q|.

x(i,j)n={1if (i,j)=(0,0)0otherwise, if 0in#otherwise

Since A rejects xn, there exists a position from which there is no accepting run of A; that is, some branch b from some position p rejects (in finite time). The configuration would be valid if we switched the symbols at positions (0,0) or (n,k) for any nkn; therefore b must visit all these positions, since it would otherwise reject a valid configuration.

Within xn, we call “the left” the half-plane i0, “the right” the half-plane in, and “the center” the band 0<i<n. For simplicity, we assume that b starts in the left and ends in the right. We decompose b as 0c0rr0c0rTcTrrT, where for all k=0,,T:

  • every subsequence is nonempty;

  • k starts in the left, stays in the left and center, and ends in the left (left stays);

  • rk starts in the right, stays in the right and center, and ends in the right (right stays);

  • ckr and ckr stay in the center (center crossings).

Consider the first crossing c0r. Crossing takes at least n steps, so we find two positions (i,j) and (i+a0,j+b0) with a0>0 that c0r visited in that order in the same state; (a0,b0) is the pumping vector. Similarly, we find such pumping vectors (ak,bk) with ak>0 for all ckr and (αk,βk) with αk<0 for all ckr.

By pumping on these vectors on each crossing, we build a branch b that will be valid on some other configuration yxn; for the time being, we only pay attention to the positions in the branch and not to the underlying configuration.

Let C be the lowest common multiple of all ak and αk and let m>0 to be fixed later. We define b=0c0rr0c0rTcTrrT step by step.

Figure 5: On the left, a rejecting run over the invalid labyrinth x4, which has no exit. Bolded parts u, v and w represent pumping vectors which start and end in the same state. These vectors are repeated on the right to provide another rejecting run of the same automata over the valid labyrinth y.
  • 0=0 is unchanged;

  • c0r is c0r that we pump mCa0 times along the vector (a0,b0).

  • r0=σ(mC,mCa1b1)(r0); in other words, r0 is shifted relative to r0 so that the positions are consistent with the previous part.

  • c0r is c0r shifted by (mC,mCa1b1) and pumped mCα0 times along the vector (α0,β0).

In a similar manner, we pump every crossing in the center and shift:

  • k and ckr by (0,ok(m)), where ok(m)=Σi=0k1mCaibi+Σi=0k1mCαiβi;

  • rk and ckr by (mC,okr(m)) where okr(m)=Σi=0kmCaibi+Σi=0k1mCαiβi.

These values are chosen so that the positions are locally consistent with allowed transitions in A. Notice that ok(m)ok(m) is either always 0 or tends to ± as m.

Denoting φ the footprint, we see that φ(k)=φ(k)+ok(m). Because every φ(k) is finite, we can find m large enough such that, for all k and k, φ(k)φ(k)= or φ(k)φ(k)=φ(k)φ(k), and similarly for right stays. In other words, two stays either visit no cell in common or they cross in exactly the same manner as the original branch.

If needed, we increase m so that m>|φ(b)|.

Now we build a configuration y so that b is a branch of the run starting at the same position p. Start by putting y=xn+mC, and do the following modifications:

  1. 1.

    set y(0,ok(m))=1 for all k;

  2. 2.

    choose some i such that |i|<n+Cm and (n+Cm,i)kφ(rk). Then set y(n,i+ok(m))=1 for all k.

Condition 1 adds entrances at such positions that the left stay k “sees” an entrance exactly when the original left stay k saw an entrance at position (0,0). This does not impact other left stays by the argument above.

Condition 2 adds exits at positions that are not visited by b, which is possible because we chose m to be larger than the footprint of b, but satisfy the definition for a valid labyrinth. This ensures that yXcl and that b rejects.

By construction, the branch b is a branch for the run on y starting at p. It follows that yXcl is rejected by A, a contradiction.

5 Conclusion

5.1 Summary and open questions

We proved that subshifts accepted by alternating plane-walking automata form a strict subset of sofic subshifts, and that the first level of the hierarchy with bounded alternations is strict: Σ1 and Π1 are incomparable, and thus the inclusion of Δ1 in both of them is strict.

We sum up our open questions:

  1. 1.

    Is the hierarchy strict for all n or does it collapse at some level? For example, can we find a subshift in Σ2\Σ1?

  2. 2.

    If a subshift is accepted by a universal PWA and an existential PWA, is it also accepted by a deterministic PWA? More generally, is it the case that Δn=ΣnΠn?

  3. 3.

    Is there an equivalent definition for subshifts accepted by alternating plane-walking automata by forbidden patterns accepted by plane-walking automata that do not require taking a complement?

Pumping arguments are tedious even in the first floors of the hierarchy, and we would like to find other tools, for example (as suggested by Guillaume Theyssier and inspired by [17]) from communication complexity.

This is only one of multiple possible hierarchies on walking automata. We mention n-nested automata in the next section. Automata with the ability to leave up to n pebbles (non-moving marks used as memory) during a run have also been considered. Salo and Törma studied automata with multiple heads and this hierarchy collapses at n=3 [14, 13].

Definitions 2 and 4 (recognised / accepted subshifts) extend to higher dimensions d,d2, or any finitely generated group by replacing the set of directions by S and SS1{}, respectively, where S is a set of generators of the group. While our main results extend directly to d by considering lifts of our two-dimensional examples (see Definition 9), we make no guesses as to the situation in more complicated groups.

5.2 Strict Hierarchy and Tree-walking Automata

Conjecture 22.

The hierarchy is strict, that is, ΣnΣn+1 for all n (and the same is true for all combinations of Π,Σ and Δ).

We present some elements supporting this conjecture. Tree-walking automata (TWA) is a similar model that recognise words written on (finite or infinite) trees. For example, Theorem 8 can be seen as the translation of [4].

In the context of tree-walking automata, we could not find any work on a similar Σ/Π hierarchy. However, [16] considers k-nested TWA, defined intuitively as follows: 0-nested TWA are (existential) nondeterministic TWA; k-nested TWA are nondeterministic TWA where, at each step, the set of available transitions is determined by foreseeing the behaviour of two k1-nested TWA A and A¯, in the following sense: the next transition is chosen nondeterministically among transitions after which A would accept and A¯ would reject.

The class of (tree-walking or plane-walking) k-nested automata seems to be related to Σk+1 automata, although we do not have a proof of either direction. For tree-walking automata, Theorem 29 in [16] proves that the hierarchy of languages recognized by k-nested TWA is strict. This is to us a strong indication that the alternating hierarchy is strict on trees (free groups).

We believe that these results can be brought to plane-walking automata by considering subshifts where trees are drawn on a background on zeroes (this can be ensured with finitely many forbidden patterns), and every tree must belong to Lk, where Lk is a tree language that is Σk+1 but not Σk (alternatively, k-nested and not k1-nested). This is not straightforward as plane-walking automata have the ability to walk out of the tree, which should not provide additional recognition power, but pumping arguments are very tedious for alternating plane-walking automata. We leave this as an open question for future research.

5.3 An Alternative Approach: Kari-Moore’s Rectangles

We mention an alternative approach to prove that Σ1Π1 that was used in [10] for finite patterns. The following statements are only translations to our model and from finite patterns to periodic configurations, and we do not vouch for their correctness. This is another suggestion for future work generalising Theorem 14.

Let f:𝒫(). Let Xf{0,1}2 be the smallest subshift containing the strongly periodic configurations generated by the rectangles:

{r{0,1}[0,n]×[0,k]:kf(n) and for all i,j>0,r0,0=ri,0=r0,j=1,ri,j=0}.

If Xf is accepted by a Σ1 plane-walking automaton with k states, then for every n, the language {1j:jf(n)} is recognised by a two-way nondeterministic finite automaton with kn states, and hence regular [10].

The following example of a function f is such that XfΣ1\Π1, while XfcΠ1\Σ1:

f(n)={in+j:i,j,j<i}.

Indeed, fc(n) is a finite set whose largest element is (n2)n+(n1)n2. If it is accepted by an automaton with kn states, this would be a contradiction for n>k by pumping.

References

  • [1] Marcella Anselmo and Maria Madonia. Classes of two-dimensional languages and recognizability conditions. RAIRO Theor. Informatics Appl., 44(4):471–488, 2010. doi:10.1051/ita/2011003.
  • [2] Nathalie Aubrun and Mathieu Sablik. Simulation of effective subshifts by two-dimensional subshifts of finite type. CoRR, abs/1602.06095:35–63, 2016. doi:10.48550/arXiv.1602.06095.
  • [3] Manuel Blum and Carl Hewitt. Automata on a 2-dimensional tape. In 8th Annual Symposium on Switching and Automata Theory, Austin, Texas, USA, October 18-20, 1967, pages 155–160. IEEE, IEEE Computer Society, 1967. doi:10.1109/FOCS.1967.6.
  • [4] Mikolaj Bojanczyk and Thomas Colcombet. Tree-walking automata do not recognize all regular languages. In Harold N. Gabow and Ronald Fagin, editors, Proceedings of the 37th Annual ACM Symposium on Theory of Computing, Baltimore, MD, USA, May 22-24, 2005, pages 234–243. ACM, 2005. doi:10.1145/1060590.1060626.
  • [5] Bruno Durand, Andrei Romashchenko, and Alexander Shen. Fixed-point tile sets and their applications. Journal of Computer and System Sciences, 78(3):731–764, 2012. doi:10.1016/j.jcss.2011.11.001.
  • [6] Dora Giammarresi and Antonio Restivo. Recognizable picture languages. International Journal of Pattern Recognition and Artificial Intelligence, 6(2&3):241–256, 1992. doi:10.1142/S021800149200014X.
  • [7] Dora Giammarresi and Antonio Restivo. Two-dimensional languages. In Grzegorz Rozenberg and Arto Salomaa, editors, Handbook of Formal Languages, Volume 3: Beyond Words, pages 215–267. Springer, 1997. doi:10.1007/978-3-642-59126-6_4.
  • [8] Nataša Jonoska and Joni B. Pirnot. Finite state automata representing two-dimensional subshifts. Theoretical computer science, 410(37):3504–3512, 2009. doi:10.1016/j.tcs.2009.03.015.
  • [9] Jarkko Kari and Cristopher Moore. New results on alternating and non-deterministic two-dimensional finite-state automata. In Afonso Ferreira and Horst Reichel, editors, Annual Symposium on Theoretical Aspects of Computer Science, volume 2010 of Lecture Notes in Computer Science, pages 396–406. Springer, 2001. doi:10.1007/3-540-44693-1_35.
  • [10] Jarkko Kari and Cristopher Moore. Rectangles and squares recognized by two-dimensional automata. In Juhani Karhumäki, Hermann A. Maurer, Gheorghe Paun, and Grzegorz Rozenberg, editors, Theory is Forever: Essays Dedicated to Arto Salomaa on the Occasion of His 70th Birthday, volume 3113 of Lecture Notes in Computer Science, pages 134–144. Springer, 2004. doi:10.1007/978-3-540-27812-2_13.
  • [11] Jarkko Kari and Ville Salo. A survey on picture-walking automata. In Werner Kuich and George Rahonis, editors, Algebraic Foundations in Computer Science – Essays Dedicated to Symeon Bozapalidis on the Occasion of His Retirement, volume 7020 of Lecture Notes in Computer Science, pages 183–213. Springer, 2011. doi:10.1007/978-3-642-24897-9_9.
  • [12] Douglas Lind and Brian Marcus. An introduction to symbolic dynamics and coding. Cambridge University Press, 1995.
  • [13] Ville Salo. Four heads are better than three. In Hector Zenil, editor, Cellular Automata and Discrete Complex Systems – 26th IFIP WG 1.5 International Workshop, AUTOMATA 2020, Stockholm, Sweden, August 10-12, 2020, Proceedings, volume 12286 of Lecture Notes in Computer Science, pages 111–125. Springer, 2020. doi:10.1007/978-3-030-61588-8_9.
  • [14] Ville Salo and Ilkka Törmä. Plane-walking automata. In Teijiro Isokawa, Katsunobu Imai, Nobuyuki Matsui, Ferdinand Peper, and Hiroshi Umeo, editors, Cellular Automata and Discrete Complex Systems – 20th International Workshop, AUTOMATA 2014, Himeji, Japan, July 7-9, 2014, Revised Selected Papers, volume 8996 of Lecture Notes in Computer Science, pages 135–148. Springer, 2014. doi:10.1007/978-3-319-18812-6_11.
  • [15] Ville Salo and Ilkka Törmä. Group-walking automata. In Jarkko Kari, editor, Cellular Automata and Discrete Complex Systems: 21st IFIP WG 1.5 International Workshop, AUTOMATA 2015, Turku, Finland, June 8-10, 2015. Proceedings 21, volume 9099 of Lecture Notes in Computer Science, pages 224–237. Springer, 2015. doi:10.1007/978-3-662-47221-7_17.
  • [16] Balder ten Cate and Luc Segoufin. Transitive closure logic, nested tree walking automata, and xpath. J. ACM, 57(3):18:1–18:41, 2010. doi:10.1145/1706591.1706598.
  • [17] Véronique Terrier. Communication complexity tools on recognizable picture languages. Theoretical Computer Science, 795:194–203, 2019. doi:10.1016/j.tcs.2019.05.040.