On the stability and instability of finite dynamical systems with prescribed interaction graphs

The dynamical properties of finite dynamical systems (FDSs) have been investigated in the context of coding theoretic problems, such as network coding, and in the context of hat games, such as the guessing game and Winkler's hat game. The instability of an FDS is the minimum Hamming distance between a state and its image under the FDS, while the stability is the minimum of the reciprocal of the Hamming distance; they are both directly related to Winkler's hat game. In this paper, we study the value of the (in)stability of FDSs with prescribed interaction graphs. The first main contribution of this paper is the study of the maximum stability for interaction graphs with a loop on each vertex. We determine the maximum (in)stability for large enough alphabets and also prove some lower bounds for the Boolean alphabet. We also compare the maximum stability for arbitrary functions compared to monotone functions only. The second main contribution of the paper is the study of the average (in)stability of FDSs with a given interaction graph. We show that the average stability tends to zero with high alphabets, and we then investigate the average instability. In that study, we give bounds on the number of FDSs with positive instability (i.e fixed point free functions). We then conjecture that all non-acyclic graphs will have an average instability which does not tend to zero when the alphabet is large. We prove this conjecture for some classes of graphs, including cycles.


Introduction
Many entities (such as genes, neurons, persons, computers, etc.) organise themselves as complex networks, where each entity has a finitely valued state and a function which updates the value of the state. Since entities influence each other, this local update function depends on the states of some of the entities. Such a network is called a Finite Dynamical System (FDS), with special cases or variants appearing under different names, such as Boolean Networks [11,18], Boolean Automata Networks [13], Multi-Valued Networks [3], etc. The main problem when studying an FDS is to determine its dynamics, such as the number of its fixed points, or how the trajectory of a state depends on the initial state.
FDSs have been used to represent a network of interacting entities as follows. A network of n entities has a state x = (x 1 , . . . , x n ) ∈ [q] n , represented by a variable x v taking its value in a finite alphabet [q] = {0, 1, . . . , q − 1} on each entity v. The state then evolves according to a deterministic function f = (f 1 , . . . , f n ) : [q] n → [q] n , where f v : [q] n → [q] represents the update of the local state x v . Although different update schedules have been studied, we are focusing on the parallel update schedule, where all entities update their state at the same time, and x becomes f (x). FDSs have been used to model different real-life networks of entities, such as gene regulatory networks, neural networks, social interactions, etc. (see [6] and references therein).
The structure of an FDS f : A n → A n can be represented via its interaction graph G(f ), which indicates which update functions depend on which variables. More formally, G(f ) has {1, . . . , n} as vertex set and there is an arc from u to v if f v (x) depends on x u . In different contexts, the interaction graph is known (or at least well approximated), while the actual update functions are not. One main problem of research on FDSs is then to predict their dynamics according to their interaction graphs.
Hat games are an increasingly popular topic in combinatorics. Typically, a hat game involves n players, each wearing a hat that can take a colour from a given set of q colours. No player can see their own hat, but each player can see some subset of the other hats. All players are asked to guess the colour of their own hat at the same time. For an extensive review of different hat games, see [12].
In Winkler's hat game, the team scores as many points as players guessing correctly. The aim is then to construct a guessing function f which guarantees a score for any possible configuration of hats [19]. Winkler's hat game was studied in [4,7,6,17,5]. This hat game, and a dual version where the players aim to guess the colour incorrectly, can be formalised in terms of the stability and the instability of FDSs with prescribed interaction graphs [6].
In the variation called the "guessing game" [16], the team wins if everyone has guessed their colour correctly; the aim is to maximise the number of hat assignments which are correctly guessed by all players. This version of the hat game then aims to determine the so-called guessing number of a digraph. Both hat games are linked in [6]. The guessing number is itself related to the network coding solvability problem [14,16,15].
Previous work on the (in)stability of FDSs were actually concerned with functions whose interaction graphs are contained in a given digraph. In this paper, we focus on "strict" (in)stability, where the interaction graph of the FDS is exactly a given digraph D. This paper has two main contributions.
• Firstly, we study the maximum (in)stability of an FDS with a prescribed interaction graph. We focus on graphs with a loop on each vertex, as this is where the non-strict case is trivial. The stability is more interesting; we give its limit for large alphabets and we give a tight lower bound for the Boolean case. We finally focus on the maximum stability of monotone Boolean FDSs.
• Secondly, we study the average (in)stability of an FDS with a prescribed interaction graph. This time, the average stability is relatively easy to handle, while the instability is more interesting. We relate the latter problem to the number of fixed-point free functions with a prescribed interaction graph. We conjecture that the number of fixed-point free elements does not tend to zero for large alphabets, unless the interaction graph is acyclic. We finally prove a stronger version of that conjecture for cycles.
The rest of the paper is as follows. Section 2 review some background on graphs and FDSs and introduces the strict (in)stability of digraphs. Section 3 gives our results on the maximum (in)stability of FDSs with a given loop-full interaction graph. Section 4 then investigates the average (in)stability of FDSs with a given loop-full interaction graph.
2 Stability and instability: definitions and basic properties

