1 Introduction

An automata network is a network of entities each equipped with a local update function that changes its state according to the states of neighboring entities. Automata networks have been used to model different kind of networks: gene networks, neural networks, social networks, or network coding (see [9] and references therein). They can also be considered as a model of distributed computation with various specialized definitions [18, 19]. The architecture of an automata network can be represented via its interaction graph, which indicates which update functions depend on which variables. An important stream of research is to determine how the interaction graph affects different properties of the network or to design networks with a prescribed interaction graph and with a specific dynamical property (see [8] for a review of known results). On the other hand, automata networks are usually associated with an update mode describing how local update functions of each entity are applied at each step of the evolution. In particular, three categories of update modes can be distinguished: sequential (one node update at a time), asynchronous (any subset of nodes at a time) or synchronous (all nodes simultaneously). Studying how changing the update mode affects the properties of an automata network with fixed local update functions is another major trend in this field [12, 13, 15]. Comparing the computational power of sequential and parallel machines is of course at the heart of computer science, but the questioning on update modes is also meaningful for applications of automata networks in modeling of natural systems where the synchronous update mode is often considered unrealistic.

For both parameters (interaction graphs and update modes), the set of properties that could be potentially affected is unlimited. In this paper, instead of choosing a set of properties to analyze, we adopt an intrinsic approach: we study how some (sets of) automata networks can be simulated by some other (set of) automata networks with prescribed update mode or interaction graph.

Notations. We will always consider alphabets of the form \({[\![q]\!]=\{0,\ldots ,q-1\}}\) for some q and usually denote by n the number of nodes of the network which are identified by integers in the interval \({[1,n]}\). An automata network is a map \(f : [\![q ]\!]^n \rightarrow [\![q ]\!]^n\). An element \({x\in [\![q ]\!]^n}\) is a configuration and \({x_v}\) denotes the state of node v in configuration x. By extension \(f_v\) denotes the map \({x\mapsto f(x)_v}\). The rank of f is the size of its image. For any set of coordinates \({V\subseteq [1,n]}\), \({f^{(V)} : [\![q ]\!]^n \rightarrow [\![q ]\!]^n}\) denotes the following map:

$$f^{(V)}(x)_i = {\left\{ \begin{array}{ll} f(x)_i&{}\text {if }i\in V\\ x_i&{}\text {else.} \end{array}\right. } $$

The notation is extended to words of subsets \(w = (w_1, \dots , w_k)\) as follows: \(f^{(w)} = f^{(w_k)} \circ \cdots \circ f^{(w_1)}\). For \(v\in [1,n]\) we overload this notation by \({f^{(v)}=f^{(\{v\})}}\).

We will often consider semigroups of functions under compositions: \(\left\langle X \right\rangle \) where X is a set of functions that denotes the semigroup generated by compositions of elements of X. We denote the fact that \(S_1\) is a sub-semigroup of \(S_2\) by \({S_1\le S_2}\). For any set X, \({\mathrm {Sym}(X)}\) is the set of permutations on X. We denote the set of all networks \(f : [\![q ]\!]^n \rightarrow [\![q ]\!]^n\) as \(\mathrm {F}(n,q)\). We denote by \({\mathrm {Sym}(n,q)}\) the set of \({f\in \mathrm {F}(n,q)}\) which are bijective and by \({\mathrm {Sing}(n,q)}\) the set of \({f\in \mathrm {F}(n,q)}\) which are non-bijective. For any set F of functions in \(\mathrm {F}(n, q)\), what they can simulate (asynchronously, sequentially, synchronously) is denoted as follows:

$$\begin{aligned} \left\langle F \right\rangle _{\mathrm {Asy}}&:= \left\langle \left\{ f^{(V)} : f \in F, V \subseteq [1,n] \right\} \right\rangle ,\\ \left\langle F \right\rangle _{\mathrm {Seq}}&:= \left\langle \left\{ f^{(v)} : f \in F, v \in [1,n] \right\} \right\rangle ,\\ \left\langle F \right\rangle _{\mathrm {Syn}}&= \left\langle F \right\rangle . \end{aligned}$$

Then we say that F simulates \(g \in \mathrm {F}(n,q)\) asynchronously (sequentially, synchronously, respectively) if \(g \in \left\langle F \right\rangle _{\mathrm {Asy}}\) (\(\left\langle F \right\rangle _{\mathrm {Seq}}\), \(\left\langle F \right\rangle _{\mathrm {Syn}}\), respectively). When \({F=\{f\}}\) we use notations \(\left\langle f \right\rangle _{\mathrm {Asy}}\), \(\left\langle f \right\rangle _{\mathrm {Seq}}\), \(\left\langle f \right\rangle _{\mathrm {Syn}}\), respectively.

Previous Works. Simulation of automata networks is the topic of two main strands of work. The first stream investigates what a single network can simulate. The main observation, made in [2], is that there is no sequentially complete network for \(\mathrm {F}(n,q)\), i.e. for all \(f \in \mathrm {F}(n,q)\), \(\left\langle f \right\rangle _{\mathrm {Seq}} \ne \mathrm {F}(n,q)\). This was refined in several ways. Firstly, there is no sequentially complete network for singular (i.e. non-permutation) transformations: for all \(f \in \mathrm {F}(n,q)\), \(\mathrm {Sing}(n,q) \not \le \left\langle f \right\rangle _{\mathrm {Seq}}\) [2]. Secondly, for all \(n \ge 2\) and \(q \ge 2\) (unless \(n=q=2\)), there exists a sequentially complete network for permutations: there exists \(f \in \mathrm {F}(n,q)\) such that \(\left\langle f \right\rangle _{\mathrm {Seq}} = \mathrm {Sym}(n,q)\) [7]. These results illustrate a clear dichotomy between permutations and non-permutations. Thirdly, the simulation model was extended in [2] to include situations whereby a large network \(f \in \mathrm {F}(m,q)\) could simulate a smaller network \(g \in \mathrm {F}(n,q)\) for \(n \le m\); notably, there always exists a complete network of size \(m = n+1\) which can sequentially simulate any \(g \in \mathrm {F}(n,q)\).

Another strand of work considers simulation by (possibly large) sets of networks. Firstly, Tchuente [16] investigated what networks with a prescribed reflexive interaction graph D could simulate synchronously. The main result is that this set of networks \(\mathrm {F}(D,q)\) is complete, i.e. \(\left\langle \mathrm {F}(D,q) \right\rangle _{\mathrm {Syn}} = \mathrm {F}(n,q)\), if and only if D is strongly connected and has a vertex of in-degree n. Secondly, in the context of in-situ computation (a.k.a. memoryless computation), Burckel proved that any network could be sequentially simulated, if we allow the updates to differ at each time step; in our language: for all n and q, \(\left\langle \mathrm {F}(n, q) \right\rangle _{\mathrm {Seq}} = \mathrm {F}(n,q)\) [4]. This seminal result was subsequently refined (see [6, 10]); notably linear bounds on the shortest word required to simulate a transformation were obtained in [5, 6].

Our Contributions. In this paper, we are further developing both strands of the theory of simulation of automata networks. We make the following contributions. We first consider simulation by a single network. Firstly, we show that for any \(q \ge 3\) and any \(n \ge 2\), there exists a network \(g \in \mathrm {F}(n,q)\) which is not sequentially simulatable. Secondly, we consider asynchronous simulation, and we show that there is no asynchronously complete network: for all \(f \in \mathrm {F}(n,q)\), \(\mathrm {Sing}(n,q) \not \le \left\langle f \right\rangle _{\mathrm {Asy}}\). This is a clear strengthening of the result in [2] for sequential simulation. Thirdly, we extend the framework to let a network over a large alphabet \(f \in \mathrm {F}(n,q')\) simulate a network \(g \in \mathrm {F}(n,q)\) over a smaller alphabet. We consider two ways to extend the alphabet, and for each we prove the existence of sequentially complete networks for \(q' = 2q\) and \(q' = q+1\), respectively. We then consider simulation by large sets of networks. The seminal result in [4] shows that instructions (updates of the form \(f^{(v)}\) for some \(v \in [1,n]\)) can simulate any network; in this paper, we determine what singular instructions can simulate (and even idempotent instructions for \(q \ge 3\)). We finally strengthen the main result in [16] by showing that it also holds when considering sequential and asynchronous updates as well.

Proof

Complete proofs of all lemmas, propositions and theorems can be found in [3].

2 Sequential Simulation

We say \(g \in \mathrm {F}(n,q)\) is sequentially simulatable if \(g \in \left\langle f \right\rangle _{\mathrm {Seq}}\) for some \(f \in \mathrm {F}(n,q)\). Recall that unless \(n=q=2\) any \({g\in \mathrm {Sym}(n,q)}\) is sequentially simulatable since there is a universal \(f \in \mathrm {F}(n,q)\) such that \(\left\langle f \right\rangle _{\mathrm {Seq}} = \mathrm {Sym}(n,q)\) [7]. Concerning non-bijective maps, the situation is radically different for non-Boolean alphabets as shown in the following theorem. For any function \(\phi \in \mathrm {F}(n,q)\), we denote by \(O(()\phi )\) the set of its orphans: \({O(()\phi )=\{c \in [\![q ]\!]^n : \phi ^{-1}(c)=\emptyset \}}\). The analysis of oprhans configurations under sequential updates is the key behind the following theorem.

Theorem 1

For any \(n \ge 2\) and \(q \ge 3\), there exists \(h \in \mathrm {F}(n,q)\) which is not sequentially simulatable.

The functions which are not sequentially simulatable produced in the proof of Theorem 1 have two configurations a and b in \({[\![q ]\!]^n}\) with the same image and another d which is an orphan with the following property: for each coordinate i where \(a_i\) and \(b_i\) differ, \(d_i\) is different from both \(a_i\) and \(b_i\). Note that this situation is impossible in the Boolean case since if \({a_i\ne b_i}\) then necessarily \({d_i\in \{a_i,b_i\}}\).

F. Bridoux did an exhaustive search in \(\mathrm {F}(n,2)\) with \(n=2\) and \(n=3\) to test which one are sequentially simulatable [1]. It turns out that all \(f\in \mathrm {F}(3,2)\) are sequentially simulatable. However, some functions in \(\mathrm {F}(2,2)\) are not and one example is the circular permutation \({00\rightarrow 01\rightarrow 11\rightarrow 10\rightarrow 00}\) [1, Proposition 12]. More details (including the code of the test program) are available at http://theyssier.org/san2020.

3 Asynchronous Simulation

In this section, we consider asynchronous simulation, where at each step we allow any update \(f^{(T)}\) for \(T \subseteq [1,n]\). We then refine the result in [2] that there is no network that can sequentially simulate all singular networks.

We say that a function \(h : B \rightarrow C\), where B and C are finite sets, is balanced if for any \(c, c' \in C\), \(|h^{-1}(c)| = |h^{-1}(c')|\). In particular, if \(f \in \mathrm {F}(n,q)\) is bijective, then all its coordinate functions \(f_v : [\![q ]\!]^n \rightarrow [\![q ]\!]\) must be balanced.

Theorem 2

For all \(f \in \mathrm {F}(n,q)\), \(\mathrm {Sing}(n,q) \not \le \left\langle f \right\rangle _{\mathrm {Asy}}\).

Proof

Suppose, for the sake of contradiction, that \(\mathrm {Sing}(n,q) \le \left\langle f \right\rangle _{\mathrm {Asy}}\). We first show that not all coordinate functions of f are balanced. There exists \(S \subseteq [1,n]\) such that \(f^{(S)}\) has rank \(q^n - 1\). (Otherwise, no function in \(\left\langle f \right\rangle _{\mathrm {Asy}}\) has rank \(q^n-1\).) Then there exist \(a, b \in [\![q ]\!]^n\) such that

$$ \left| \left( f^{(S)} \right) ^{-1}(x) \right| = {\left\{ \begin{array}{ll} 2 &{} \text {if } x = a\\ 0 &{} \text {if } x = b\\ 1 &{} \text {otherwise}. \end{array}\right. } $$

Then let \(v \in S\) such that \(a_v \ne b_v\). We have

$$ |f_v^{-1}(a_v)| = \sum _{x : x_v = a_v} \left| \left( f^{(S)} \right) ^{-1}(x) \right| = 2 + \sum _{x : x_v = a_v, x \ne a} 1 = q^{n-1} + 1, $$

thus \(f_v\) is not balanced.

Thus, suppose \(f_v\) is not balanced, and let \(q_0 \in [\![q ]\!]\) such that \(|f_v^{-1}(q_0)| < q^{n - 1}\). Say a network \(h \in \mathrm {F}(n,q)\) is defective if \(h^{-1}(x) = \emptyset \) for some x with \(x_v = q_0\). Let \(g \in \mathrm {Sing}(n,q)\) not be deficient, and have a nontrivial \(g_v\); and suppose \(g = f^{(w_1 \cdots w_k)}\). Let \(i = \max \{ 1 \le j \le k : v \in w_j \}\), then \(f^{(w_i)}\) is defective, and so is \(f^{(w_1 \cdots w_i)}\). Since \(f^{(w_{i+1} \cdots w_k)}\) fixes the coordinate v, \(f^{(w_1 \cdots w_k)} = g\) is also deficient, which is the desired contradiction.   \(\square \)

Similarly to Theorem 1, the obstacle in Theorem 2 was found in the set of maps of rank \(q^n-1\). We now show that maps of rank \(q^n-2\) form another obstruction to having complete simulation in the asynchronous case. Let T(nq) be the set of networks in \(\mathrm {F}(n,q)\) whose rank is not equal to \(q^n - 1\). It is clear that T(nq) is a semigroup, generated by maps of rank \(q^n\) or \(q^n - 2\).

Proposition 1

For all \(f \in \mathrm {F}(n,q)\), \(T(n,q) \not \le \left\langle f \right\rangle _{\mathrm {Asy}}\).

Proof

Suppose, for the sake of contradiction, that \(T(n,q) \le \left\langle f \right\rangle _{\mathrm {Asy}}\). Firstly, all the coordinate functions of f are balanced. Indeed, let \(g(x) = x + (1, \dots , 1)\) and express \(g = f^{(w_1 \cdots w_k)}\). Then \(f^{(w_i)}\) is bijective and hence \(f_v\) is balanced for all \(v \in w_i\); since \(\bigcup _{i=1}^k w_i = [1,n]\), we obtain that \(f_v\) is balanced for all \(v \in [1,n]\). Secondly, the proof of Theorem 2 showed that there is no \(f^{(S)}\) of rank \(q^n-1\).

Now, there are two types of networks with rank \(q^n - 2\):

  • Say g is of type I if there exists \(a \in [\![q ]\!]^n\) such that \(|g^{-1}(a)| = 3\) (and hence any other \(x \ne a\) has \(|g^{-1}(x)| \le 1\)).

  • Say h is of type II if there exist \(a, b \in [\![q ]\!]^n\) such that \(|h^{-1}(a)| = |h^{-1}(b)| = 2\) (and hence any other \(x \notin \{a,b\}\) has \(|h^{-1}(x)| \le 1\)).

By an argument similar to the proof of Theorem 2, there is no \(S \subseteq [1,n]\) such that \(f^{(S)}\) is of type I. Let g be of type I and let us express it as \(g = f^{(w_1 \cdots w_k)}\). Each \(f^{(w_l)}\) has rank at least \(q^n - 2\), and there exists \(1 \le i \le k\) such that \(f^{(w_i)}\) is singular. By the argument above, \(f^{(w_i)}\) is of type II and so is \(h := f^{(w_1 \cdots w_i)}\), say \(|h^{-1}(a)| = |h^{-1}(b)| = 2\). Denote \(g = h' \circ h\) for \(h' := f^{(w_{i+1} \cdots w_k)}\). If \(h'(a) = h'(b)\), then g has rank at most \(q^n - 3\); otherwise \(|g^{-1}(h'(a))| = |g^{-1}(h'(b))| = 2\) and hence g is of type II, which is the desired contradiction.   \(\square \)

4 Simulation Using Larger Alphabets

As said earlier, there is no universal automata network in \(\mathrm {F}(n,q)\) able to sequentially simulate all functions of \(\mathrm {F}(n,q)\) (actually Theorem 2 gives a stronger negative result). In this section, we revisit this problem when the simulator is allowed to use a larger alphabet. In this case we can consider two natural types of simulations: one requires the simulation to work on any initial configuration of the simulator and uses a projection onto configurations of the simulated functions; the other does not use projection, but works only on initial configurations using the alphabet of the simulated function.

Definition 1

Let \(n\in \mathbb {N}\), \({2\le q < q'}\) and consider \({f\in \mathrm {F}(n,q')}\). We say that f is (n,q)-universal by factor if there is a surjection \({\pi :[\![q' ]\!]\rightarrow [\![q ]\!]}\) such that for any \(h \in \mathrm {F}(n,q)\) there is a word \(w \in [1,n]^*\) such that

$$\begin{aligned} \forall x\in [\![q' ]\!]^n, \overline{\pi }\circ f^{(w)}(x) = h\circ \overline{\pi }(x) \end{aligned}$$

where \({\overline{\pi }(x_1,\ldots ,x_n)=(\pi (x_1),\ldots ,\pi (x_n))}\). f is said (n,q)-universal by initialization if for any \(h\in \mathrm {F}(n,q)\) there is a word \(w\in [1,n]^*\) such that

$$\begin{aligned} \forall x\in [\![q ]\!]^ n, f^{(w)} (x)= h(x). \end{aligned}$$

We are going to show that universality can be achieved for each kind of simulation. In both cases, the larger alphabet allows us to encode more information than the configuration of the simulated function. This additional information is used as a global controlling state that commands transformations applied on the simulated configuration and evolves according to a finite automaton. In the case of simulation by factor, the encoding is straightforward but the global controlling state is uninitialized. The key is to use a control automaton with a synchronizing word (see Fig. 1). In the case of simulation by initialization, the difficulty lies in the encoding.

The following theorems were obtained by F. Bridoux during his PhD thesis [1].

Fig. 1.
figure 1

Definition and sequential behavior of \(\rho : [\![2 ]\!]^3 \rightarrow [\![2 ]\!]^3\) from Theorem 3. Label on arcs represent the coordinate updated.

Theorem 3

For any \(q \ge 2\) and \(n \ge 3\), there exists \(f \in \mathrm {F}(n,2q)\) which is (nq)-universal by factor.

Proof

We can see any configuration of \({[\![2q ]\!]^n}\) as a pair made of a configuration of \([\![q ]\!]^n\) and a Boolean configuration, so we can as well describe f as a function acting on \({[\![q ]\!]^n\times [\![2 ]\!]^n}\) to simplify notations and use the surjective map \({\pi : [\![q ]\!]^n\times [\![2 ]\!]^n\rightarrow [\![q ]\!]^n}\) that projects onto the first component. We will actually choose f which is the identity map on the coordinates 4 to n on the Boolean component. So, to simplify even further, we will define a function \({f:[\![q ]\!]^n\times [\![2 ]\!]^3\rightarrow [\![q ]\!]^n\times [\![2 ]\!]^3}\).

Consider first the function \(\rho :[\![2 ]\!]^3 \rightarrow [\![2 ]\!]^3\) defined by Fig. 1 and consider the map \(\varPsi : [\![q ]\!]^n\times [\![2 ]\!]^3 \rightarrow [\![q ]\!]^n\) defined by:

Then we define f by \({f(x,y) = \bigl (\varPsi (x,y),\rho (y)\bigr )}\). We now prove properties about f implying that it is (nq)-universal by factor.

Claim 1

For any \({(x,y)\in [\![q ]\!]^n\times [\![2 ]\!]^3}\) it holds .

Proof

First, let us remark that updating q times coordinate 3 starting from (xy), there are two cases:

  • or \(x_1 \ne { \texttt {0}}\) or \(x_2 \ne { \texttt {0}}\) and then the component x is not modified;

  • and \(x_1 = x_2 = { \texttt {0}}\), and then the modification \(x_3 \leftarrow x_3 +1\) is applied q times.

Therefore we have \({f^{((3)^q)}(x,y) = (x',y')}\) with

$$\begin{aligned} x'=(x_1,x_2,x_3+q,\dots ) = (x_1,x_2,x_3,\dots ) = x. \end{aligned}$$

To show that the update sequence \(((3)^q,2,3,1,1,2,1,3)\) does not modify the component x, it is sufficient to verify the following:

  • coordinate 1 is not updated when ;

  • coordinate 2 is not updated when ;

  • when coordinate 3 is updated and , it is updated q times.

By definition of \(f^{((3)^q,2,3,1,1,2,1,3)}\), we obtain:

   \(\square \)

Let us now show that, starting from , f can realize three kinds of transformations on x that will turn out to be sufficient to generate all \({\mathrm {F}(n,q)}\).

  • Let \(c\in \mathrm {Sym}(n,q)\) be the following circular permutation:

    then for any \({x\in [\![q ]\!]^n}\) we have because:

  • Consider the transposition \(k = (({ \texttt {0}})^n \leftrightarrow { \texttt {1}}({ \texttt {0}})^{n-1})\), then we have, for any \({x\in [\![q ]\!]^n}\), because:

  • Finally, consider the assignment \(d = (({ \texttt {0}})^n \rightarrow { \texttt {1}}({ \texttt {0}})^{n-1})\), then for any \({x\in [\![q ]\!]^n}\) it holds because:

Since functions c, k and d generate \(\mathrm {F}(n,q)\) (see [14] or [11]), the theorem follows.   \(\square \)

Theorem 4

For any \(q \ge 2\) and \(n \ge 3q\), there is \(f \in \mathrm {F}(n,q+1)\) which is (nq)-universal by initialization.

5 Simulation by Sets of Networks

So far we studied what a single function can simulate. We know shift our interest to semigroups generated by some sets of functions.

5.1 Singular Instructions

An instruction is any \(f^{(v)}\) for some \(f \in \mathrm {F}(n,q)\) and some \(v \in [1,n]\). Burckel showed that any network is the composition of instructions: \(\left\langle \mathrm {F}(n,q) \right\rangle _{\mathrm {Seq}} = \left\langle \left\{ f^{(v)} : f \in \mathrm {F}(n,q), v \in [1,n] \right\} \right\rangle = \mathrm {F}(n,q)\). As an immediate consequence, any permutation in \(\mathrm {Sym}(n,q)\) is the composition of permutation instructions: \(\mathrm {Sym}(n,q)\) is exactly \(\left\langle \left\{ f^{(v)} \in \mathrm {Sym}(n,q) : f \in \mathrm {F}(n,q), v \in [1,n] \right\} \right\rangle \). We now determine what singular instructions generate: let

$$ S(n,q) := \left\langle \left\{ f^{(v)} \in \mathrm {Sing}(n,q) : f \in \mathrm {F}(n,q), v \in [1,n] \right\} \right\rangle . $$

Proposition 2

The semigroup S(nq) generated by singular instructions consists of all networks f such that there exist \(a,b \in [\![q ]\!]^n\) with \(f(a) = f(b)\) and \(d_\mathrm {H}(a,b) = 1\).

Any network f can be seen as a vertex colouring of the Hamming graph H(nq) (x colored by f(x)). From the proposition above, networks in S(nq) correspond to improper colouring. Since the chromatic number of H(nq) is equal to q, we deduce that any network with rank at most \(q-1\) can be generated by singular instructions. However, the network \({f(x) = \left( x_1 + \ldots + x_n, 0, \ldots , 0 \right) }\) cannot be generated by singular instructions, since it generates a proper colouring of the Hamming graph.

A network f is idempotent if \(f^2 = f\). Idempotents are pivotal in the theory of semigroups, for they are the identity elements of the subgroups of a given semigroup. In particular it is interesting to know whether a semigroup S is generated by its set of idempotents, because then any element \(s \in S\) can be expressed as a product of consecutively distinct idempotents: \(s = e_1 e_2 \dots e_k\). We remark that if \(f \in S(n,q)\) is idempotent and has rank \(q^n - 1\), then it must be an assignment instruction.

Theorem 5

S(nq) is generated by assignment instructions for \(q \ge 3\).

The previous result could be proved using the so-called fifteen-puzzle. In the original puzzle, an image is cut into a four-by-four grid of tiles; one of the tiles is removed, thus creating a hole; the remaining fifteen tiles are scrambled by sliding a tile into the hole. The player is then given the scrambled image, and has to reconstruct it by repeatedly sliding a tile in the hole.

Clearly, this game can be played on any simple graph D, where a hole is created at a vertex (say h), and one can “slide” one vertex into the hole, the hole thus moving to that vertex. If the hole goes back to its original place h, then we have created a permutation of \(V(D) \setminus h\). The set of all possible permutations is closed under composition and hence it forms a group, called the puzzle group G(Dh). Wilson [17] fully characterised that group for 2-connected simple graphs; we give a simpler version of the theorem below.

Theorem 6

(Wilson’s fifteen-puzzle theorem). Let D be a 2-connected simple graph, then \(G(D,h) \cong G(D,h')\) for all vertices \(h, h' \in V(D)\). Moreover, if D is the undirected cycle, then G(Dh) is trivial. Otherwise, the following hold.

  1. 1.

    If D is not bipartite and has at least eight vertices, then \(G(D,h) = \mathrm {Sym}(V(D) \setminus h)\).

  2. 2.

    If D is bipartite, then \(G(D,h) = \mathrm {Alt}(V(D) \setminus h)\).

Using assignment instructions \((a \rightarrow b)\) to simulate a network f of rank \(q^n - 1\) can be viewed as playing the fifteen-puzzle on the Hamming graph H(nq): the first \((a^1 \rightarrow b^1)\) places a hole in vertex \(a^1\) and any subsequent \((a^k \rightarrow b^k)\) slides the vertex \(a^k\) into the hole \(b^k\) (and the hole moves to \(a^k\) instead). Since H(nq) is not bipartite for \(q \ge 3\) (and it has at least nine vertices for \(n \ge 2\)), we can apply Wilson’s theorem and, after a bit more work, prove Theorem 5 that way. However, the hypercube H(n, 2) is bipartite, then the puzzle group is only the alternating group. Thus, S(n, 2) is not generated by assignment instructions, and in particular \(f = (010\cdots 0 \leftrightarrow 110\cdots 0) \circ (000\cdots 0 \rightarrow 100\cdots 0)\) cannot be generated by assignment instructions.

5.2 Simulation by Graphs

The interaction graph of \(f \in \mathrm {F}(n,q)\) is the (directed graph) which has vertex set \(V = [1,n]\) and has an arc from u to v if and only if \(f_v\) depends essentially on u, i.e. there exists \(a,b \in [\![q ]\!]^n\) such that \(a_{V\setminus u} = b_{V\setminus u}\) and \(f_v(a) \ne f_v(b)\). For any graph D with n nodes, we denote the set of networks in \(\mathrm {F}(n,q)\) whose interaction graph is a subgraph of D as \(\mathrm {F}(D,q)\).

A graph is reflexive if for any vertex v, (vv) is an arc in D. Note that for any reflexive graph D it holds \({\left\langle \mathrm {F}(D, q) \right\rangle _{\mathrm {Seq}} \subseteq \left\langle \mathrm {F}(D, q) \right\rangle _{\mathrm {Asy}} = \left\langle \mathrm {F}(D, q) \right\rangle _{\mathrm {Syn}}.}\) The first inclusion is trivial; the equality follows from the fact that for any \(f \in \mathrm {F}(D,q)\) and any \(S \subseteq [1,n]\), \(f^{(S)}\) belongs to \(\mathrm {F}(D,q)\) as well. Moreover, it is clear that if \(\left\langle \mathrm {F}(H, q) \right\rangle _{\mathrm {Seq}} = \mathrm {F}(n,q)\), then H is reflexive (otherwise, \(\left\langle \mathrm {F}(H,q) \right\rangle _{\mathrm {Seq}}\) would not contain any permutation). The reflexive graphs which can simulate the whole of \(\mathrm {F}(n,q)\) synchronously were classified by Tchuente in [16]. In fact, the same graphs can simulate the whole of \(\mathrm {F}(n,q)\) asynchronously or sequentially.

Theorem 7

Let D be a reflexive graph on n vertices. Then the following are equivalent.

  1. 1.

    \(\left\langle \mathrm {F}(D, q) \right\rangle _{\mathrm {Seq}} = \mathrm {F}(n, q)\).

  2. 2.

    \(\left\langle \mathrm {F}( D, q) \right\rangle _{\mathrm {Asy}} = \mathrm {F}(n, q)\).

  3. 3.

    \(\left\langle \mathrm {F}(D, q) \right\rangle _{\mathrm {Syn}} = \mathrm {F}(n, q)\).

  4. 4.

    D is strongly connected and it has a vertex of in-degree n.

A permutation of variables is any network \(f := \bar{\phi }\) defined by \(f_i(x) = x_{\phi (i)}\) for some \(\phi \in \mathrm {Sym}([1,n])\). We first show that we can permute variables freely if the graph is strongly connected (and is reflexive for the sequential case).

Lemma 1

The following are equivalent for a reflexive graph D.

  1. 1.

    \(\left\langle \mathrm {F}( D, q ) \right\rangle _{\mathrm {Seq}}\) contains all permutations of variables of \(\mathrm {F}(n,q)\).

  2. 2.

    \(\left\langle \mathrm {F}( D, q ) \right\rangle _{\mathrm {Asy}}\) contains all permutations of variables of \(\mathrm {F}(n,q)\).

  3. 3.

    D is strong.

Proof

(Proof of Theorem 7). Clearly, 1 implies 2, which in turn is equivalent to 3. We prove 2 implies 4. Let D such that \(\left\langle \mathrm {F}(D, q) \right\rangle _{\mathrm {Asy}} = \mathrm {F}(n, q)\). By Lemma 1, D is strong. We now prove that D has a vertex of in-degree n. Otherwise, let \(f \in \mathrm {F}(D,q)\) of rank \(q^n - 1\). Let \(a \in O(()f)\) and b with \(|f^{-1}(b)| = 2\) (and hence \(|f^{-1}(x)| = 1\) for any other x). We then have

$$ \sum _{x \in [\![q ]\!]^n} f(x) \bmod q^n= b - a \ne 0. $$

On the other hand, it is easily seen that for any \(y \in [\![q ]\!]\), \(|f_v^{-1}(y)|\) is a multiple of \(q^{n - d_v}\) where \(d_v\) is the in-degree of v in D, hence

$$ \sum _{x \in [\![q ]\!]^n} f_v(x) \bmod q = \sum _{y \in [\![q ]\!]} |f_v^{-1}(y)| y \bmod q = 0. $$

Doing this componentwise for all v, we obtain \(\sum _{x \in [\![q ]\!]^n} f(x) = 0\), which is the desired contradiction.

We prove 4 implies 1. We only need to show that all instructions in \(\mathrm {F}(n,q)\) belong to \(\left\langle \mathrm {F}(D, q) \right\rangle _{\mathrm {Seq}}\). Let u be a vertex of in-degree n, then we already have any instruction updating u. Let v be another vertex, and g be an instruction updating v, then \(g = \overline{(u \leftrightarrow v)} \circ h \circ \overline{(u \leftrightarrow v)}\), where h is the instruction updating u such that \(h_u = g_v \circ \overline{(u \leftrightarrow v)}\). Then \(\overline{(u \leftrightarrow v)} \in \left\langle \mathrm {F}(D, q) \right\rangle _{\mathrm {Seq}}\) according to Lemma 1. Thus, any instruction can be generated.   \(\square \)

6 Future Work

The contrast between the complete sequential simulator for \(\mathrm {Sym}(n,q)\) and the existence of non-bijective functions that are not sequentially simulatable in the non-Boolean case is striking. We would like first to settle the Boolean case: we conjecture that all functions of \(\mathrm {F}(n,2)\) are sequentially simulatable for large enough n. For \({q\ge 3}\), in order to better understand the set of sequentially simulatable networks, one could for instance analyze how much synchronism is required to simulate them (how large are the sets V in the asynchronous updates \(f^{(V)}\) used to simulate them). In particular, one may ask whether, for all n, there exists some network with n entities that require a synchronous update \(f^{([1,n])}\) in order to be simulated asynchronously. Besides, the networks considered in Sects. 2, 3 and 4 have an unconstrained interaction graph. The situation could be very different when restricting all networks to particular a family of interaction graphs (bounded degree, bounded tree-width, etc.). Finally, still concerning interaction graphs, the characterization of Theorem 7 is about reflexive graphs. We would like to extend it to any graph (not necessarily reflexive).