Quantified Formulas - Decision Procedure Daniel Kroening, Ofer Strichman Presented by Changki Hong...
-
Upload
shona-paul -
Category
Documents
-
view
219 -
download
1
Transcript of Quantified Formulas - Decision Procedure Daniel Kroening, Ofer Strichman Presented by Changki Hong...
Quantified Formulas - Decision ProcedureQuantified Formulas - Decision Procedure
Daniel Kroening, Ofer Strichman
Presented by Changki Hong
07 NOV 08
2 / 21
Why do we need Quantifier
More modeling power Examples of quantifiers usage :
“Everyone in the room has a friend” “There exists a person whose age is 26.” Hard to express such examples in propositional logic which has
no quantifier. Example of quantifiers usage in math :
For any integer x, there is an integer y smaller than x:
There is quantifier alternation between the universal and existen-tial quantifiers.
What we considered so far was the decision problems for formu-las with nonalternating quantifiers.
Changki Hong @ pswlab Quantified Formulas
xyZyZx . .
3 / 21
Contents
Introduction Quantifier Elimination Search-Based Algorithms for Quantified Boolean Formu-
las Conclusion
Changki Hong @ pswlab Quantified Formulas
4 / 21
Quantified Propositional Logic (QPL)
Quantified Propositional Logic is propositional logic en-hanced with quantifiers. Sentences in QBF are better known as quantified Boolean formu-
las (QBFs). Syntax
Complexity The validity problem of QBF is PSPACE-complete
- theoretically harder to solve than SAT, which is “only” NP-complete
Changki Hong @ pswlab Quantified Formulas
5 / 21
Prenex Normal Form (PNF)
Definition 1. Prenex normal form A formula is said to be in prenex normal form (PNF) if it is in the
form
where for all and is a variable.
Quantification prefix- Quantification string on the left of the formula
Quantification suffix- Quantifier-free formula
We can make quantifier alternating PNF by introducing dummy variable.
- From here on we are considering that input formulas are in PNF.
Changki Hong @ pswlab Quantified Formulas
lafree formuquantifiernn -Q[1]V[1].]]V[Q[
},{][Q },,...,1{ ini ][iV
6 / 21
Transform an input formula into PNF
Lemma 1. For every quantified formula Q there exist a formula Q’ in prenex normal form such that Q is valid if and only if Q’ is valid.
Algorithm - transformation an input formula into PNF
Changki Hong @ pswlab Quantified Formulas
7 / 21
PNF - example
Transform below formula into PNF
1. Eliminate ‘’
2. Push negations inside :
3. Renaming
4. Move quantifiers to front :
Changki Hong @ pswlab Quantified Formulas
))( . ))( ) .((( . : xyyyxxyyxQ
))( . ))( ) .((( . : xyyyxxyyxQ
))( . ))( ) .((( . : xyyyxxyyxQ
))( . ))( ) .((( . : 22111 xyyyxxyyxQ
)( )( ) ( . . . : 21121 xyyxxyyyxQ
8 / 21
Quantifier Elimination
Eliminating an existential quantifier over a conjunction of Boolean literals is trivial If x appears with both phases in the conjunction
- Unsatisfiable otherwise
- x can be removed.- ex)
Eliminating universal quantifier using the fact-
However, we need an algorithm which can directly applicable to CNF
- Since converting formulas to DNF can result in an exponential growth in the formula size.
Changki Hong @ pswlab Quantified Formulas
yyyxxy . ..
. . xx
9 / 21
Elimination with binary resolution (1/2)
Resolution based QBF algorithm Resolution gives us a method to eliminate a variable x from a pair
of clauses in which x appears with opposite phases. Solving
- apply resolution to all pairs of clauses where x appears with opposite phases.
- Example
Changki Hong @ pswlab Quantified Formulas
)()()()( . . . yzxzyxzxyxzy
)()()( . . yzzyzyzy
10 / 21
Elimination with binary resolution (2/2)
Solving Transform to via : Eliminating universal quantifiers in CNF
- Simply erase them form the formula : if the formula is evaluated TRUE for all value of x, this means that we can’t satisfy a clause while rely-ing on a specific value of x.
Example
Changki Hong @ pswlab Quantified Formulas
. . xx
)()()()( . . . yzxzyxzxyxzy
)()()()( . . yzzyzyzy
11 / 21
Elimination with Expansion
Quantifier elimination is based on expansion of quantifiers, according to the following equivalences:
Example
Changki Hong @ pswlab Quantified Formulas
10
10
.
.
xx
xx
x
x
10 ))(( ))(( .. xx zxyzxyzy
))(( ... zxyxzy
)( .. zyzy
10 )( )( . zz zyzyy
)( . yy
12 / 21
Contents
Introduction Quantifier Elimination Search-Based Algorithms for Quantified Boolean Formu-
las Conclusion
Changki Hong @ pswlab Quantified Formulas
13 / 21
Search-Based Algorithms for QBF
Most competitive QBF solvers are based on an adaptation of DPLL solvers. resembles the basic DPLL algorithm without learning and
nonchronological backtracking. However, QBF solvers required to handle of quantifier alternation
The binary search tree has to be changed Distinguish between universal nodes and existential nodes. Universal node are labeled with a symbol “ ”.
Changki Hong @ pswlab Quantified Formulas
14 / 21
QBF search tree
Definition 2. QBF search tree corresponding to a quanti-fied propositional formula Given a QBF Q in prenex normal form and an ordering of its vari-
ables (say, x1, … , xn), a QBF search tree corresponding to Q is a binary labeled tree of height n+1 with two types of internal nodes, universal and existential, in which:
- The root node is labeled with Q and associated with depth 0.- One of the children of each node at level i, , is marked with
xi+1, and the other with ¬xi+1
- A node in level i, , is universal if the variable in level i+1 is universally quantified.
- A node in level i, , is existential if the variable in level i+1 is existentially quantified.
Changki Hong @ pswlab Quantified Formulas
ni 0
ni 0
ni 0
15 / 21
Validity of QBF tree
Definition 3. validity of a QBF tree A QBF tree is valid if and only if its root is satisfied. This is deter-
mined recursively according to the following rules:- A leaf in a QBF binary tree corresponding to a QBF Q is satisfied if the
assignment corresponding to the path to this leaf satisfies the quan-tification suffix of Q.
- A universal node is satisfied if both of its children are satisfied.- A existential node is satisfied if at least one of its children is satisfied.
Changki Hong @ pswlab Quantified Formulas
16 / 21
Validity of QBF tree - Example
Example of checking validity of QBF tree Consider the formula
Changki Hong @ pswlab Quantified Formulas
)()( . . : ueueueQ
• The second and third u nodes are the only nodes that are satisfied.
• e and ¬e are not satisfied, because both of their children aren’t satisfied
• Therefore, the root node, representing Q, is not satisfied and hence Q is not valid.
Q
e ¬e
u u ¬u¬u
17 / 21
Overview of search-based algorithm
Same formula
Changki Hong @ pswlab Quantified Formulas
)()( . . : ueueueQ
e = 0
u = 0
e = 1
u = 0 Su = 1
F
F
F
F
F
Not valid!
19 / 21
Search-based algorithm - Example
Changki Hong @ pswlab Quantified Formulas
Same formula
e = 0
u = 0
e = 1
u = 0 Su = 1
F
F
F
F
F
Not valid!
)()( . . : ueueueQ
20 / 21
Contents
Introduction Quantifier Elimination Search-Based Algorithms for Quantified Boolean Formu-
las Conclusion
Changki Hong @ pswlab Quantified Formulas