




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A comprehensive guide to the decision procedure for presburger arithmetic, focusing on the construction of automata for solving atomic inequalities and equations. it details the algorithms involved, explores extensions to more complex formulas, and analyzes the complexity of the procedure. Valuable for students studying mathematical logic, automata theory, and theoretical computer science.
Typology: Slides
1 / 28
This page cannot be seen from the preview
Don't miss anything!
Adithya M S and Karishma Kuriya
Computer Science and Automation Indian Institute of Science, Bengaluru
April 15, 2025
1 Presburger Arithmetic
2 Decision procedure
3 Extensions
4 Complexity
5 References
Presburger logic is governed by the following formal grammars
af ::= t < t | t ≤ t | t ≥ t | t = t
Atomic formulas are also formulas. Formulas are defined as follows:
f ::= af | ¬ f | f ∨ f | f ∧ f | ∃ xf | ∀ xf
1 Presburger Arithmetic
2 Decision procedure
3 Extensions
4 Complexity
5 References
All inequalites of the form ∑ t 1 ≤ t 2 can be rewritten to an inequality of the form n i = 1 ai^ ·^ xi^ ≤^ b^ where all^ ai ,^ b^ ∈^ Z This can be rewritten as a vector expression ⃗ a ·⃗ x ≤ b Our decision procedure involves constructing an automaton (either DFA or NFA) given a Presburger formula, that accepts all solutions of this formula Satisfiability of the formula is just equivalent to checking emptiness of the automaton
Given a Presburger formula, the solutions over the naturals for them may be viewed as a tuple⃗ c = ( c 1 , c 2 , c 3 , ..., cn ) For instance, a solution for x + 2 y − 3 z ≤ 8 is (8, 7, 12). We encode the solution tuple in binary format with least significant bit first encoding The tuple (8, 7, 12) is represented by (0001, 1110, 0011) or as a matrix
x y z
All words of the automation are binary tuples in matrix representation. The automaton reads the matrix column by column. For shorter binary words, 0’s are added at the end till same length is reached.
Given an atomic inequality⃗ a ·⃗ x ≤ b with n variables. Let w = σ · wr be a word encoding tuple⃗ c (Here · is the concatenation of the first column and remaining columns of the matrix). Let ⃗ cr be the tuple encoded by wr Let ⃗ σ be the tuple encoded by σ. Then⃗ c can be rewritten as ⃗ c = 2 · ⃗ cr +⃗ σ where tuples are added element-wise The following result holds :-
⃗ a · (2 · ⃗ cr + ⃗ σ ) ≤ b ⇐⇒ ⃗ a · ⃗ cr ≤
( b −⃗ a ·⃗ σ )
This is the key idea in the construction
Algorithm 1 Procedure INEQtoDFA Input: An atomic inequality of the form⃗ a ·⃗ x ≤ b Result: An automaton A ⃗ a ⃗ x ≤ b = ( Q , Σ, δ , q 0 , F ) Q ← ϕ , δ ← ϕ , F ← ϕ , q 0 ← b , W ← { b }, Σ ← {0, 1} n while W 6 = ϕ do pick k from W , remove k from W and add k to Q if k ≥ 0 then add k to F end if for σ ∈ Σ do j ← b 12 ( k −⃗ a ·⃗ σ )c if j ∉ Q then add j to W end if add ( k , σ , j ) to δ end for end while return ( Q , σ , δ , q 0 , F )
The algorithm INEQtoDFA returns a DFA that accepts the solutions of a given input atomic inequality. We can check whether this inequality is satisfiable at all for any assignment of the variables by simply removing the labels on the transition arrows and using graph algorithms to check whether some final state is reachable from the initial state
Let ∑ ni = 1 ai · xi ≤ b be an inequality and s = ∑ ni = 1 | ai | We can prove by induction on the states of the automaton that every state q satisfies the property
−| b | − s ≤ q ≤ | b | + s
The initial state already satisfies this property. Let q ′^ be the successor of another state in the automaton. Then there is a σ ∈ {0, 1} n^ for a state q such that q ′^ = b 12 ( q −⃗ a ·⃗ σ )c By induction hypothesis −| b | − s ≤ q ≤ | b | + s For q ′, the same property holds:
−| b | − s ≤ − b^ − 2 2 s ≤
⌊ (^) −| b | − s −⃗ a ⃗ σ 2
⌋ ≤ q ′^ ≤
⌊ (^) | b | + s −⃗ a ⃗ σ 2
⌋ ≤ | b | + s
The transitions from state q to q ′^ = b q −⃗ 2 a ·⃗^ σ c are correct as w satisfying the original inequality ⃗ a ·⃗ c ≤ b is equivalent to wr satisfying the inequality ⃗ a · ⃗ cr ≤ b q −⃗ 2 a ·⃗^ σ c The final states are precisely those labelled with non-negative numbers as, if we have a sequence of transitions ⃗ δ starting at q and ending at q ′, we have that
q −⃗ a ·⃗ c ≤ q ′
Thus q ′^ < 0 would give ⃗ a ·⃗ c > q , which CANNOT be accepted from state q
1 Presburger Arithmetic
2 Decision procedure
3 Extensions
4 Complexity
5 References
We can also construct automaton for strict inequations of the form⃗ a ·⃗ x < b Let w = σ · wr be an accepted word and for a tuple ⃗ cr of naturals, encoded by wr a similar property holds:
⃗ a ·⃗ c < b ⇐⇒ ⃗ a · ⃗ cr <
( b −⃗ a · ⃗ δ )
The only difference here is that we would mark state k as final only if k > 0 and use the ceiling instead of the floor function
We can extend our construction to equations as well. Again the similar property holds :
⃗ a ·⃗ c = b ⇐⇒ ⃗ a · cr =
( b −⃗ a · ⃗ δ )
We define the transition relation as :-
δ ( q , σ ) =
2 ( q^ −⃗^ a^ ·^ ⃗ σ )^ if^ q^ −⃗^ a^ ·^ ⃗ σ^ is even st otherwise
Only 0 is marked as the final state (s t is the trap state)