Finite dynamical systems
Let n be a positive integer and V = {1, . . . , n}. A graph D on V is a pair D = (V, E) with E ⊆ V 2 (in other words, all our graphs are directed). Paths and cycles are always directed. The girth of D is the minimum length of a cycle in D. A feedback vertex set is a set of vertices I such that D − I has no cycles. The minimum size of a feedback vertex set is denoted τ (D). If J ⊆ V , then D[J] is the subgraph of D induced by J. If this graph is acyclic, then the vertices of J can be sorted in acyclic ordering: and its in-degree is denoted by d(v; D); we may simply write N (v) and d(v) if the graph is clear from the context. A vertex with empty in-neighbourhood is a source of D. We denote the maximum in-degree of D as d max (D).
A loop is an arc of the form (v, v). We view a loop as a cycle of length one. If D has no loops, we say it is loopless; if D has a loop on every vertex, we say it is loop-full. If D is a loopless graph, then D • is the loop-full graph obtained by taking D and adding a loop to very vertex. An edge uv is a pair of arcs {(u, v), (v, u)} for u = v; a graph is simple if its arc set can be partitioned into edges (i.e. the graph is loopless and symmetric).
Let q ≥ 2, we denote [q] = {0, 1, . . . , q − 1}. For all x = (x 1 , . . . , x n ) ∈ [q] n , we use the following shorthand notation for all J = {j 1 , . . . , j k } ⊆ V : x J = (x j 1 , . . . , x j k ). For all x, y ∈ [q] n we set ∆(x, y) := {i ∈ [n] : x i = y i }. The Hamming distance between x and y is d H (x, y) = |∆(x, y)|. Finally, for any property P, we denote the function which returns 1 if P is satisfied and 0 otherwise is a local function of f . We also use the shorthand notation f J : We associate with f the graph G(f ), referred to as the interaction graph of f , defined by: the vertex set is V ; and for all u, v ∈ V , there exists an arc (u, v) if and only if f v depends essentially on x u , i.e. there exist x, y ∈ [q] n that only differ by When dealing with f ∈ F(n, q) we shall implicitly do all operations modulo q.
The stability and instability of an FDS f are respectively given by [6] s(f ) := min .

