Profiles of dynamical systems and their algebra
PProfiles of dynamical systems and their algebra
Caroline Gaze-Maillot and Antonio E. Porreca Aix Marseille Université, Université de Toulon, CNRS, LIS, Marseille, France [email protected] Université publique [email protected]
Abstract.
The commutative semiring D of finite, discrete-time dynami-cal systems was introduced in order to study their (de)composition froman algebraic point of view. However, many decision problems related tosolving polynomial equations over D are intractable (or conjectured tobe so), and sometimes even undecidable. In order to take a more abstractlook at those problems, we introduce the notion of “topographic” profileof a dynamical system ( A, f ) with state transition function f : A → A as the sequence prof A = ( | A | i ) i ∈ N , where | A | i is the number of stateshaving distance i , in terms of number of applications of f , from a limitcycle of ( A, f ) . We prove that the set of profiles is also a commutativesemiring ( P , + , × ) with respect to operations compatible with those of D (namely, disjoint union and tensor product), and investigate its algebraicproperties, such as its irreducible elements and factorisations, as well asthe computability and complexity of solving polynomial equations over P . Given a description of a dynamical system, it is often interesting for scientific orengineering purposes to analyse its dynamics, in order to detect its asymptoticbehaviour, such as the number and size of limit cycles or fixed points, or otherinteresting behaviours, such as the reachability of states or its transient paths.However, these problems are often computationally demanding when the systemis described in a succinct way, as one normally does, e.g., for Boolean automatanetworks or cellular automata [5,11]. It is useful, then, to decompose the systeminto smaller systems before applying such algorithms; if an appropriate decompo-sition is chosen, the global behaviour of the system may be deduced from thebehaviour of its components [8].Let us now consider finite, discrete-time dynamical systems in the most generalsense: as finite sets A of states (including the empty set) together with a statetransition function f : A → A . The (countably infinite) set of finite dynamicalsystems up to isomorphism is a semiring ( D , + , × ) with the operations [2] ( A, f ) + (
B, g ) = ( A (cid:93) B, f + g ) where ( f + g )( x ) = (cid:40) f ( x ) if x ∈ Ag ( x ) if x ∈ B ( A, f ) × ( B, g ) = ( A × B, f × g ) where ( f × g )( a, b ) = ( f ( a ) , g ( b )) . a r X i v : . [ c s . D M ] A ug hese operations can also be defined in terms of the graphs of the dynamics asdisjoint union + and graph tensor product × , which equivalently corresponds tothe Kronecker product of the adjacency matrices [6].Given this algebraic structure, one can try to decompose dynamical systemsin terms of factoring, or in terms of polynomial equations over D [ (cid:126)X ] in severalvariables. The decomposition of a dynamical systems in terms of the operations + and × does indeed allow us to detect several interesting dynamical behaviours ofthe system in terms of its components. For instance, the limit cycles in a sumare just the union of the limit cycles of the addends, while in a product one canpredict the number and length of limit cycles as a function of the GCD and LCMof the lengths of the cycles of the factors [3].However, solving equations over D [ (cid:126)X ] is not easy either, even if the dynamicalsystems are given in input explicitly, either as a transition table, or equivalentlyin terms of the graph of its dynamics G ( A, f ) = ( A, { ( a, f ( a )) : a ∈ A } ) . Generalpolynomial equations are even undecidable [2], systems of linear equations are NP -complete, and single equations (even linear) with a constant side are also suspectedto be NP -complete [9].When (de)composing dynamical systems as products, one frequently worksstarting from the limit cycles and backwards towards the gardens of Eden (stateswithout preimages). It is then useful to know how many states there are atdistance , , . . . from the limit cycles, as that gives us, for instance, necessaryconditions for the compositeness of a system. In this paper we formalise this as thenotion of profile of a dynamical system, in order to analyse systems from a moreabstract point of view. We obtain another semiring ( P , + , × ) with the “natural”operations derived from those of ( D , + , × ) , analyse some of its algebraic properties(notably, the majority of profiles are irreducible) and prove that working withequivalence classes of systems (with respect to profile equality) ultimately does not reduce the complexity of equation problems: general polynomial equationsremain undecidable, and even solving a single linear equation is NP -complete. Any finite dynamical system ( A, f ) consists of one or more disjoint limit cycles ,which constitute the asymptotic behaviour of the system. Each cycle of length is called a fixed point , and its only state x satisfies f ( x ) = x . The transient(non-asymptotic) behaviour of the system consists of zero or more directed treesof least two nodes having a state of a limit cycle as its root. The existence oflimit cycles, which does not hold in general for infinite dynamical systems, givesa (pre)ordering to the states, with respect to their distance (in terms of numberof applications of f ) from the limit cycle in the same connected component ofthe graph of the dynamics, which we will call its height . Definition 1.
Let ( A, f ) be a dynamical system and let x ∈ A . We say that the height of x , in symbols h A ( x ) or even h ( x ) if A is implied, is the minimum h such that f h ( x ) is a periodic state, that is, the length of a path from x to thenearest periodic state in the graph of the dynamics of A . eight0123 Fig. 1.
Visual representation of the contour lines (isolines) of a dynamical system havingprofile (8 , , , : there are states in limit cycles, states of height , of height ,and of height . It is also possible to generalise the notion of height to a dynamical systems.
Definition 2.
Let ( A, f ) be a dynamical system. We say that the height of A , insymbols h ( A ) , is the maximum height of its states: h ( A ) = max { h A ( x ) : x ∈ A } . We can now introduce the notion of profile of a dynamical system, whosename is inspired by the topographic profile of a terrain (Fig. 1).
Definition 3.
Let ( A, f ) be a dynamical system of height h , and let | A | i be thenumber of states of A having height i . This implies | A | i ≥ for ≤ i ≤ h and | A | i = 0 for i > h . Then, the profile of A is the eventually null sequence ofnatural numbers prof( A, f ) = ( | A | i ) i ∈ N counting the states of each height in A ,in order of height starting from the limit cycles (height ). For brevity, we oftenwrite a profile as a finite sequence prof( A, f ) = ( | A | , | A | , . . . , | A | h ) by omittingthe null terms, except for the profile (0) of the empty dynamical system. Taking the profile of a dynamical system allows us to work at a higher level ofabstraction, since it corresponds to taking a whole equivalence class of dynamicalsystems. In the rest of this paper, we will denote profiles with bold letters andits elements in italics, such as p = ( p i ) i ∈ N . The semiring of profiles
It is easy to define a sum operation + over the (countably infinite) set of profiles P that is compatible with the sum over D : since ( A, f ) + (
B, g ) is the disjoint union,the profile of this sum is just the elementwise sum of prof( A, f ) and prof( B, g ) . Definition 4.
Given two profiles p = ( p i ) i ∈ N and q = ( q i ) i ∈ N , define their sumas p + q = ( p i + q i ) i ∈ N . Lemma 5.
For each
A, B ∈ D we have prof( A + B ) = prof A + prof B . (cid:117)(cid:116) It is less immediate to define a product over P , but it is indeed possible witha little more work. First, we show that, in order to compute the height of a statein a product, it suffices to take the maximum height of the two terms. Lemma 6.
Let ( A, f ) , ( B, g ) ∈ D and let ( C, t ) = (
A, f ) × ( B, g ) . Then, foreach ( a, b ) ∈ C , we have h ( a, b ) = max( h ( a ) , h ( b )) .Proof. Notice that the limit cycles of C consist exactly of the states ( x, y ) suchthat y is a periodic state of A , and y a periodic state of B .Suppose that h ( a ) ≥ h ( b ) . Then f h ( a ) ( a ) is a periodic state of A , and this isnot the case for f i ( a ) whenever i < h ( a ) , by definition of height. Furthermore, g h ( a ) ( b ) is a periodic state of B , since this is the case for all g i ( b ) with i ≥ h ( b ) .Then, t h ( a ) ( a, b ) = ( f h ( a ) ( a ) , g h ( a ) ( b )) is a periodic state of C , and this is not thecase for t i ( a, b ) whenever i < h ( a ) . This means that h ( a, b ) = h ( a ) .Analogously, if h ( a ) ≤ h ( b ) we obtain h ( a, b ) = h ( b ) , and the statement ofthe lemma follows. (cid:117)(cid:116) The following lemma allows us to count the states of height k in a product asa function of the number of states of height k and at most k of the two factors. Lemma 7.
Let
A, B ∈ D be dynamical systems and let C = A × B . Then | C | k = | A | k × | B | ≤ k + | B | k × | A | ≤ k − | A | k × | B | k (1) for each height k , where | D | ≤ k = | D | + | D | + · · · + | D | k for each D ∈ D .Proof. Let a ∈ A with h ( a ) = k and b ∈ B with h ( b ) ≤ k . Then, by Lemma 6,we have h ( a, b ) = k . This corresponds to the term | A | k × | B | ≤ k of the sum.Analogously, we have h ( a, b ) = k if h ( a ) ≤ k and h ( b ) = k , which correspondsto the term | B | k × | A | ≤ k . This way, we have counted twice the states ( a, b ) with h ( a ) = k and h ( b ) = k , thus it is necessary to subtract the term | A | k × | B | k ,and that gives us the correct result. Notice that (1) works even if | A | k = 0 or | B | k = 0 (i.e., if k > h ( A ) or k > h ( B ) ), giving the expected | C | k = | B | k ×| A | ≤ k and | C | k = | A | k × | B | ≤ k , or even | C | k = 0 if k > max( h ( A ) , h ( B )) . (cid:117)(cid:116) Notice how Lemma 7 does not depend on the exact shapes of A and B ,but only on their profile. This allows us to define the product of profiles asfollows (Fig. 2): (0) (1) (2) (1,1) (3) (1,2) (2,1) (1,1,1)(0) (0) (0) (0) (0) (0) (0) (0) (0)(1) (0) (1) (2) (1,1) (3) (1,2) (2,1) (1,1,1)(2) (0) (2) (4) (2,2) (6) (2,4) (4,2) (2,2,2)(1,1) (0) (1,1) (2,2) (1,3) (3,3) (1,5) (2,4) (1,3,2)(3) (0) (3) (6) (3,3) (9) (3,6) (6,3) (3,3,3)(1,2) (0) (1,2) (2,4) (1,5) (3,6) (1,8) (2,7) (1,5,3)(2,1) (0) (2,1) (4,2) (2,4) (6,3) (2,7) (4,5) (2,4,3)(1,1,1) (0) (1,1,1) (2,2,2) (1,3,2) (3,3,3) (1,5,3) (2,4,3) (1,3,5) Fig. 2.
Multiplication table for profiles of size , , , and . Definition 8.
For two profiles p = ( p i ) i ∈ N and q = ( q i ) i ∈ N , let their product be p × q = (cid:16) p i × (cid:80) ij =0 q i + q i × (cid:80) ij =0 p i − p i × q i (cid:17) i ∈ N . From Definition 8 and Lemma 7 we obtain the expected result:
Lemma 9.
For each
A, B ∈ D we have prof( A × B ) = prof A × prof B . (cid:117)(cid:116) This finally gives us the algebraic structure of P . Theorem 10. ( P , + , × ) is a commutative semiring.Proof. The operation + inherits the associative and commutative propertiesfrom N and has, as the neutral element, the null profile P = (0) , i.e., the profileof the empty dynamical system D = ∅ . Thus ( P , +) is a commutative monoid.Let p , q , r ∈ P , and let A, B, C ∈ D such that prof A = p , prof B = q ,and prof C = r . Then we have p × q = prof A × prof B = prof( A × B ) byLemma 9, then prof( A × B ) = prof( B × A ) by commutativity of × in D ,and prof( B × A ) = prof B × prof A = q × p , and thus × is commutative.Similarly, we have the associative property p × ( q × r ) = ( p × q ) × r , the neutralelement P = prof 1 D = (1) , i.e., the profile of a the dynamical system consistingof a single fixed point, and the distributive property p × ( q + r ) = p × q + p × r . (cid:117)(cid:116) From Lemmata 5 and 9 we also obtain that “taking the profile” does indeedrespect the semiring operations and, being surjective, it gives us, in a sense, agood abstraction of dynamical systems. orollary 11.
The function prof : D → P is a surjective semiring homomor-phism. (cid:117)(cid:116) A very important and useful result is that P contains an isomorphic copy ofthe naturals, the initial semiring of its category: Lemma 12. ( P , + , × ) has a subsemiring isomorphic to ( N , + , × ) .Proof. Let φ : N → D be defined by φ ( n ) = ( n ) , that is, the profile having n as itsfirst component and zero everywhere else. Then φ (0) = (0) = 0 P , φ (1) = (1) = 1 P , φ ( m + n ) = ( m + n ) = ( m ) + ( n ) = φ ( m ) + φ ( n ) , and φ ( m × n ) = ( m × n ) =( m ) × ( n ) = φ ( m ) × φ ( n ) . Thus φ is a semiring homomorphism. Furthermore, φ ( m ) = φ ( n ) implies m = n , i.e., φ is injective. As a consequence, its image φ ( N ) is a subsemiring of P isomorphic to N . (cid:117)(cid:116) The size of a profile is the number of states of any dynamical system withthat profile, and it also enjoys some nice properties.
Definition 13.
The size of a profile p = ( p i ) i ∈ N is given by | p | = (cid:80) i ∈ N p i . Lemma 14.
The function | · | : P → N is a semiring homomorphism.Proof. The size | p | of a profile p is just the number of states | A | of any dynamicalsystem A such that prof A = p . Since the sum and product of dynamicalsystems have the disjoint union and the Cartesian product as their set of states,respectively, we have | A + B | = | A | + | B | and | A × B | = | A | × | B | for A, B ∈ D .Furthermore, we have | P | = 0 and | P | = 1 . The result then follows fromLemmata 5 and 9. (cid:117)(cid:116) Since the profiles P contain the naturals (Lemma 12), they are not only asemiring, but also an N -semimodule, a “vector space” with the naturals as its“scalars” [7], with the semimodule axioms satisfied as a direct consequence ofthe semiring axioms. This will be useful later when analysing the complexity ofsolving linear equations over P (Section 5). Theorem 15. ( P , +) is an N -semimodule with its ordinary multiplication re-stricted to N × P → P , that is, n × ( p i ) i ∈ N = ( np i ) i ∈ N . (cid:117)(cid:116) Unfortunately, profiles are not particularly nice as a semimodule, since thereis only one minimal generating set, and it is not linearly independent.
Theorem 16. P as an N -semimodule has a unique, countably infinite minimalgenerating set G = { p ∈ P : p = 1 } , the set of profiles starting with , which islinearly dependent.Proof. The set G is a generating set, since any profile q = ( q , q , q , . . . ) can bewritten as ( q − × (1) + 1 × (1 , q , q , . . . ) , that is, any element of P is a linearcombination of at most two elements of G . This set is countably infinite.To prove that any generating set of P must contain G , consider any ele-ment p ∈ G . If it is a linear combination p = (cid:80) mi =1 a i q i of profiles q i ∈ P withoefficients a i ∈ N , then one of the q i must start with (i.e., q i, = 1 ) and itscoefficient a i must be as well, otherwise we would have either p = 0 or p > ;furthermore, we must have ( a j q j ) = 0 for all j (cid:54) = i , which implies a j q j = 0 (since all elements of a profile are null after the first ) and thus a j = 0 . But thenwe have p = 1 q i , that is, q i = p : any linear combination giving p as its resultmust contain p itself, and thus it must belong to any generating set.However, G is not linearly independent, that is, there exist m profiles p i ∈ P and corresponding natural numbers a i , b i ∈ N such that (cid:80) mi =1 a i p i = (cid:80) mi =1 b i p i but a i (cid:54) = b i for some i . For instance, we have (1 ,
1) + (1 ,
2) = (1) + (1 , . (cid:117)(cid:116) When studying the reducibility of profiles with respect to semiring product, asimple sufficient condition for irreducibility is given by the primality of its size.
Lemma 17.
Let p ∈ P be a profile such that | p | is prime. Then p is irreducible.Proof. Suppose p = q × r . Since | · | is a semiring homomorphism (Lemma 14),we have | p | = | q | × | r | . But | p | is prime, thus either | q | = 1 , or | r | = 1 . Since theonly profile of size is P = (1) , this factorisation is trivial. (cid:117)(cid:116) It is easy to check by inspection of the product table (Fig. 2) that someprofiles admit multiple factorisations into irreducibles, a property that they sharewith the semiring of dynamical systems [2].
Theorem 18. P is not a unique factorisation semiring.Proof. The smallest counterexample is the profile (2 , , which has two distinctfactorisations: (2 ,
4) = (2) × (1 ,
2) = (1 , × (2 , . All the factors (2) , (1 , , (1 , , and (2 , are irreducible because of their prime size (Lemma 17). (cid:117)(cid:116) Another property in common with dynamical systems [3] is that most profiles,a fraction asymptotically equal to , are irreducible. Theorem 19.
The majority of profiles is irreducible; specifically, lim n →∞ number of reducible profiles of size at most n number of profiles of size at most n = 0 . Proof.
There are as many profiles of size i as there are ordered tuples of strictlypositive naturals having sum i , which correspond to the ways of writing i as anordered sum of strictly positive integers. The latter are the compositions of i ,and there are i − of them for i ≥ [1, Chapter 4], and for i = 0 . Hence, thenumber of profiles of size at most n is given by (cid:80) ni =1 i − = 1 + 2 n − n .Suppose that p ∈ P has size i = | p | and that i = (cid:96)m . Then, there are atmost (cid:96) − × m − = 2 (cid:96) + m − ways of choosing profiles q and r , of sizes (cid:96) and m respectively, such that p = q × r .Let k be the number of distinct factorisations of i into products of twointegers (cid:96) j ≥ m j > . The number of ways of decomposing p into a product of twonon-trivial divisors is at most (cid:80) kj =1 (cid:96) j + m j − . Observe that (cid:96) + m ≤ (cid:96)m/ for This can be proved by induction on any of the two variables. ll (cid:96), m > ; this implies (cid:80) kj =1 (cid:96) j + m j − ≤ (cid:80) kj =1 (cid:96) j m j / = (cid:80) kj =1 i/ = k √ i .We have k < i , since the number of non-trivial divisors of i is strictly less than i (at least and i have to be thrown out), hence the number of ways of obtaining aprofile of size i as a product of two non-trivial profiles, which is the same as thenumber of reducible profiles of size i , is bounded by i √ i for k ≥ , and it is for i = 0 . The number of reducible profiles of size at most n is then boundedby (cid:80) ni =1 i √ i = 1 + (3 √ n √ n +1 + ( n − √ n + 1) .Let us divide that by the number of profiles of size n : √ (cid:0) n √ n +1 + ( n − √ n + 1 (cid:1) n → √ n √ n +1 n as n → ∞ . The latter fraction has limit as n → ∞ , as required. (cid:117)(cid:116) Thus, the semiring of profiles is quite complex from the point of view ofreducibility: most profiles are not reducible at all, but those that are sometimesadmit multiple factorisations. Furthermore, since height- profiles behave as thenatural numbers, we also obtain a complexity lower bound to profile factorisation. Theorem 20.
The problem of profile factorisation, that is, given a profile p ∈ P ,finding a divisor d of p with d (cid:54) = 1 P and d (cid:54) = p (or answering that p is irreducible,if this is the case) is at least as hard as integer factorisation.Proof. Given a natural number n , let us consider the profile n = ( n ) , that is, n followed by zeros. This profile can only be divided by profiles d = ( d ) and q = ( q ) of height by Lemma 6. Then, n = d × q = ( d × q + d × q − d × q ) = ( d × q ) for some profile d with d (cid:54) = 1 P and d (cid:54) = n if and only if n = d × q for some d with d (cid:54) = 1 and d (cid:54) = n , which is the integer factorisation problem. (cid:117)(cid:116) One of the reasons for introducing profiles is to abstract away from the exactshape of dynamical systems, with the hope of making polynomial equations easierto solve. As we will show in this section, this is not at all the case. First of all, letus prove that polynomial equations with natural coefficients do sometimes have non-natural solutions in P (e.g., X = Z has solution X = (1 , , Z = (3 , ), butonly if there also exist natural ones (e.g., X = 3 , Z = 9 ), as in the semiring D [2]. Lemma 21.
Let p, q ∈ N [ (cid:126)X ] be polynomials with natural coefficients over thevariables (cid:126)X = ( X , . . . , X m ) . Then the equation p ( (cid:126)X ) = q ( (cid:126)X ) has a solution in P if and only if it has a solution in N .Proof. If the equation has a solution in N , then this is already a solution in P . Con-versely, let (cid:126) r = ( r , . . . , r m ) be a solution in P . We claim that | (cid:126) r | = ( | r | , . . . , | r m | ) is also a solution, in N ; that is, by replacing each profile by (the dynamical systemcorresponding to) its size, the equation remains valid. This can be proved by induction on n . f the equation p ( (cid:126)X ) = q ( (cid:126)X ) is of degree at most n , then it can be writtenas (cid:80) (cid:126)i ∈ [0 ,n ] m (cid:0) a (cid:126)i (cid:81) mj =1 X i j j (cid:1) = (cid:80) (cid:126)i ∈ [0 ,n ] m (cid:0) b (cid:126)i (cid:81) mj =1 X i j j (cid:1) , that is, we compute allproducts of the m variables, each variable with an exponent ranging from to n (these exponents are collected in a vector (cid:126)i ∈ [0 , n ] m ), and multiply it bya corresponding coefficient a (cid:126)i ∈ N or b (cid:126)i ∈ N , and then all these monomials areadded together. Any of the coefficients a (cid:126)i and b (cid:126)i can be (if there is more thanone variable, some of them will surely be, in order to keep the degree at most n ).If (cid:126) r is a solution the equation, i.e., if p ( (cid:126) r ) = q ( (cid:126) r ) , then by expanding weobtain (cid:80) (cid:126)i ∈ [0 ,n ] m (cid:0) a (cid:126)i (cid:81) mj =1 r i j j (cid:1) = (cid:80) (cid:126)i ∈ [0 ,n ] m (cid:0) b (cid:126)i (cid:81) mj =1 r i j j (cid:1) . By applying the sizefunction | · | to both sides of the equation, and exploiting the fact that itis a semiring homomorphism (Lemma 14) and that | a (cid:126)i | = a (cid:126)i and | b (cid:126)i | = b (cid:126)i since they already are natural numbers, we obtain the equation over the natu-rals (cid:80) (cid:126)i ∈ [0 ,n ] m (cid:0) a (cid:126)i (cid:81) mj =1 | r j | i j (cid:1) = (cid:80) (cid:126)i ∈ [0 ,n ] m (cid:0) b (cid:126)i (cid:81) mj =1 | r j | i j (cid:1) , which is nothing elsethan p ( | (cid:126) r | ) = q ( | (cid:126) r | ) . Thus | (cid:126) r | is indeed a natural solution to the original equa-tion. (cid:117)(cid:116) As a consequence, “Hilbert’s 10th problem over P ” has a negative answer:there is no algorithm for deciding if a polynomial equation in P [ (cid:126)X ] is solvable,otherwise you could use the same algorithm for natural equations. Theorem 22.
Deciding whether an equation p ( (cid:126)X ) = q ( (cid:126)X ) with p, q ∈ P [ (cid:126)X ] hasa solution in P is undecidable. (cid:117)(cid:116) We can get a subclass of algorithmically solvable equations by having oneconstant side, that, by considering equations of the form p ( (cid:126)X ) = q with q ∈ P .The constant side makes the search space of the solutions finite, which meansthat at least a brute-force search algorithm is available. Lemma 23.
Let p , q , r ∈ P be profiles. Then p + q = r implies p i ≤ r i ,and p × q = r implies p i ≤ r i whenever q (cid:54) = 0 P , for all i ∈ N .Proof. If p + q = r , then p i ≤ p i + q i = r i for all i ∈ N , as required. Nowsuppose p × q = r and q (cid:54) = 0 P . By Definition 8, this means r i = ( p × q ) i = p i × i (cid:88) j =0 q i + q i × i (cid:88) j =0 p i − p i × q i . Since q (cid:54) = 0 P , we have q j ≥ for at least one j ≤ i . This means that p i × (cid:80) ij =0 q i ≥ p i . If q i = 0 then r i ≥ p i as required. So suppose q i ≥ ; thisimplies q i × (cid:80) ij =0 p i ≥ q i × p i and r i ≥ p i + q i × p i − p i × q i = p i , which completesthe proof. (cid:117)(cid:116) By applying Lemma 23 repeatedly, we obtain the following result.
Lemma 24.
Let p ( (cid:126)X ) ∈ P [ (cid:126)X ] over the variables (cid:126)X = ( X , . . . , X m ) , and let q ∈ P be a constant. Then, if p ( (cid:126) r ) = q for some (cid:126) r = ( r , . . . , r m ) ∈ P m , thereexists a (possibly different) solution (cid:126) s = ( s , . . . , s m ) ∈ P m such that p ( (cid:126) s ) = q and s i,j ≤ q j for all ≤ i ≤ m and j ∈ N .roof. If all coefficients of p are nonzero, and all profiles r i are also nonzero, thenlet (cid:126) s = (cid:126) r , and the result follows from Lemma 23 by induction on the structure ofthe expression p ( (cid:126) r ) .Otherwise, the expression p ( (cid:126) r ) is a sum with at least one null term, say a × p e i × · · · × p e k i k . If any of the terms p i occurring in this product have p i,j > q j for some j ∈ N , then it means that p i never occurs in a non-null term ofthe expression p ( (cid:126) r ) , since all sums are computed elementwise and this wouldinvalidate the equality. Hence p i only occurs multiplied by P , and it can thusbe replaced by any profile p (cid:48) i satisfying p (cid:48) i,j ≤ q j (for instance, p (cid:48) i = 0 P alwaysworks) without changing the validity of the equation. By repeating this operationwith all profiles p i of this kind, we obtain another solution (cid:126) s which satisfies therequired inequalities. (cid:117)(cid:116) In the rest of the paper we encode profiles, as is natural, as finite sequencesof natural numbers p = ( p , . . . , p h ) in binary notation. We can prove thatpolynomial equation with a constant side can be solved in nondeterministicpolynomial time. Lemma 25.
Deciding whether an equation p ( (cid:126)X ) = q , with p ∈ P [ (cid:126)X ] andconstant right-hand side q ∈ P , has a solution in P is an NP problem. The sameholds for a system of equations.Proof. By Lemma 24, the equation has a solution if and only if it has a solution (cid:126) r =( r , . . . , r m ) where each element of r , . . . , r m is bounded by an element of q .Thus, guessing a solution to the equation amounts to guessing, for each r i =( r i, , . . . , r i,h ) , a natural number r i,j ∈ [0 , q j ] for each height , . . . , h ( q ) . This canbe performed in nondeterministic polynomial time. Then, the candidate solutioncan be verified in deterministic polynomial time by evaluating the p ( (cid:126)X ) in (cid:126) r andchecking equality with q . This proves that the problem belongs to NP .In the case of multiple equations, after guessing the solution we need to verifythat all equations are satisfied, which still takes polynomial time. (cid:117)(cid:116) Unfortunately, the NP upper bound is strict. We prove that first for systemsof linear equations. Theorem 26.
Deciding whether a system of linear equations p ( (cid:126)X ) = q · · · p n ( (cid:126)X ) = q n (cid:124) (cid:123)(cid:122) (cid:125) with p i ∈ P [ (cid:126)X ] and constant right-hand sides q i ∈ P has a solution in P is NP -complete.Proof. We prove that the problem is NP -hard by reduction from the NP -completeproblem One-in-three 3SAT, the problem of deciding whether a Boolean formula ϕ in ternary conjunctive normal form has a satisfying assignment which makes onlyone literal per clause true [10].or each logical variable x of ϕ we have a pair of variables X and X (cid:48) and anequation X + X (cid:48) = 1 . This equation forces exactly one between X and X (cid:48) to ,and the other to . We use X to represent x and X (cid:48) to represent ¬ x .For each clause ( (cid:96) ∨ (cid:96) ∨ (cid:96) ) of three literals we have an equation L + L + L =1 , where L i = X i if (cid:96) i = x i , and L i = X (cid:48) i if (cid:96) i = ¬ x i . This forces exactly onevariable corresponding to a literal of the clause to , and the other two to .Then, the system of equations obtained from ϕ is linear and has constantright-hand sides; furthermore, it has a solution if and only if the formula has asatisfying assignment. In fact, the satisfying assignments and the solutions tothe system of equations are actually the same, if we interpret as false and astrue. (cid:117)(cid:116) By exploiting the N -semimodule structure of P , we can combine several linearequations together, proving that even a single one is already NP -hard. Theorem 27.
Deciding whether a single linear equation p ( (cid:126)X ) = q , with p ∈ P [ (cid:126)X ] and constant right-hand side q ∈ P , has a solution in P is NP -complete.Proof. We prove this problem NP -complete by adapting the proof of Theorem 26,reducing the system of linear equations p ( (cid:126)X ) = 1 , . . . , p n ( (cid:126)X ) = 1 to a singlelinear equation. Remark that all coefficients of the polynomials p i , as well as theright-hand sides of the equations, are actually natural numbers in that proof.As mentioned above (Theorem 15), P is an N -semimodule. Consider the ele-ments e i = (1 , . . . , (cid:124) (cid:123)(cid:122) (cid:125) i times ∈ P for ≤ i ≤ n ; these elements are linearly independentover N , since the n × n matrix over R having the length- n prefixes of e , . . . , e n as columns has determinant , and if there exists no linear combination withnonzero real coefficients giving the null vector, certainly there does not exist onewith natural coefficients. Now consider the following equation: n (cid:88) i =1 e i p i ( (cid:126)X ) = n (cid:88) i =1 e i . It is a linear equation with constant right-hand side in P and left-hand sidein P [ (cid:126)X ] . By linear independence over N of the elements e i , this equality holds ifand only if p i ( (cid:126)X ) = 1 for all ≤ i ≤ n , that is, the equation has exactly the samesolutions as the original system of equations, and this completes the proof. (cid:117)(cid:116) The quest for a suitable algebraic abstraction of dynamical systems where poly-nomial equations are tractable, such as a semiring R with a surjective homomor-phism D → R that does not erase too much information, is not over. However, wefeel like the semiring P itself still deserves further investigation. Is the borderlinebetween decidable and undecidable equation problems, for instance in terms ofpolynomial degree or number of variables, the same as for natural numbers? Arehere interesting subclasses of equations that are solvable in polynomial time,and others decidable but strictly harder than NP ? Is there a polynomial-timereducibility test? And, from a more algebraic perspective, what are the primeelements of P ? Do they exist at all? Acknowledgements
Caroline Gaze-Maillot was funded by a research internshipand Antonio E. Porreca by his salary of French public servant (both affiliated toAix Marseille Université, Université de Toulon, CNRS, LIS, Marseille, France).This work is an extended version of Caroline Gaze-Maillot’s research internshipwork [4]. We would like to thank Luca Manzoni for several fruitful discussionsabout the subject of this paper, in particular on the generating sets of P asan N -semimodule (Theorem 16), and Florian Bridoux, for having the good ideaon how to reduce several linear equations to a single one (Theorem 27). References
1. Andrews, G.E.: The Theory of Partitions. Cambridge University Press (1984), https://doi.org/10.1017/CBO9780511608650
2. Dennunzio, A., Dorigatti, V., Formenti, E., Manzoni, L., Porreca, A.E.: Polynomialequations over finite, discrete-time dynamical systems. In: Mauri, G., El Yacoubi,S., Dennunzio, A., Nishinari, K., Manzoni, L. (eds.) Cellular Automata, 13thInternational Conference on Cellular Automata for Research and Industry, ACRI2018. Lecture Notes in Computer Science, vol. 11115, pp. 298–306. Springer (2018), https://doi.org/10.1007/978-3-319-99813-8_27
3. Dorigatti, V.: Algorithms and Complexity of the Algebraic Analysis of FiniteDiscrete Dynamical Systems. Master’s thesis, Università degli Studi di Milano-Bicocca (2018)4. Gaze-Maillot, C.: Analyse algébrique des systèmes dynamiques finis (2020), mémoirede stage de Master 2 Recherche, Aix-Marseille Université5. Goles, E., Martínez, S.: Neural and Automata Networks: Dynamical Behavior andApplications. Springer (1990), https://doi.org/10.1007/978-94-009-0529-0
6. Hammack, R., Imrich, W., Klavžar, S.: Handbook of Product Graphs. DiscreteMathematics and Its Applications, CRC Press, second edn. (2011), https://doi.org/10.1201/b10959
7. Hebisch, U., Weinert, H.J.: Semirings: Algebraic Theory and Applications in Com-puter Science. World Scientific (1998), https://doi.org/10.1142/3903
8. Perrot, K., Perrotin, P., Sené, S.: On boolean automata networks (de)composition.Fundamenta Informaticae (2020), https://pageperso.lis-lab.fr/sylvain.sene/files/publi_pres/pps20.pdf , accepted9. Porreca, A.E.: Composing behaviours in the semiring of dynamical systems (2020), https://doi.org/10.5281/zenodo.3934396 , invited talk at International Work-shop on Boolean Networks (IWBN 2020)10. Schaefer, T.J.: The complexity of satisfiability problems. In: STOC ’78: Proceedingsof the Tenth Annual ACM Symposium on Theory of Computing. pp. 216–226(1978), https://doi.org/10.1145/800133.804350
11. Sutner, K.: On the computational complexity of finite cellular automata. Journal ofComputer and System Sciences (1), 87–97 (1995),(1), 87–97 (1995),