Decidability in continuous-time dynamical systems Emmanuel Hainry LORIA – Nancy Université – UHP Équipe Carte NWC 09 Orléans 1/31 Introduction Problems Linear Dynamical Systems Conclusion Why study dynamical systems I Describe physical phenomena I Describe biological phenomena I Simulate computation models The natural questions on those systems are motivated by the applications: I Population extinction −→ the system reaches 0. I A cloud goes over a region −→ the trajectory intersects a region. I A program loops infinitely −→ the system is ultimately periodic. 2/31 Introduction Problems Linear Dynamical Systems Conclusion Discrete time dynamical systems Definition A discrete-time dynamical system is given by (X , f ) where X is a space, and f a function from X to X . Given a point xn , the successor is xn+1 = f (xn ). An initial point describes uniquely the whole trajectory. 3/31 Introduction Problems Linear Dynamical Systems Conclusion Example : second order linear recurrent sequence X = Z2 f : (x, y ) 7→ (x + y , x) A trajectory: (1, 1) → (2, 1) → (3, 2) → (5, 3) → (8, 5) → ... Can be represented by x 1 1 x 7→ y 1 0 y 4/31 Introduction Problems Linear Dynamical Systems Conclusion Example: Turing machine Given a one tape Turing machine with δ : N × {0, .., 9} → N × {0, .., 9} × {l, s, r } X = N × N × N (state, left and right parts of tape) 1 3 2 5? 0 1 is coded by a = 1325 et b = 10 f : (n, a, b) 7→ (n0 , a0 , b0 ) with ab coding for the tape, σ = a mod 10 ; δ(n, σ) = (n0 , σ 0 , τ ) a0 = a − σ + σ 0 ; b0 = b if τ = r a0 = a/10 ; b0 = 10 × b + σ 0 if τ = d b0 = b/10 ; a0 = 10 × (a − σ + σ 0 ) + (b mod 10) if τ = 5/31 Introduction Problems Linear Dynamical Systems Conclusion Continuous time dynamical systems Definition A continuous-time dynamical system is defined by (X , f ) where X is the configuration space (Rn ) and f : X → X . A trajectory of the system is a solution of the Cauchy problem: y 0 = f (y ) y (0) = y0 6/31 Introduction Problems Linear Dynamical Systems Conclusion Example : Piecewise Constant Derivative x0 7/31 Introduction Problems Linear Dynamical Systems Conclusion Example: n-body problem 8/31 Introduction Problems Linear Dynamical Systems Conclusion n-body problem Proposition The n-body problem (with Newton’s laws) can be written as a polynomial dynamical system (with n2 components) Theorem [Warren D. Smith] The n-body problem can “solve” the halting problem for Turing machines in constant time. I This is a polynomial dynamical system. I The collapsing of the n-body problem is undecidable. 9/31 Introduction Problems Linear Dynamical Systems Conclusion Example: Lorenz’ attractor 0 10(y − x) x y = 28x − y − xz z xy − 83 z 10/31 Introduction Problems Linear Dynamical Systems Conclusion General Purpose Analog Computer gpac [Shannon 41] consists in circuits interconnecting the following components: Computing exp with a GPAC R f g R a t0 a+ Rt t0 f (u)dg(u) t 1 0 exp y0 = y y (0) = 1 Computing cos with a GPAC g f λ λ + f +g −1 R t g f × y1 R y2 × y3 f ×g 11/31 Introduction Problems Linear Dynamical Systems Conclusion Features of the GPAC Theorem [Graça Costa 03] A scalar function f : R → R is generated by a GPAC iff it is a component of the solution of a system y 0 = p(t, y ), (1) where p is a vector of polynomials. I gpac is a polynomial dynamical system. 12/31 Introduction Problems Linear Dynamical Systems Conclusion Continuous time linear dynamical systems Definition A continuous-time linear dynamical system is described by a dimension n, a sqaure matrix A of size n2 with rationnal coefficients. X = Rn f : Y 7→ AY A trajectory from Y0 ∈ Qn is a solution of the Cauchy issued 0 Y = AY problem: . Id est Y (t) = exp(tA)Y0 . Y (0) = Y0 13/31 Introduction Problems Linear Dynamical Systems Conclusion Reachability Definition Given a dynamical system (X , f ), and two points A and B, does the trajectory issued from A reach B? I Safety problem. 14/31 Introduction Problems Linear Dynamical Systems Conclusion ω-limit set Definition Given a dynamical system with solution y , the ω-limit set is the set of A ∈ X such there (tn ) → +∞ such that lim y (tn ) = A. I Périodicity, divergence. 15/31 Introduction Problems Linear Dynamical Systems Conclusion Skolem-Pisot problem Definition Given a recurrent linear sequence, is it sometimes 0? This problem is equivalent to “given a matrix A ∈ Nn , does the dynamical system (Nn , Y 7→ AY ) reach a (0, , ..., ) point?” I Reachability of a hyperplane 16/31 Introduction Problems Linear Dynamical Systems Conclusion Undecidability Theorem Reachability is undecidable The halting problem can be written as a reachability question. 17/31 Introduction Problems Linear Dynamical Systems Conclusion Undecidability Proposition Reachability is undecidable in Polynomial DS. Hyperplane reachability is undecidable in Polynomial DS. Proof: From [Graça, Campagnolo, Buescu 2005], Turing machines can be simulated by continuous time polynomial dynamical systems. 18/31 Introduction Problems Linear Dynamical Systems Conclusion Simulating Turing machine with a continuous DS Dynamical System on R3 (state, left and right parts of the tape) f : N3 → N3 describing the Turing machine. Duplicate the state space to simulate the transition: 12 ∂y1 3 ∂t = λ(f (int(y2 )) − y1 ) θ(sin(2πt)) ∂y2 3 ∂t = λ(int(y1 ) − y2 ) θ(− sin(2πt)) y1 (x, 0) = x y2 (x, 0) = x 11 10 9 8 7 6 5 4 3 2 with θ Heaviside’s function. 1 0 0,5 1 1,5 2 2,5 3 3,5 4 19/31 Introduction Problems Linear Dynamical Systems Conclusion Decidability Proposition [Halava, Harju, Hirvensalo, Karhumäki 2005] For small dimensions (≤ 5), Skolem-Pisot’s problem is decidable. Proposition [Blondel, Portier 2003] Pisot’s problem is NP-hard. It is unknown whether it is decidable or not for dimension higher than 5. 20/31 Introduction Problems Linear Dynamical Systems Conclusion Facts in discrete DS For discrete time dynamical systems, ω-limit set reachability DS non computable undecidable polynomial DS non computable undecidable linear DS decidable hyperplane reach. undecidable undecidable Pisot : open 21/31 Introduction Problems Linear Dynamical Systems Conclusion Facts in continuous DS For continuous-time dynamical systems, ω-limit set Reachability DS non computable undecidable polynomial DS non computable undecidable deg.2 poly DS non computable undecidable linear DS computable decidable hyperplane reach. undecidable undecidable undecidable ? 22/31 Introduction Problems Linear Dynamical Systems Conclusion Reachability Theorem [Hai08a] Reachability is decidable in continuous-time linear dynamical systems. f : Rn → Rn X 7→ A · X with A ∈ Qn×n X0 initial point Y target 23/31 Introduction Problems Linear Dynamical Systems Conclusion Omega-limit set Theorem [Hai08b] The ω-limit set is computable for continuous-time linear dynamical systems. Theorem The ω-limit set for a continuous-time linear dynamical system is semi-algebraical. f : Rn → Rn X 7→ A · X with A ∈ Qn×n X0 : initial point Ω: ω-limit set 24/31 Introduction Problems Linear Dynamical Systems Conclusion Prerequisite Theorem [Baker] Given α ∈ C? , either α or exp(α) is transcendantal. Theorem [Gelfond-Schneider] Let α and β algebraic, if α ∈ / {0, 1} and β ∈ / Q, then αβ is transcendantal. Definition An algebraic number x is represented by its minimal polynomial χ, a and such that x is the only root of χ in B(a, ) Proposition +, −, ×, / are computable for algebraic numbers. Deciding whether an algebraic number is rational is decidable. 25/31 Introduction Problems Linear Dynamical Systems Conclusion Simple case If the matrix A is diagonal, everything is simple : the yi (t) are independent and yi (t) = exp(tλi )yi0 . If λi > 0, the ω-limit set is empty. Otherwise, the ω-limit set is a singleton {yi? } with yi? = 0 if yi0 = 0 ? yi = 0 if λi < 0 yi? = yi0 otherwise Reachability is also a disjonction of simple cases. 26/31 Introduction Problems Linear Dynamical Systems Conclusion General case In the general case, we transform the matrix to a form close to diagonal matrix: Jordan form D1 0 0 .. 0 D2 0 . A= . .. .. . 0 · · · 0 Dk λ 1 λ Di = . . . . . . 1 λ B I2 B a −b 1 or Di = et I2 = avec B = . . . . b a 0 . . I2 B a 0 1 27/31 Introduction Problems Linear Dynamical Systems Conclusion General case Then the difficult cases are those when different components follow circular trajectories. Using Baker’s and Gelfond’s theorem, it is possible to rule out many impossible cases. In the end, a few algebraic expression describe the ω-limit set. A few algebraic tests allow to answer the reachability question. See [Hai08a, Hai08b] 28/31 Introduction Problems Linear Dynamical Systems Conclusion Continuous Skolem-Pisot The continuous Skolem-Pisot problem (reachability of a hyperplane) is still open. Some cases can be reduced to the existence of a positive root to a polynomial (see [BDJB08]). But many cases are not yet shown as decidable or undecidable. 29/31 Introduction Problems Linear Dynamical Systems Conclusion Conclusion As for discrete DS, reachability is decidable for continuous-time linear Dynamical Systems but undecidable for polynomial DS. Also, the ω-limit set is computable for continuous linear DS. What about Skolem-Pisot? Reachability of a polyedron? 30/31 O. Bournez, M. L. Campagnolo, D. S. Graça, and E. Hainry. Polynomial differential equations compute all real computable functions on computable compact intervals. Journal of Complexity, 23(3):317–335, 2007. P. Bell, J.-C. Delvenne, R. Jungers, and V. D. Blondel. The continuous Skolem-Pisot problem: On the complexity of reachability for linear ordinary differential equations, 2008, http://arxiv.org/abs/0809.2189. D. S. Graça, M. L. Campagnolo, and J. Buescu. Robust simulations of Turing machines with analytic maps and flows. In CiE 2005, vol. 3526 of LNCS, 169–179. 2005. E. Hainry. Computing omega-limit sets in linear dynamical systems. In UC 2008, Vienna, vol. 5204 of LNCS, 83–95, 2008. E. Hainry. Reachability in linear dynamical systems. In CiE 2008, Athens, vol. 5028 of LNCS, 241–250, 2008.