Stability and instability: general properties
The q-stability and q-instability of a graph D are [6] s(D, q) := max i(f ).
We give a hat game intuition for these quantities. Consider a game played by a team of n players, each having a hat that can take q possible colours. Each player can only see a subset of the hats; let D be the graph on {1, . . . , n} such that (u, v) is an arc if and only if v can see u's hat. Before the game starts, the players come up with a common strategy for guessing their own hat's colour; no communication is allowed once the colours have been chosen. Let x ∈ [q] n represent a configuration of hats. The team's guess is then denoted f (x), where f v depends on x u only if (u, v) ∈ D, or in other words G(f ) ⊆ D. Therefore, exactly n − d H (x, f (x)) players will guess correctly if the hat configuration is x. If the aim of the game is to find a guessing strategy that maximises the number of correct guesses for any possible configuration of hats, then the maximum is given by s(D, q). If on the other hand, the aim is to maximise the number of incorrect guesses, then the solution is i (D, q).
Similarly, we denote the strict q-stability and the strict q-instability of D as The hat game intuition here is not so straightforward, as we force each player to be influenced by every hat that they see at least once. For the stability, this makes a big difference when there is a loop on a vertex v. This case corresponds to player v being able to see their own hat, hence obviously the optimal strategy is f v (x) = x v . However, in the strict case, if (u, v) ∈ D, then at some point x u has to influence f v , which forces v to guess incorrectly. The game is now about minimising the negative influence of other players. We shall study this more in detail in the next section. Some basic properties of the (in)stability are given below.
Lemma 2.1. For every loopless graph D and any q ≥ 2, the following hold.

Proof. The relations s[D, 2] = i[D, 2] ≤ i[D, q]
were implicitly proved in [6]. Moreover, i[D, q] ≤ i(D, q) by definition. We now prove the last inequality. We view an element y of [2q] as (y 1 , and we let f ∈ F(D, q) with maximum instability. We construct g ∈ F[D, 2q] as follows: Then it is clear that i(g) ≥ i(f ).
In [6], it is proved that for any loopless D and any q ≥ 2, the instability i(D, q) is a non-decreasing function of q; the proof actually shows that the instability i[D, q] is non-decreasing. It is also proved in [6] that the stability s(D, q) is a non-increasing function of q; however, it is unknown whether the strict stability is also non-decreasing.
Proof. According to [6], i(D, q) = τ (D) for all q ≥ 2 n . Therefore, for all q ≥ 2 n+1 , Lemma 2.1 and the fact that the q-strict instability is non decreasing yield x u and combining with [6, Proposition 3], we easily obtain that for every n and q ≥ 2, These are the highest values of the (in)stability for all loopless graphs.
3 Strict (in)stability for loop-full graphs

Exact results
We now consider the strict (in)stability of loop-full graphs. Let D be a loopless graph and D • be obtained by adding a loop on every vertex. It is easily seen that the strict q-(in)stability of D • is a non-decreasing function of q. Then let S be the set of sources of D and define This can be viewed as the independence number of a related simple graph G = (V, E ′ ), where u and v are adjacent if and only if either We first determine the values of the strict (in)stability for large enough alphabets. Proof. All the neighbourhoods are with respect to D • . Let σ = σ(D) and Therefore, the state y = (y N (u 1 ) , . . . , y N (uσ) , y T ), where T is the rest of the vertices, satisfies d H (y, f (y)) ≥ σ.
Conversely, without loss suppose the set of loops in D is S = {n − |S| + 1, . . . , n}. Then let q ≥ n − |S| and consider the following function f ∈ F[D • , q]: Then clearly i(f ) = n.
We remark that the condition q ≥ n − |S| in Proposition 3.1 is tight for some graphs. Indeed, let D be an out-star, i.e.
Proposition 3.2. For any graph D without sources, the strict stability of D • and its maximum indegree are related by Conversely, for any t ≥ 1, ∆ ≥ 1 and q, there exists an infinite family of graphs with s[D • , q] = n − t, n = tq ∆ and d max (D) = ∆ + 1.
Proof. For any f ∈ F[D • , q] and any v, there is at least one value of On the other hand, T ≤ q n (n − s[D • , q]). Combining, we obtain .
Then let f ∈ F[D • , q] be defined as follows. Denote the set of possible values of x A as z 1 , . . . , z q ∆ , then It is clear that for any x and any i, exactly one vertex from C i guesses wrong, thus s(f ) = n − t.

Lower bound for the Boolean case
First of all, we make an important remark which characterises the functions with the highest stability The proof goes bottom-up, by proving the result for larger and larger classes of graphs. Firstly, an out-cycle consists of a cycle (or a single vertex) to which are appended some outgoing arcs, no more than one per vertex. More formally, a graph D = (V, E) is an out-cycle if there exist k ≥ 1, 0 ≤ l ≤ k, and three sets A = {a 1 , . . . , a k }, B = {a b 1 , . . . , a b l } ⊆ A and C = {c 1 , . . . , c l } such that the following hold: An example with k = 6 and l = 3 is given in Figure 1.  Proof. Let D be an out-cycle, with the sets A, B and C as above. Then let f ∈ F[D • , 2] be defined as follows: We now construct the simple graph D ′ = (V, E ′ ) as follows. Its edge set is and hence it is a Hamiltonian cycle. An example of D ′ is given in Figure 2. We prove that for any x ∈ [2] n , J := ∆(x, f (x)) is an independent set of D ′ .
• If a b j ∈ J, then x a b j = 0 hence c j / ∈ J. Thus there is no edge of the form a b j c j in J.
• If a i+1 ∈ J, where a i / ∈ B, then x a i = 1 hence x a i / ∈ J. Thus there is no edge of the form a i a i+1 in J. Figure 2: The simple graph D ′ corresponding to D in Figure 1 Secondly, let D = (V, E) be a loopless graph and let a ∈ V . We then introduce two ways to append two vertices u and v to a.  Proof Then, depending on the value of x a , either g u (x) = x u or g v (x) = x v and we obtain s(g) = s(f ) + 1.
Then, depending on the value of x u , either g u (x) = x u or g v (x) = x v and we obtain s(g) = s(f )+1.
Lemma 3.6. Any connected co-functional graph can be obtained from an out-cycle by repeatedly forking and branching.
Proof. We prove it by induction on the number of vertices. It is clearly true for up to three vertices; suppose it is true for n − 2. For any connected co-functional graph D, let A denote the set of vertices in the only cycle of D and let S denote the set of vertices whose out-neighbourhood consists of only leaves.
• Case 1: there exists s ∈ S with out-degree at least two. Referring to two out-neighbours of s as u and v, we see that D = (D \ {u, v}) F s , and by induction hypothesis, D can be obtained by successive forking and branching.
• Case 2: all vertices in S have out-degree one and there exists an element s ∈ S \ A. Denoting its out-neighbour as v and its in-neighbour as a, then D = (D \ {s, v}) B a , and by induction hypothesis, D can be obtained by successive forking and branching.
• Case 3: all vertices in S have out-degree one and S ⊆ A. Then D is an out-cycle.
We can now prove the theorem for co-functional graphs. Proof. If D is connected, then by Lemmas 3.4, 3.5 and 3.6, s[D • , 2] ≥ n/2. Let D be a co-functional graph with connected components C 1 , . . . , C s , with n 1 , . . . , n s vertices respectively. Then C i is cofunctional for all 1 ≤ i ≤ s, and hence

For any loopless H and D, we write H ≤ D if H is a spanning subgraph of D and for all
x a if u is not a source.
Therefore, for any Proof. Let C 1 , . . . , C s be the initial strong components of D, and let v 1 , . . . , v s such that v i ∈ C i for all i. We construct H as follows. For i from 1 to s, do the following 1. Use depth-first-search from v i to construct an out-tree H i .

2.
If v i is not a source in D, then add the arc (u i , v i ), where u i is a randomly chosen vertex of N (v i ; D).

Remove the vertex set of H i .
Then H = H 1 ∪ · · · ∪ H s .
The theorem then follows from the last three lemmas.

Strict monotone stability
There is a natural partial order on [2] n , whereby x ≤ y if and only if x v ≤ y v for all v. A function f ∈ F(n, 2) is monotone if it preserves that order: x ≤ y implies f (x) ≤ f (y). Monotone FDSs have very interesting properties, for instance the celebrated Knaster-Tarski theorem states that the set of fixed points of a monotone FDS forms a non-empty lattice. As such, these FDSs have been studied in different works [10,2]. We (Obviously, the in-neighbourhoods are with respect to D.) Hence for any function f ∈ F + [D • , 2] with maximum stability, its local functions are either φ or ψ as above (if v is not a source of D). In that case, we shall write f v ≡ φ or f v ≡ ψ, respectively. Moreover, letf be the dual of f , defined bỹ , hence s(f ) = s(f ). Thus, we can always assume that, for a given v, f with maximum stability has f v ≡ φ. Proof. We use the same notation as for Lemma 3.4. First of all, if D is a cycle, then the function where f v ≡ φ for all vertices v has stability ⌈n/2⌉ (it was already used in Lemma 3.4). Henceforth, we assume that D is not a cycle. Without loss, let b 1 = 1, and then define f ∈ F + [D • , 2] recursively as follows.
Define the simple graph D * = (V, E * ) as follows. Its edge set is and hence it is a Hamiltonian path. An example of D * is given in Figure 2. Again, we can prove that for any x ∈ [2] n , ∆(x, f (x)) is an independent set of D * , thus s(f ) ≥ ⌊n/2⌋.
The analogue of Lemma 3.5 is proved in the exact same fashion. Lemmas 3.6 and 3.7 only involve graph theory and as such we can prove the theorem for co-functional graphs. We now give the analogue of Lemma 3.8.  Proof.
. Secondly, if u is not a source, then f u ≡ φ or f u ≡ ψ for some function g u . We then introduce the function 2], defined as Finally, combining with Lemma 3.9, we prove the theorem for all graphs.
We now construct an infinite family of loop-full graphs where the strict monotone stability is below n/2. Let m be a positive integer, and let B m be the graph on n = 2m + 1 vertices with arc set The graph B m is represented in Figure 4.
Therefore, f is entirely described by ǫ = (ǫ 1 , . . . , ǫ n ). Our aim is to exhibit a state y ∈ [2] n such that d H (y, f (y)) ≥ m + 1. Without loss of generality, let f n = φ n , i.e. ǫ n = 0. We now proceed to a case analysis.
We are now interested in how the monotone stability compares with the stability. Clearly, the following are equivalent: D is the empty graph, s[D • , 2] = n and s + [D • , 2] = n. Once we exclude the empty graph, the two types of stabilities can be as far apart as Theorem 3.10 allows. The balanced complete bipartite graph K m,m has vertex set V = L∪R, where L = {l 1 , . . . , l m } and R = {r 1 , . . . , r m }, and all possible edges between L and R: E = {l i r j : l i ∈ L, r j ∈ R}.
We now prove that its stability is 2m − 1. If f l i (x) = x l i , then Similarly, if f r j (x) = x r j , then On the other hand, the monotone strict stability can also reach n − 1, for instance for D = K n ; we characterise such graphs below. A biclique is the complement of a bipartite graph. Let us call a loopless graph D a near-biclique if its vertex set can be partitioned into V = A ∪ B ∪ S, where S is the set of sources of D, and 4 Average strict stability and instability 4

.1 Average strict stability
We are first interested in the average value of the stability. The proportion of FDS in F(n, q) with positive stability decreases rapidly with q. For any set S ⊆ [q] n , the number of functions f in F(n, q) such that x and f (x) are at Hamming distance n for all x ∈ S is (q − 1) n|S| · q n(q n −|S|) . We obtain Unsurprisingly, the average stability for a given interaction graph tends to zero when q tends to infinity.

Average strict instability
The average instability in F[D, q] seems to behave in a more complicated fashion, but at least we have a result for the average instability in F(n, q).
Proposition 4.2. For any n ≥ 1, Proof. Let q be large enough, and suppose f ∈ F(n, q) is chosen uniformly at random. Then Thus, For the sake of conciseness, we use the notation We similarly define F 0 (D, q), p 0 (D, q), etc. If D is not acyclic, then [1] gives a construction of a fixed point free element of F[D, q] for any q.
Therefore, using the fact that |C φ | ≥ q n−τ (D) [6] we obtain We remark that the bound above is tight for some cases. Firstly, it is clearly tight if D is acyclic. Secondly, let q = 2 and D be the disjoint union of ν = τ (D) cycles (with no other arcs). Then |F[D, 2]| = 2 n for each local function is of the form A cycle is positive if there is an even number of vertices v such that ǫ v = 1, and negative otherwise. It is easy to check that either all the cycles of f are positive, in which case f has 2 ν fixed points, or that one of its cycles is negative and hence f has no fixed points. Thus   The proof is based on the following lemma: the average number of fixed points in F[D, q] is equal to one.
Proof of Proposition 4.4. (a) ⇒ (b). Suppose that D satisfies Property (a) but not (b), then for any a > ǫ > 0 there exists q large enough such that d 2 ≥ a and d 0 < ǫ, and hence d 1 + d 2 > 1 − ǫ. The average number of fixed points in F[D, q] is at least 2d 2 + d 1 ≥ a + 1 − ǫ > 1, which contradicts Lemma 4.5.
The proof of (c) ⇒ (b) is analogous, and hence omitted. Moreover, Property (b) clearly implies (c) for c = 1 − a. Finally, the instability of a fixed-point free FDS is between 1 and n, which immediately implies that Properties (b) and (d) are equivalent.
Since the probability that a random mapping in F(n, q) has k fixed points tends to e −1 /k! for fixed k, we see that the graph K • n satisfies Property (a). Moreover, the graph with only n loops satisfies Property (a), and more precisely We therefore conjecture that if D is non-acyclic, then the average instability is bounded away from zero for large alphabets (Property (d)). We give two versions of this conjecture, the first one being stronger than the second according to Proposition 4.4. We now prove the conjecture for cycles. Proof. We have that S ⊆ [q] n is a set of fixed points of some function f ∈ F( C n , q) if and only if S is a code of minimum distance n [9]; in other words, for any distinct x, y ∈ S and any v ∈ V , x v = y v . The number of codes of minimum distance n and cardinality t ≥ 1 in [q] n is then For any such S, let A S denote the number of functions f ∈ F( C n , q) such that S ⊆ Fix(f ). Then f ∈ A S if and only if for any v ∈ V and any s ∈ S, f v (s v−1 ) = s v . Since the values outside of S are arbitrary, there are q q−t choices for f v , and hence |A S | = v∈V q q−t = q −nt |F( C n , q)|.
Thus, by the inclusion-exclusion principle, the number of fixed point free functions in F( C n , q) is given by |F 0 ( C n , q)| = |F( C n , q)| 1 − q t=1 (−1) t−1 c n q −nt , We denote the right hand side of the last equation as V q .
Proof. Let ǫ > 0 and q large enough so that L t=0 (−1) t t! − e −1 < α, n L q < β, q L! < γ, where L = ⌈log q⌉ and α + eβ + γ < ǫ. We will prove that |V q − e −1 | < ǫ. Firstly, for all t ≤ L, Combining, we obtain On the other hand, This proves the limit of p 0 [ C n , q]. Moreover, since any function in F[ C n , q] has instability at most one, we get the limit of the average instability.
In a similar way, for any x ∈ [q] n the number of functions in F 1 ( C n , q) fixing only x is given by As q tends to infinity, that quantity tends to V q , and hence p 1 [ C n , q] tends to e −1 . Finally, we easily obtain the limit of p 2 [ C n , q].