presburger arithmetic reversal bounded counter machines
play

Presburger Arithmetic Reversal-Bounded Counter Machines St ephane - PowerPoint PPT Presentation

Presburger Arithmetic Reversal-Bounded Counter Machines St ephane Demri (demri@lsv.fr) October 16th, 2015 Slides and lecture notes http://www.lsv.fr/demri/notes-de-cours.html https://wikimpri.dptinfo.ens-cachan.fr/doku.


  1. Presburger Arithmetic Reversal-Bounded Counter Machines St´ ephane Demri (demri@lsv.fr) October 16th, 2015

  2. Slides and lecture notes http://www.lsv.fr/˜demri/notes-de-cours.html https://wikimpri.dptinfo.ens-cachan.fr/doku. php?id=cours:c-2-9-1

  3. Plan of the lecture ◮ Previous lecture : ◮ Introduction to Presburger arithmetic. ◮ Decidability and quantifier elimination. ◮ Automata-based approach. ◮ Presburger sets are the semilinear sets. ◮ Application: Parikh image of regular languages. ◮ Introduction to reversal-bounded counter machines. ◮ Runs in normal form.

  4. The previous lecture in 2 slides (1/2) ◮ First-order theory FO ( N ) on � N , ≤ , + � : ϕ ::= ⊤ | ⊥ | t ≤ t ′ | ¬ ϕ | ϕ ∧ ϕ | ϕ ∨ ϕ | ∃ x ϕ | ∀ x ϕ ◮ Presburger sets = {� v ( x 1 ) , . . . , v ( x n ) � ∈ N n : v | def � ϕ ( x 1 , . . . , x n ) � = ϕ } ◮ Quantifier-free fragment ⊤ | ⊥ | t ≤ t ′ | t ≡ k t ′ | t = t ′ | t < t ′ | t ≥ t ′ | t > t ′ ◮ The satisfiability problem for the quantifier-free fragment is NP-complete.

  5. Previous lecture in 2 slides (2/2) ◮ For every ϕ , there is a quantifier-free formula ϕ ′ such that 1. free ( ϕ ′ ) ⊆ free ( ϕ ) . 2. ϕ ′ is logically equivalent to ϕ . 3. ϕ ′ can be effectively built from ϕ . ◮ Presburger arithmetic is decidable. ◮ Alternative proof with the automata-based approach: “Presburger sets as regular languages of finite words”

  6. Semilinear Sets

  7. Formulae with one free variable def ϕ ( x ) = ( x � = 1 ∧ x � = 2 ) ∧ ( x = 0 ∨ ( x ≥ 3 ∧ ∃ y ( x = 3 + 2y ))) � ϕ ( x ) � = { 0 } ∪ { 3 + 2 n : n ≥ 0 } ◮ After the value 3, every two value belongs to � ϕ ( x ) � . • ◦ ◦ • ◦ • ◦ • ◦ • ◦ • ◦ • ◦ • . . . ◮ This can be generalized. X ⊆ N is ultimately periodic def ⇔ there exist N ≥ 0 and P ≥ 1 such that for all n ≥ N , we have n ∈ X iff n + P ∈ X . period of length P N first values � �� � � �� � • ◦ ◦ • ◦ • ◦ • • ◦ • • • • ◦ • • • • ◦ • • • • ◦ • • . . .

  8. Examples of ultimately periodic sets ◮ The set of even numbers is ultimately periodic (with N = 0 and P = 2). ◮ The set of odd numbers is ultimately periodic (with N = 1 and P = 2). ◮ � x ≡ k k ′ � is ultimately periodic (with N = 0 and P = k ). ◮ Ultimately periodic sets are closed under union, intersection and complementation.

  9. Proof for complementation ◮ Suppose X is ultimately periodic and X = N � X . ◮ The statements below are equivalent for n ≥ N : ◮ n ∈ X , ◮ n �∈ X (by definition of X ), ◮ n + P �∈ X ( X is ultimately periodic with parameters N and P ), ◮ n + P ∈ X (by definition of X ). ◮ X is ultimately periodic too and the same parameters N and P can be used. • ◦ ◦ • ◦ • ◦ • • ◦ • • • • ◦ • • • • ◦ • • • • ◦ • • . . . ◦ • • ◦ • ◦ • ◦ ◦ • ◦ ◦ ◦ ◦ • ◦ ◦ ◦ ◦ • ◦ ◦ ◦ ◦ • ◦ ◦ . . .

  10. Ultimately periodic sets X are Presburger sets � � ( x � = k ) ∧ [( x = k ) ∨ k ∈ [ 0 , N − 1 ] � X k ∈ [ 0 , N − 1 ] ∩ X � (( x ≥ N ) ∧ ( ∃ y ( x = k + P y )))] k ∈ [ N , N + P − 1 ] ∩ X It remains to show the converse result.

  11. Semilinear sets of dimension 1 For every formula ϕ ( x ) with a unique free variable x, � ϕ � is an ultimately periodic set. ◮ Formula ϕ ( x ) with a unique free variable x. ◮ ϕ ′ : equivalent quantifier-free formula. ◮ ϕ ′ is a Boolean combination of atomic formulae of one of the forms below: ⊤ , ⊥ , x ≤ k , x ≡ k k ′ . ◮ Each atomic formula defines an ultimately periodic set and ultimately periodic sets are closed under union, intersection and complementation. ◮ So � ϕ ′ � = � ϕ � is ultimately periodic.

  12. Semilinear sets ◮ A linear set X is defined by a basis b ∈ N d and a finite set of periods P = { p 1 , . . . , p m } ⊆ N d : i = m � X = { b + n i p i : n 1 , . . . , n m ∈ N } i = 1 ◮ A linear set: �� 3 � 2 � 4 � � � � + i × + j × : i , j ∈ N 4 5 7 ◮ A semilinear set is a finite union of linear sets. ◮ Each semilinear set can be represented by a finite set of pairs of the form � b , P � .

  13. Ultimately periodic sets are semilinear sets ◮ Ultimately periodic set X with parameters N and P . � � X = ( { n } ) ∪ ( { n + λ P : λ ∈ N } ) n ∈ [ 0 , N − 1 ] ∩ X n ∈ [ N , N + P − 1 ] ∩ X ◮ { n } is a linear set with no period. ◮ { n + λ P : λ ∈ N } is a linear set with basis n and unique period P .

  14. The fundamental characterisation [Ginsburg & Spanier, PJM 66] ◮ For every Presburger formula ϕ with d ≥ 1 free variables, � ϕ � is a semilinear subset of N d . ◮ For every semilinear set X ⊆ N d , there is ϕ such that X = � ϕ � . ◮ The class of semilinear sets are effectively closed under union, intersection, complementation and projection. ◮ For instance, ( X 1 = � ϕ 1 � and X 2 = � ϕ 2 � ) imply X 1 ∩ X 2 = � ϕ 1 ∧ ϕ 2 � ◮ Presburger formula for �� 3 � 2 � 4 � � � � + i × + j × : i , j ∈ N 4 5 7 ∃ y , y ′ ( x 1 = 3 + 2y + 4y ′ ∧ x 2 = 4 + 5y + 7y ′ )

  15. X = { 2 n : n ∈ N } is not a Presburger set ◮ Ad absurdum , suppose that X is semilinear. ◮ Since X is infinite, there are b ≥ 0 and p 1 , . . . , p m > 0 ( m ≥ 1) such that m � def Y = { b + λ i p i : λ 1 , . . . , λ m ∈ N } ⊆ X i = 1 ◮ There exists 2 α ∈ Y such that p 1 < 2 α . ◮ By definition of Y , we have 2 α + p 1 ∈ Y . ◮ But, 2 α < 2 α + p 1 < 2 α + 1 , contradiction.

  16. X = { n 2 : n ∈ N } is not a Presburger set ◮ Ad absurdum , suppose that X is semilinear. ◮ Since X is infinite, there are b ≥ 0 and p 1 , . . . , p m > 0 ( m ≥ 1) such that m � def Z = { b + λ i p i : λ 1 , . . . , λ m ∈ N } ⊆ X i = 1 ◮ Let N ∈ N be such that N 2 ∈ Z and ( 2 N + 1 ) > p 1 . ◮ Since Z is a linear set, we also have ( N 2 + p 1 ) ∈ Z . ◮ However ( N + 1 ) 2 − N 2 = ( 2 N + 1 ) > p 1 . ◮ Hence N 2 < N 2 + p 1 < ( N + 1 ) 2 , contradiction.

  17. A VASS weakly computing multiplication     1 0 0 1         1 0     ,     0 1         0 0     0 0 q 0   0   0 0     0   0       − 1   0       0   0         0 0 0   0 0 0   0       0 0     q 1 q 2     − 1 1           0 1 − 1     0 0   1   0     0     0   0

  18. Weak multiplication     0 a �� a � c 0 b � �     �     0 c ∈ N 3 | ∃ � ∗ ∈ N 3 , � q 0 ,     → � q 1 , − � = b d     0 d     f e  0   e  0 f �� n � � ∈ N 3 : p ≤ n × m m . p

  19. Weak multiplication in a VASS ◮ Suppose there is ϕ ( x 1 , . . . , x 6 ) such that       a 0 a b 0 b             c 0 c � ∗       � ϕ ( x 1 , . . . , x 6 ) � = { | � q 0 , → � q 1 , − �}       d 0 d        e   0   e  f 0 f ◮ Formula ψ ( x ) below verifies � ψ ( x ) � = { n 2 | n ∈ N } ∃ x 1 , . . . , x 5 ϕ ( x 1 , . . . , x 5 , x ) ∧ x 1 = x 2 ∧ ∀ x ′ ( x ′ > x ) ⇒ ¬∃ x 3 , x 4 , x 5 ϕ ( x 1 , . . . , x 5 , x ′ ) Contradiction!

  20. Parikh Image of Regular Languages

  21. Parikh image ◮ Σ = { a 1 , . . . , a k } with ordering a 1 < · · · < a k .   n 1 n 2    ∈ N k where each n j is the ◮ Parikh image of u ∈ Σ ∗ :   .   . .  n k number of occurrences of a j in u . � 3 � ◮ Parikh image of a b a a b is . 2 ◮ Definition for Parikh image extends to languages. ◮ The Parikh image of any context-free language is semilinear. [Parikh, JACM 66] ◮ Effective computation from pushdown automata.

  22. Bounded languages ◮ Language L ⊆ Σ ∗ bounded def ⇔ L ⊆ u ∗ 1 · · · u ∗ n for some words u 1 , . . . , u n in Σ ∗ . ◮ L ⊆ Σ ∗ is bounded and regular iff it is a finite union of languages of the form u 0 v ∗ 1 u 1 · · · v ∗ k u k ◮ The Parikh images of bounded and regular languages are semilinear (i.e. Presburger sets).

  23. Counting letters in bounded and regular languages ◮ Parikh image of u 0 v ∗ 1 u 1 · · · v ∗ k u k is equal to { b + λ 1 p 1 + · · · λ k p k : λ 1 , . . . , λ k ∈ N } with ◮ b = Π( u 0 ) + · · · + Π( u k ) , ◮ p i = Π( v i ) for every i ∈ [ 1 , k ] . ◮ Finite union of such languages handled by finite unions of linear sets. ◮ Then, contructing a Presburger formula for the Parikh image easily follows.

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