Presentation is loading. Please wait.

Presentation is loading. Please wait.

PARIXIT PRASAD December 4, 2013 Parixit Prasad | CSA - IISC 1 Deciding Presburger Arithmetic Using Automata Department of Computer Science and Automaton.

Similar presentations


Presentation on theme: "PARIXIT PRASAD December 4, 2013 Parixit Prasad | CSA - IISC 1 Deciding Presburger Arithmetic Using Automata Department of Computer Science and Automaton."— Presentation transcript:

1 PARIXIT PRASAD December 4, 2013 Parixit Prasad | CSA - IISC 1 Deciding Presburger Arithmetic Using Automata Department of Computer Science and Automaton Indian Institute of Science, Bangalore December 4, 2013

2 Structure of presentation December 4, 2013 Parixit Prasad | CSA - IISC 2 Recall Finite Automata Presburger Arithmetic Sets of Integers recognized by a Finite Automaton Presburger Formulas to Finite Automata Automata Associated with equalities Automata Associated with inequalities Closure Properties and Automata for arbitrary formulas Deciding satisfiability of a formula

3 Finite Automata December 4, 2013 Parixit Prasad | CSA - IISC 3 A Finite Automaton is a tuple (Q,,δ,q 0,F). Q = Finite set of states = Finite set of input symbols δ (Q x x Q) q 0 Q (the start state) F Q (Finite set of final states) A run of the automaton on the word ω * is a word ρ Q*, such that: ρ[1] = q 0 If ρ[i] = p and ρ[i+1] = q, then (p, ω[i],q) δ A successful run ρ on ω is when ρ[n+1] F, where n=|ω| A string is accepted by the automaton when there is a successful run on that string. Class of languages accepted by finite automaton is closed under union, intersection and complementation.

4 Presburger Arithmetic December 4, 2013 Parixit Prasad | CSA - IISC 4 A Basic term in presburger arithmetic consists of first order variable, constants 0 & 1 and sums of basic terms. x+x+x+y+1+1 is a basic term which can also be written as 3x+y+2 The Atomic formulas are equalities and inequalities between basic terms. x-2y = -2 is an atomic formula with equality. x-2y -2 is an atomic formula with inequality. The Formulas are first-order formulas build on atomic formulas using the connectives Λ (conjunction), V (disjunction), ¬(negation), x (existential quantification), x (universal quantification). x, y.(x=2y V x=2y+1) is a formula. Τ is the empty conjunction (valid formula). is the empty disjunction (unsatisfiable formula).

5 The Free variables of a formula φ are defined as: FV(φ) = variables which are not quantified in φ FV(φ 1 V φ 2 ) = FV(φ 1 ) U FV(φ 2 ) FV( x.φ) = FV(φ) \ {x} The interpretation domain of the formulas is the set of natural numbers N, with 0, 1, +, =, having their usual meaning. A solution of the formula φ is an assignment of x 1,x 2,…,x n in N which satisfies φ, where FV(φ)={x 1,x 2,…,x n } ( x 2, y 1 ) is one solution of x+3 = 4y+1 ( x 4 ) is one solution of y.(x=2y) Presburger Arithmetic (Contd.) December 4, 2013 Parixit Prasad | CSA - IISC 5

6 Sets of Integers recognized by Finite Automaton December 4, 2013 Parixit Prasad | CSA - IISC 6 Every Natural number can be written as a word in base-k (k 1 ) over the alphabet set { 0, 1,…,(k- 1 )} 29 in base-2 is written as Since we want to read the word from LSB to MSB, we write the word from right to left, with LSB in left and MSB in right. 29 in base-2 is written as

7 Integers recognized by Finite Automaton(Contd.) December 4, 2013 Parixit Prasad | CSA - IISC 7 There is a mapping from { 0, 1,…,(k- 1 )} * to N denoted by ~k which maps each word in base-k to its corresponding Natural number maps to 29 n-tuples of natural number can be represented in base-k as a single word over the alphabet set { 0, 1,…,(k- 1 )} n { 0, 1,…,(k- 1 )} 3 set is { 0, 1,…,(k- 1 )} x { 0, 1,…,(k- 1 )} x { 0, 1,…,(k- 1 )} (13,29,6) (base-10) can be written in base-2 over the alphabet set { 0, 1 } 3 as:

8 Presburger Formula to Finite Automata December 4, 2013 Parixit Prasad | CSA - IISC 8 1. Build automaton for the atomic formulas in the given formula Automata Associated with equalities Automata Associated with inequalities 2. Use these automaton to create the automata for the given formula

9 Automata associated with equality December 4, 2013 Parixit Prasad | CSA - IISC 9

10 Automata associated with equality (Contd.) December 4, 2013 Parixit Prasad | CSA - IISC 10

11 Automata associated with equality (Example) December 4, 2013 Parixit Prasad | CSA - IISC 11

12 Automaton for: x-2y=-2 December 4, 2013 Parixit Prasad | CSA - IISC 12 q -2 q -1 q0q0 q1q1

13 Getting solutions from the automaton December 4, 2013 Parixit Prasad | CSA - IISC 13

14 Observations on the automaton December 4, 2013 Parixit Prasad | CSA - IISC 14

15 Automata associated with inequality December 4, 2013 Parixit Prasad | CSA - IISC 15

16 Automata associated with inequality (Contd.) December 4, 2013 Parixit Prasad | CSA - IISC 16 The resulting automata would be (Q,, δ, q b, F) Q = {q is computed by the inference rule} = { 0,1 } n δ (Q x x Q) computed by the reference rule q b is the initial state F = {q c |c0}

17 Automata associated with inequality (Example) December 4, 2013 Parixit Prasad | CSA - IISC 17

18 Automaton for: x-2y-2 December 4, 2013 Parixit Prasad | CSA - IISC 18 q -2 q -1 q0q0 q1q1

19 Getting solutions from the automaton December 4, 2013 Parixit Prasad | CSA - IISC 19

20 Closure Properties and automata for arbitrary formula December 4, 2013 Parixit Prasad | CSA - IISC 20

21 Automata for arbitrary formulas (Contd.) December 4, 2013 Parixit Prasad | CSA - IISC 21

22 An example of Projection December 4, 2013 Parixit Prasad | CSA - IISC 22 q -2 q -1 q0q0 q1q1

23 Deciding satisfiability of a formula December 4, 2013 Parixit Prasad | CSA - IISC 23

24 Thank you December 4, 2013 Parixit Prasad | CSA - IISC 24 Questions…


Download ppt "PARIXIT PRASAD December 4, 2013 Parixit Prasad | CSA - IISC 1 Deciding Presburger Arithmetic Using Automata Department of Computer Science and Automaton."

Similar presentations


Ads by Google