a survey of program termination practical and theoretical
play

A Survey of Program Termination: Practical and Theoretical - PowerPoint PPT Presentation

A Survey of Program Termination: Practical and Theoretical Challenges Jo el Ouaknine Department of Computer Science, Oxford University VTSA 2014 Luxembourg, October 2014 Termination of Linear Programs x := a ; while u x 0 do x := M


  1. Fibonacci: A Closer Look u 0 = 0, u 1 = 1 u n +2 = u n +1 + u n The Fibonacci sequence has order 2 Its characteristic polynomial is p ( x ) = x 2 − x − 1 √ √ The characteristic roots are λ 1 = 1+ 5 and λ 2 = 1 − 5 2 2 No repeated roots ⇒ Fibonacci sequence is simple √ √ � n � n � � 1 1 + 5 − 1 1 − 5 = c 1 λ n 1 + c 2 λ n u n = √ √ 2 2 2 5 5

  2. Fibonacci: A Closer Look u 0 = 0, u 1 = 1 u n +2 = u n +1 + u n The Fibonacci sequence has order 2 Its characteristic polynomial is p ( x ) = x 2 − x − 1 √ √ The characteristic roots are λ 1 = 1+ 5 and λ 2 = 1 − 5 2 2 No repeated roots ⇒ Fibonacci sequence is simple √ √ � n � n � � 1 1 + 5 − 1 1 − 5 = c 1 λ n 1 + c 2 λ n u n = √ √ 2 2 2 5 5 � � 1 � n � 0 � 1 � = v T M n w u n = 1 0 1 0 1

  3. Fibonacci: A Closer Look u 0 = 0, u 1 = 1 u n +2 = u n +1 + u n The Fibonacci sequence has order 2 Its characteristic polynomial is p ( x ) = x 2 − x − 1 √ √ The characteristic roots are λ 1 = 1+ 5 and λ 2 = 1 − 5 2 2 No repeated roots ⇒ Fibonacci sequence is simple √ √ � n � n � � 1 1 + 5 − 1 1 − 5 = c 1 λ n 1 + c 2 λ n u n = √ √ 2 2 2 5 5 � � 1 � n � 0 � 1 � = v T M n w u n = 1 0 1 0 1 Fibonacci has order 2 ⇐ ⇒ matrix M has dimension 2 × 2

  4. Fibonacci: A Closer Look u 0 = 0, u 1 = 1 u n +2 = u n +1 + u n The Fibonacci sequence has order 2 Its characteristic polynomial is p ( x ) = x 2 − x − 1 √ √ The characteristic roots are λ 1 = 1+ 5 and λ 2 = 1 − 5 2 2 No repeated roots ⇒ Fibonacci sequence is simple √ √ � n � n � � 1 1 + 5 − 1 1 − 5 = c 1 λ n 1 + c 2 λ n u n = √ √ 2 2 2 5 5 � � 1 � n � 0 � 1 � = v T M n w u n = 1 0 1 0 1 Fibonacci has order 2 ⇐ ⇒ matrix M has dimension 2 × 2 Fibonacci sequence is simple ⇐ ⇒ M is diagonalisable

  5. Linear Recurrence Sequences Numbers � u 0 , u 1 , u 2 , . . . � form a linear recurrence sequence if there exist k and constants a 1 , . . . , a k , such that ∀ n ≥ 0 , u n + k = a 1 u n + k − 1 + a 2 u n + k − 2 + . . . + a k u n

  6. Linear Recurrence Sequences Numbers � u 0 , u 1 , u 2 , . . . � form a linear recurrence sequence if there exist k and constants a 1 , . . . , a k , such that ∀ n ≥ 0 , u n + k = a 1 u n + k − 1 + a 2 u n + k − 2 + . . . + a k u n k is the order of the sequence

  7. Linear Recurrence Sequences Numbers � u 0 , u 1 , u 2 , . . . � form a linear recurrence sequence if there exist k and constants a 1 , . . . , a k , such that ∀ n ≥ 0 , u n + k = a 1 u n + k − 1 + a 2 u n + k − 2 + . . . + a k u n k is the order of the sequence Its characteristic polynomial is p ( x ) = x k − a 1 x k − 1 − a 2 x k − 2 − . . . − a k

  8. Linear Recurrence Sequences Numbers � u 0 , u 1 , u 2 , . . . � form a linear recurrence sequence if there exist k and constants a 1 , . . . , a k , such that ∀ n ≥ 0 , u n + k = a 1 u n + k − 1 + a 2 u n + k − 2 + . . . + a k u n k is the order of the sequence Its characteristic polynomial is p ( x ) = x k − a 1 x k − 1 − a 2 x k − 2 − . . . − a k The linear recurrence sequence is simple if its characteristic polynomial has no repeated roots

  9. Linear Recurrence Sequences Numbers � u 0 , u 1 , u 2 , . . . � form a linear recurrence sequence if there exist k and constants a 1 , . . . , a k , such that ∀ n ≥ 0 , u n + k = a 1 u n + k − 1 + a 2 u n + k − 2 + . . . + a k u n k is the order of the sequence Its characteristic polynomial is p ( x ) = x k − a 1 x k − 1 − a 2 x k − 2 − . . . − a k The linear recurrence sequence is simple if its characteristic polynomial has no repeated roots Let λ 1 , λ 2 , . . . , λ m ∈ C be the characteristic roots. There exist polynomials p 1 ( x ) , p 2 ( x ) , . . . , p m ( x ) ∈ C [ x ] such that u n = p 1 ( n ) λ n 1 + p 2 ( n ) λ n 2 + . . . + p m ( n ) λ n m In general λ 1 , . . . , λ k and all coefficients of p 1 ( x ) , . . . , p m ( x ) are algebraic numbers

  10. Linear Recurrence Sequences Numbers � u 0 , u 1 , u 2 , . . . � form a linear recurrence sequence if there exist k and constants a 1 , . . . , a k , such that ∀ n ≥ 0 , u n + k = a 1 u n + k − 1 + a 2 u n + k − 2 + . . . + a k u n k is the order of the sequence Its characteristic polynomial is p ( x ) = x k − a 1 x k − 1 − a 2 x k − 2 − . . . − a k The linear recurrence sequence is simple if its characteristic polynomial has no repeated roots Let λ 1 , λ 2 , . . . , λ m ∈ C be the characteristic roots. There exist polynomials p 1 ( x ) , p 2 ( x ) , . . . , p m ( x ) ∈ C [ x ] such that u n = p 1 ( n ) λ n 1 + p 2 ( n ) λ n 2 + . . . + p m ( n ) λ n m In general λ 1 , . . . , λ k and all coefficients of p 1 ( x ) , . . . , p m ( x ) are algebraic numbers If the linear recurrence sequence is simple then the polynomials p 1 ( x ) , . . . , p m ( x ) are all constant

  11. Decision Problems for Linear Recurrence Sequences Let � u n � be a linear recurrence sequence Skolem Problem Does ∃ n such that u n = 0 ?

  12. Decision Problems for Linear Recurrence Sequences Let � u n � be a linear recurrence sequence Skolem Problem Does ∃ n such that u n = 0 ? Positivity Problem Is it the case that ∀ n , u n ≥ 0 ?

  13. Decision Problems for Linear Recurrence Sequences Let � u n � be a linear recurrence sequence Skolem Problem Does ∃ n such that u n = 0 ? Positivity Problem Is it the case that ∀ n , u n ≥ 0 ? Ultimate Positivity Problem Does ∃ T such that, ∀ n ≥ T , u n ≥ 0 ?

  14. Related Work and Applications Theoretical biology Analysis of L-systems Population dynamics Software verification Termination of linear programs Probabilistic model checking Reachability, invariance, and approximation in Markov chains Stochastic logics Quantum computing Threshold problems for quantum automata Economics Combinatorics Discrete linear dynamical systems Statistical physics . . .

  15. The Skolem Problem Skolem Problem Does ∃ n such that u n = 0 ? Open for about 80 years!

  16. The Skolem Problem Skolem Problem Does ∃ n such that u n = 0 ? Open for about 80 years! “It is faintly outrageous that this problem is still open; it is saying that we do not know how to decide the Halting Problem even for ‘linear’ automata!” Terence Tao

  17. The Skolem Problem Skolem Problem Does ∃ n such that u n = 0 ? Open for about 80 years! “It is faintly outrageous that this problem is still open; it is saying that we do not know how to decide the Halting Problem even for ‘linear’ automata!” Terence Tao “. . . a mathematical embarrassment . . . ” Richard Lipton

  18. The Skolem-Mahler-Lech Theorem Theorem (Skolem 1934; Mahler 1935, 1956; Lech 1953) The set of zeros of a linear recurrence sequence is semilinear: { n : u n = 0 } = F ∪ A 1 ∪ . . . ∪ A ℓ where F is finite and each A i is a full arithmetic progression.

  19. The Skolem-Mahler-Lech Theorem Theorem (Skolem 1934; Mahler 1935, 1956; Lech 1953) The set of zeros of a linear recurrence sequence is semilinear: { n : u n = 0 } = F ∪ A 1 ∪ . . . ∪ A ℓ where F is finite and each A i is a full arithmetic progression. All known proofs make essential use of p -adic techniques

  20. The Skolem-Mahler-Lech Theorem Theorem (Skolem 1934; Mahler 1935, 1956; Lech 1953) The set of zeros of a linear recurrence sequence is semilinear: { n : u n = 0 } = F ∪ A 1 ∪ . . . ∪ A ℓ where F is finite and each A i is a full arithmetic progression. All known proofs make essential use of p -adic techniques Theorem (Berstel and Mignotte 1976) In Skolem-Mahler-Lech, the infinite part (arithmetic progressions A 1 , . . . , A ℓ ) is fully constructive.

  21. The Skolem Problem at Low Orders Skolem Problem Does ∃ n such that u n = 0 ? Let u n be a linear recurrence sequence of fixed order

  22. The Skolem Problem at Low Orders Skolem Problem Does ∃ n such that u n = 0 ? Let u n be a linear recurrence sequence of fixed order Theorem (folklore) For orders 1 and 2, Skolem is decidable.

  23. The Skolem Problem at Low Orders Skolem Problem Does ∃ n such that u n = 0 ? Let u n be a linear recurrence sequence of fixed order Theorem (folklore) For orders 1 and 2, Skolem is decidable. Theorem (Mignotte, Shorey, Tijdeman 1984; Vereshchagin 1985) For orders 3 and 4, Skolem is decidable.

  24. The Skolem Problem at Low Orders Skolem Problem Does ∃ n such that u n = 0 ? Let u n be a linear recurrence sequence of fixed order Theorem (folklore) For orders 1 and 2, Skolem is decidable. Theorem (Mignotte, Shorey, Tijdeman 1984; Vereshchagin 1985) For orders 3 and 4, Skolem is decidable. Critical ingredient is Baker’s theorem for linear forms in logarithms, which earned Baker the Fields Medal in 1970.

  25. The Skolem Problem at Low Orders Skolem Problem Does ∃ n such that u n = 0 ? Let u n be a linear recurrence sequence of fixed order Theorem (folklore) For orders 1 and 2, Skolem is decidable. Theorem (Mignotte, Shorey, Tijdeman 1984; Vereshchagin 1985) For orders 3 and 4, Skolem is decidable. Decidability for order 5 was announced in 2005 by four Finnish mathematicians in a technical report (as yet unpublished). Their proof appears to have a serious gap.

  26. The Positivity and Ultimate Positivity Problems Positivity and Ultimate Positivity open since at least 1970s “In our estimation, these will be very difficult problems.” Matti Soittola

  27. The Positivity and Ultimate Positivity Problems Positivity and Ultimate Positivity open since at least 1970s “In our estimation, these will be very difficult problems.” Matti Soittola Theorem (folklore) Decidability of Positivity ⇒ decidability of Skolem.

  28. The Positivity and Ultimate Positivity Problems Theorem (Burke, Webb 1981) For order 2, Ultimate Positivity is decidable.

  29. The Positivity and Ultimate Positivity Problems Theorem (Burke, Webb 1981) For order 2, Ultimate Positivity is decidable. Theorem (Nagasaka, Shiue 1990) For order 3 with repeated roots, Ultimate Positivity is decidable.

  30. The Positivity and Ultimate Positivity Problems Theorem (Burke, Webb 1981) For order 2, Ultimate Positivity is decidable. Theorem (Nagasaka, Shiue 1990) For order 3 with repeated roots, Ultimate Positivity is decidable. Theorem (Halava, Harju, Hirvensalo 2006) For order 2, Positivity is decidable.

  31. The Positivity and Ultimate Positivity Problems Theorem (Burke, Webb 1981) For order 2, Ultimate Positivity is decidable. Theorem (Nagasaka, Shiue 1990) For order 3 with repeated roots, Ultimate Positivity is decidable. Theorem (Halava, Harju, Hirvensalo 2006) For order 2, Positivity is decidable. Theorem (Laohakosol and Tangsupphathawat 2009) For order 3, Positivity and Ultimate Positivity are decidable.

  32. The Positivity and Ultimate Positivity Problems Theorem (Burke, Webb 1981) For order 2, Ultimate Positivity is decidable. Theorem (Nagasaka, Shiue 1990) For order 3 with repeated roots, Ultimate Positivity is decidable. Theorem (Halava, Harju, Hirvensalo 2006) For order 2, Positivity is decidable. Theorem (Laohakosol and Tangsupphathawat 2009) For order 3, Positivity and Ultimate Positivity are decidable. In Colloquium Mathematicum 128:1 (2012), Tangsupphathawat, Punnim, and Laohakosol claimed decidability of Positivity and Ultimate Positivity for order 4 (and noted being stuck for order 5). Unfortunately, their proof contains a major error.

  33. Some Recent Results (I) Theorem Positivity is decidable for order 5 or less.

  34. Some Recent Results (I) Theorem Positivity is decidable for order 5 or less. The complexity is in coNP PP PPPP ( ⊆ PSPACE) .

  35. Some Recent Results (I) Theorem Positivity is decidable for order 5 or less. The complexity is in coNP PP PPPP ( ⊆ PSPACE) . Theorem Ultimate Positivity is decidable for order 5 or less. The complexity is in P.

  36. Some Recent Results (I) Theorem Positivity is decidable for order 5 or less. The complexity is in coNP PP PPPP ( ⊆ PSPACE) . Theorem Ultimate Positivity is decidable for order 5 or less. The complexity is in P. Theorem At order 6, for both Positivity and Ultimate Positivity, proof of decidability would entail major breakthroughs in analytic number theory (Diophantine approximation of transcendental numbers).

  37. Some Recent Results (II) Theorem For simple linear recurrence sequences of order 9 or less, Positivity is decidable. The complexity is in coNP PP PPPP ( ⊆ PSPACE) .

  38. Some Recent Results (II) Theorem For simple linear recurrence sequences of order 9 or less, Positivity is decidable. The complexity is in coNP PP PPPP ( ⊆ PSPACE) . We don’t know what happens at order 10. But:

  39. Some Recent Results (II) Theorem For simple linear recurrence sequences of order 9 or less, Positivity is decidable. The complexity is in coNP PP PPPP ( ⊆ PSPACE) . We don’t know what happens at order 10. But: Proposition Decidability of Positivity for simple linear recurrence sequences of order 14 ⇒ decidability of general Skolem Problem at order 5.

  40. Some Recent Results (II) Theorem For simple linear recurrence sequences of order 9 or less, Positivity is decidable. The complexity is in coNP PP PPPP ( ⊆ PSPACE) . We don’t know what happens at order 10. But: Proposition Decidability of Positivity for simple linear recurrence sequences of order 14 ⇒ decidability of general Skolem Problem at order 5. Theorem For simple linear recurrence sequences, Ultimate Positivity is decidable for all orders.

  41. Some Recent Results (II) Theorem For simple linear recurrence sequences of order 9 or less, Positivity is decidable. The complexity is in coNP PP PPPP ( ⊆ PSPACE) . We don’t know what happens at order 10. But: Proposition Decidability of Positivity for simple linear recurrence sequences of order 14 ⇒ decidability of general Skolem Problem at order 5. Theorem For simple linear recurrence sequences, Ultimate Positivity is decidable for all orders. For each fixed order k, complexity is in P (but depends on k).

  42. Some Recent Results (II) Theorem For simple linear recurrence sequences of order 9 or less, Positivity is decidable. The complexity is in coNP PP PPPP ( ⊆ PSPACE) . We don’t know what happens at order 10. But: Proposition Decidability of Positivity for simple linear recurrence sequences of order 14 ⇒ decidability of general Skolem Problem at order 5. Theorem For simple linear recurrence sequences, Ultimate Positivity is decidable for all orders. For each fixed order k, complexity is in P (but depends on k). In the general case, complexity is in PSPACE and co ∃ R -hard.

  43. Known Unknowns “There are things that we know we don’t know. . . ” Donald Rumsfeld

  44. Diophantine Approximation How well can one approximate a real number x with rationals? � � � x − p � � � � q �

  45. Diophantine Approximation How well can one approximate a real number x with rationals? � � � x − p � � � � q � Theorem (Dirichlet 1842) � � � x − p � < 1 � � There are infinitely many integers p, q such that q 2 . � � q

  46. Diophantine Approximation How well can one approximate a real number x with rationals? � � � x − p � � � � q � Theorem (Dirichlet 1842) � � � x − p � < 1 � � There are infinitely many integers p, q such that q 2 . � � q Theorem (Hurwitz 1891) � x − p � � 1 � � There are infinitely many integers p, q such that � < √ 5 q 2 . � � q

  47. Diophantine Approximation How well can one approximate a real number x with rationals? � � � x − p � � � � q � Theorem (Dirichlet 1842) � � � x − p � < 1 � � There are infinitely many integers p, q such that q 2 . � � q Theorem (Hurwitz 1891) � x − p � � 1 � � There are infinitely many integers p, q such that � < √ 5 q 2 . � � q 1 Moreover, 5 is the best possible constant that will work for all √ real numbers x.

  48. Diophantine Approximation Definition Let x ∈ R . The Lagrange constant L ∞ ( x ) is: � � � � x − p � < c � � � L ∞ ( x ) = inf c : q 2 has infinitely many solutions . � � q

  49. Diophantine Approximation Definition Let x ∈ R . The Lagrange constant L ∞ ( x ) is: � � � � x − p � < c � � � L ∞ ( x ) = inf c : q 2 has infinitely many solutions . � � q L ∞ ( x ) is closely related to the continued fraction expansion of x

  50. Diophantine Approximation Definition Let x ∈ R . The Lagrange constant L ∞ ( x ) is: � � � � x − p � < c � � � L ∞ ( x ) = inf c : q 2 has infinitely many solutions . � � q L ∞ ( x ) is closely related to the continued fraction expansion of x Almost all reals x have L ∞ ( x ) = 0 [Khinchin 1926]

  51. Diophantine Approximation Definition Let x ∈ R . The Lagrange constant L ∞ ( x ) is: � � � � x − p � < c � � � L ∞ ( x ) = inf c : q 2 has infinitely many solutions . � � q L ∞ ( x ) is closely related to the continued fraction expansion of x Almost all reals x have L ∞ ( x ) = 0 [Khinchin 1926] However if x is a real algebraic number of degree 2, L ∞ ( x ) � = 0 [Euler, Lagrange]

  52. Diophantine Approximation Definition Let x ∈ R . The Lagrange constant L ∞ ( x ) is: � � � � x − p � < c � � � L ∞ ( x ) = inf c : q 2 has infinitely many solutions . � � q L ∞ ( x ) is closely related to the continued fraction expansion of x Almost all reals x have L ∞ ( x ) = 0 [Khinchin 1926] However if x is a real algebraic number of degree 2, L ∞ ( x ) � = 0 [Euler, Lagrange] All transcendental numbers x have 0 ≤ L ∞ ( x ) ≤ 1 / 3 [Markov 1879]

  53. Diophantine Approximation Definition Let x ∈ R . The Lagrange constant L ∞ ( x ) is: � � � � x − p � < c � � � L ∞ ( x ) = inf c : q 2 has infinitely many solutions . � � q L ∞ ( x ) is closely related to the continued fraction expansion of x Almost all reals x have L ∞ ( x ) = 0 [Khinchin 1926] However if x is a real algebraic number of degree 2, L ∞ ( x ) � = 0 [Euler, Lagrange] All transcendental numbers x have 0 ≤ L ∞ ( x ) ≤ 1 / 3 [Markov 1879] Almost nothing else is known about any specific irrational number!

  54. Hardness Let T = { θ ∈ (0 , 1) : e 2 π i θ ∈ Q ( i ) } \ { 1 4 , 1 2 , 3 4 }

  55. Hardness Let T = { θ ∈ (0 , 1) : e 2 π i θ ∈ Q ( i ) } \ { 1 4 , 1 2 , 3 4 } π i θ e 2 a+bi = 2 πθ

  56. Hardness Let T = { θ ∈ (0 , 1) : e 2 π i θ ∈ Q ( i ) } \ { 1 4 , 1 2 , 3 4 } π i θ e 2 a+bi = 2 πθ T is a countable set of transcendental numbers

  57. Hardness Let T = { θ ∈ (0 , 1) : e 2 π i θ ∈ Q ( i ) } \ { 1 4 , 1 2 , 3 4 } π i θ e 2 a+bi = 2 πθ T is a countable set of transcendental numbers Theorem Suppose that Ultimate Positivity is decidable for integer linear recurrence sequences of order 6. Then for any θ ∈ T , L ∞ ( θ ) is computable.

  58. Positivity of Simple LRS: Algorithm Sketch Theorem For simple linear recurrence sequences: Ultimate Positivity is decidable for all orders. Positivity is decidable for orders 9 or less.

  59. Positivity of Simple LRS: Algorithm Sketch Theorem For simple linear recurrence sequences: Ultimate Positivity is decidable for all orders. Positivity is decidable for orders 9 or less. Input: a simple linear recurrence sequence � u n � ∞ n =0 of order ≤ 9

  60. Positivity of Simple LRS: Algorithm Sketch Theorem For simple linear recurrence sequences: Ultimate Positivity is decidable for all orders. Positivity is decidable for orders 9 or less. Input: a simple linear recurrence sequence � u n � ∞ n =0 of order ≤ 9 1 Decide if � u n � ∞ n =0 is ultimately positive. If it isn’t, � u n � ∞ n =0 is not positive. Otherwise:

  61. Positivity of Simple LRS: Algorithm Sketch Theorem For simple linear recurrence sequences: Ultimate Positivity is decidable for all orders. Positivity is decidable for orders 9 or less. Input: a simple linear recurrence sequence � u n � ∞ n =0 of order ≤ 9 1 Decide if � u n � ∞ n =0 is ultimately positive. If it isn’t, � u n � ∞ n =0 is not positive. Otherwise: 2 Compute a threshold T such that � u n � ∞ n = T is positive.

  62. Positivity of Simple LRS: Algorithm Sketch Theorem For simple linear recurrence sequences: Ultimate Positivity is decidable for all orders. Positivity is decidable for orders 9 or less. Input: a simple linear recurrence sequence � u n � ∞ n =0 of order ≤ 9 1 Decide if � u n � ∞ n =0 is ultimately positive. If it isn’t, � u n � ∞ n =0 is not positive. Otherwise: 2 Compute a threshold T such that � u n � ∞ n = T is positive. 3 Check individually whether u 0 ≥ 0, u 1 ≥ 0, . . . , u T − 1 ≥ 0.

  63. Lower Bounds in Diophantine Approximation Theorem (Dirichlet 1842) � � x − p � � < 1 � � There are infinitely many integers p, q such that q 2 . � � q

  64. Lower Bounds in Diophantine Approximation Theorem (Dirichlet 1842) � � x − p � � < 1 � � There are infinitely many integers p, q such that q 2 . � � q Theorem (Roth 1955) Let x ∈ R be algebraic. Then for any ε > 0 there are finitely many integers p, q such that � � � x − p 1 � � � < q 2+ ε . � � q

  65. Lower Bounds in Diophantine Approximation Theorem (Dirichlet 1842) � � x − p � � < 1 � � There are infinitely many integers p, q such that q 2 . � � q Theorem (Roth 1955) Let x ∈ R be algebraic. Then for any ε > 0 there are finitely many integers p, q such that � � � x − p 1 � � � < q 2+ ε . � � q Non-effective!

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend