Robust computation with dynamical systems Olivier Bournez 1 Daniel S. Graça 2 Emmanuel Hainry 3 1 École Polytechnique, LIX, Palaiseau, France 2 DM/FCT, Universidade do Algarve, Faro & SQIG/Instituto de Telecomunicações, Lisbon, Portugal 3 LORIA & Université de Lorraine, Nancy, France Dynamical Systems and Computability Lyon, December 17 2013 O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 1/34
Introduction Dynamical Systems consist of a configuration space, a dynamics function: maps a configuration to the following. Definition Interests: Describing physical phenomena e.g. Fluid dynamics, Gravitation, Weather... Describing biological phenomena e.g. Population dynamics, Epidemiologics... Simulating computation models Simulating a Turing machine O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 2/34
Questions on Dynamical Systems Reachability of a configuration e.g. Halting of a Turing machine. Verification of safety properties e.g. The population does not go extinct. Unfortunately, Those problems are undecidable (even for very restricted classes such as polynomial systems or PCD systems). But decidable for real systems What real systems have: Robustness to noise? Robustness to perturbations? O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 3/34
Piecewise Constant Derivative x 0 Space: R n Partitioned in a finite number of polyhedra Dynamics: Constant in each polyhedron. Theorem [Asarin Maler Pnueli, 1995] If n 3, Reachability is undecidable. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 4/34
Robustness Asarin and Bouajjani studied robustness to infinitesimal perturbations in the context of Piecewise Constant Derivative systems. Theorem [Robust decidable] If a PCD is robust, then the language it recognizes is decidable. Theorem [Perturbed reachability is complete in Π 1 0] Given a Turing machine M, one can design a PCD whose perturbed recognized language is Σ L(M) Theorem [Decidable robust] Given a Turing machine M, one can design a robust PCD that recognizes L(M) O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 5/34
Goal PCD is not satisfactory Physically: not C 1 Mathematically: very restricted class Analog computation: Shannon s General Purpose Analog Computer Similar results on smooth computable systems O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 6/34
Dynamical systems Definition [Discrete time dynamical systems] H = (X, f ) with X R d and f : X X defines a discrete dynamical system. A trajectory is a sequence {x 0, x 1,..., } X N s.t. n, x n+1 = f (x n ). Definition [Continuous time dynamical systems] H = (X, f ) with X R d and f : X X defines a continuous dynamical system. { x = f (x) A trajectory is a solution of x(0) = x 0 O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 7/34
Dynamical Systems We will study 2 kinds of domains: Bounded domain: X = [ 1, 1] d Unbounded domain: X = R d O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 8/34
Smooth dynamical systems Definition [Lipschitz] f : R m R k is Lipschitz over X iff K > 0; x, y X, f (x) f (y) K x y. Definition [Smooth dynamical system] A continuous-time dynamical system H = (X, f ) is smooth if f is Lipschitz. { x = f (t, x) Note If f is Lipschitz, x(t 0 ) = x 0 has a unique solution. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 9/34
Dynamical Systems as language recognizers Let Σ = {0, 1} and Σ the set of words over Σ. Definition [Encoding words in R] ν : Σ R n ν(w) = 2 i w i i=0 where w = w 0 w 1 w 2...w n with w 1, w 2,..., w n Σ. Definition [Encoding words in 1, 1] ν c : Σ [ 1, 1] ν c (w) = 2 π arctan(ν(w)) O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 10/34
Dynamical Systems as language recognizers Definition Given a dynamical system H = (X, f ) and a set V accept X. L H = {w Σ ; T H (σ(w)) V accept } O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 11/34
Perturbations and robustness Definition [ε-perturbation] Let H = (X, f ) a dynamical system. Given ε > 0, H ε is the system defined over the same space X, where: 1. (x 0, x 1,...) is a trajectory 1 of H ε if x i+1 f (x i ) ε for all i N; 2. φ : R + 0 X is a trajectory1 of H ε if φ (t) f (φ(t)) ε for all t R + 0. Note H ε is not a dynamical system. 1 The trajectory may not be unique. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 12/34
Perturbations and robustness Definition [Perturbed system as language recognizers] L ε, language recognized by H ε, is defined by: w L ε iff trajectory from σ(w) reaching V accept. Lemma For 0 < ε < ε, L L ε L ε. Definition L ω = ε>0 L ε. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 13/34
Perturbations and robustness Intuitively, a system is said robust if infinitesimal perturbations do not change the recognized language. Definition [Robustness] A dynamical system H is said robust iff L = L ω O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 14/34
Accepted language For a Dynamical System to be a reliable language accepter, it should have disjoint open computable sets V accept and V compute s.t. V accept, V compute are separated. Trajectories escaping V compute will reach V accept and stay in V accept w, σ(w) V compute O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 15/34
Definition Computable sets E R d is r.e. open set iff there exist computable sequences of rationals (a n ) and (r n ) s.t. E = B(a n, r n ) n=0 with B(a, r) open ball of center a and radius r. F is r.e. closed if a family of rational tuples {c n } that is dense in F. E is an open computable set iff it is r.e. open and its complement is r.e. closed. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 16/34
DS as language accepters Definition H over X = [ 1, 1] d. V accept = {x X ; x < 1/4} V compute = {x X ; x > 1/2} H accepts L Σ if w L iff the trajectory from (ν(w), 1,..., 1, 1) reaches V accept. If w / L, the trajectory must never leave V compute. V compute V accept The zones V compute and V accept. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 17/34
DS as language accepters Definition H over X = [ 1, 1] d. V accept = {x X ; x < 1/4} V compute = {x X ; x > 1/2} H accepts L Σ if w L iff the trajectory from (ν(w), 1,..., 1, 1) reaches V accept. If w / L, the trajectory must never leave V compute. V compute V accept An accepted trajectory goes into V accept. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 17/34
DS as language accepters Definition H over X = [ 1, 1] d. V accept = {x X ; x < 1/4} V compute = {x X ; x > 1/2} H accepts L Σ if w L iff the trajectory from (ν(w), 1,..., 1, 1) reaches V accept. If w / L, the trajectory must never leave V compute. V compute V accept A refused trajectory never enters B(1/2). O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 17/34
DS as language accepters Definition H over X = [ 1, 1] d. V accept = {x X ; x < 1/4} V compute = {x X ; x > 1/2} H accepts L Σ if w L iff the trajectory from (ν(w), 1,..., 1, 1) reaches V accept. If w / L, the trajectory must never leave V compute. V compute V accept A forbidden trajectory. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 17/34
Discrete compact result Theorem [L ω is co-r.e. for Lipschitz computable discrete systems] Let L language recognized by H = ([ 1, 1] d, f ) with f computable and Lipschitz. L ω is co-recursively enumerable. Proof Partition X in d-dimensional hypercubes of size 1/n. Design a finite automaton A n which will roughly recognize (s.t. rejection implies w / L 1/n ). L 1 n Simulate A n with n growing until we know that w is rejected. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 18/34
L ω is co-r.e. for Lipschitz computable discrete systems Design of A n States V 1,..., V s hypercubes of size 1/n. ccepting V i s that intersect V accept. ransition V j V k if {x X ; f (x) f (x j ) K+2 n } V k. L 1/n L An L K+3 n L An = L ω. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 19/34
Continuous compact result Definition [Stroboscopic map] H = (X, f ) a continuous-time dynamical system. The stroboscopic map g : X X is defined by: g(x) = φ(1) where φ(0) = x and φ (t) = f (φ(t)). Lemma Let H = (X, f ) a continuous-time dynamical system. Ĥ = (X, g) discrete-time stroboscopic version. L = L L ω = L ω and ε > 0, L ε = L ε. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 20/34
Continuous compact result Theorem [L ω is co-r.e. for Lipschitz computable continuous systems] Let L language recognized by H = ([ 1, 1] d, f ) with f computable and Lipschitz. L ω is co-recursively enumerable. Proof The stroboscopic map g is Lipschitz and computable. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 21/34
Robust Recursive Lemma H = ([ 1, 1] d, f ) smooth system (f Lipschitz and computable). L is recursively enumerable. Theorem [Robust Recursive] H = ([ 1, 1] d, f ) smooth system (f Lipschitz and computable). If H is robust, then L is recursive. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 22/34
Unbounded case The automaton construction does not work in the unbounded case. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 23/34
Unbounded case The automaton construction does not work in the unbounded case. Theorem [Collins] The compactness condition is necessary. (this is a free translation of Theorem 4.9 from Collins, Pieter. Continuity and computability of reachable sets. Theoretical Computer Science 341, no. 1 (2005): 162-195.) O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 23/34
Unbounded case The automaton construction does not work in the unbounded case. Theorem [Collins] The compactness condition is necessary. (this is a free translation of Theorem 4.9 from Collins, Pieter. Continuity and computability of reachable sets. Theoretical Computer Science 341, no. 1 (2005): 162-195.) However, our reject condition can be improved. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 23/34
Intuition: Robust language decision V reject Sandwich model: 3 separated zones: V c, V a and V r. V r and V a are sinks. V compute V accept O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 24/34
Intuition: Robust language decision V reject Sandwich model: 3 separated zones: V c, V a and V r. V r and V a are sinks. V compute V accept O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 24/34
Intuition: Robust language decision V reject Sandwich model: 3 separated zones: V c, V a and V r. V r and V a are sinks. V compute V accept O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 24/34
Intuition: Robust language decision V reject Sandwich model: 3 separated zones: V c, V a and V r. V r and V a are sinks. V compute V accept O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 24/34
Intuition: Robust language decision V reject Sandwich model: 3 separated zones: V c, V a and V r. V r and V a are sinks. V compute V accept O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 24/34
Language Recognizer For a Dynamical System to be a reliable language recognizer, it should have disjoint open computable sets V accept, V reject and V compute s.t. V accept, V reject and V compute are separated. open set A such that V accept V compute A and A V reject = open set R such that V reject V compute R and A V accept = All correct trajectories will escape V compute and reach V accept or V reject and stay there. w, σ(w) V compute O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 25/34
Unbounded Result Both in the discrete and continous case, we have: Theorem [L ω is co-r.e.] Let L language robustly recognized by H = (R d, f ) with f computable and effectively locally Lipschitz. L is recursive O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 26/34
Recursive Robust If a language is recursive, we can implement a dynamical system recognizing robustly (with a Lipschitz dynamic). Here, the easy case is the unbounded one: Theorem Given a Turing machine M, there exist a (discrete/continous) dynamical system over R d that recognizes L which is robust to 1 4 perturbation. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 27/34
Recursive Robust If a language is recursive, we can implement a dynamical system recognizing robustly (with a Lipschitz dynamic). Here, the easy case is the unbounded one: Theorem [Graça Campagnolo Buescu] Given a Turing machine M, there exist a continuous-time dynamical system over R 6 that recognizes L which is robust to 1 4 perturbation. And the dynamics is effectively locally Lipschitz O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 27/34
Recursive Robust (bounded case) The previous simulation uses 6 components: 2 for the left part of the Turing tape, 2 for the right part of the Turing tape, 2 for the state. States being finite, robustly compacting their space is easy. For the other components, compose through 2 π arctan. Problem Lipschitz? Problem Robust? O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 28/34
Recursive Robust (bounded case) Theorem Let A be a recursive language. There is an analytic and computable continuous-time system over ( 1, 1) 6 that robustly recognizes A. Since all computation halt, there is an ɛ under which the perturbations do not alter the result. It is Lipschitz on the state space. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 29/34
Conclusion The intuition robustness implies computability is indeed true for this kind of systems. Robustness is not too strong an hypothesis ( computability implies robustness ). A good candidate for modelizing real systems? O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 30/34
Recursive analysis Idea Reals are represented by Cauchy sequences of rationals. An infinite tape can contain a real. A Turing machine manipulates those tapes. O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 31/34
Recursive analysis Definition [Representation of real numbers] x R can be represented by a sequence (x n ) s.t. n, x n x < 2 n. This is denoted (x n ) x. Definition [Computable functions] A function f : R R is computable iff there exists an oracle Turing machine M s.t. (x n ) x, M taking (x n ) as oracle computes (y n ) f (x). Return O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 32/34
Example: Linear recurrent sequence X = Z 2 f : (x, y) (x + y, x) A trajectory: (1, 1) (2, 1) (3, 2) (5, 3) (8, 5)... This system can also be written ( ) ( ) ( ) x 1 1 x y 1 0 y O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 33/34
Example: Turing machine Let M be a one-tape Turing machine δ : N {0,.., 9} N {0,.., 9} {g, r, d} X = N N N (state, left and right part of the tape) 1 3 2 5 0 1 is represented by a = 1325 and b = 10 f : (n, a, b) (n, a, b ) with ab representing the tape σ = a mod 10 ; δ(n, σ) = (n, σ, τ) a = a σ + σ ; b = b if τ = r a = a/10 ; b = 10 b + σ if τ = d b = b/10 ; a = 10 (a σ + σ ) + (b mod 10) if τ = Return O. Bournez, D. S. Graça, E. Hainry Robust computation with dynamical systems 34/34