Roberto Sebastiani
DISI, Universit` a di Trento, Italy June 11
th, 2020
769857918
[COPY WITH SOLUTIONS]
1
Let φ be a generic Boolean formula, and let φ
treennf def= N N F
tree(φ) and φ
dagnnf def= N N F
dag(φ), s.c.
N N F ()
treeand N N F ()
dagare the conversion into negative normal form using a tree and a DAG representation of the formulas respectively.
Let |φ|, |φ
treennf| and |φ
dagnnf| denote the size of φ, φ
treennfand φ
dagnnfrespectively.
For each of the following sentences, say if it is true or false.
(a) |φ
treennf| is in worst-case polynomial in size wrt. |φ|. [ Solution: False. ] (b) |φ
dagnnf| is in worst-case polynomial in size wrt. |φ|. [ Solution: True. ]
(c) φ
dagnnfhas the same number of distinct Boolean variables as φ has. [ Solution: True. ]
(d) A model for φ
dagnnf(if any) is also a model for φ, and vice versa. [ Solution: True. ]
Using the variable ordering “ A
1, A
2, A
3, A
4”, draw the OBDD corresponding to the following formulas:
A
1∧ (¬A
1∨ ¬A
2) ∧ ( A
2∨ A
3) ∧ (¬A
3∨ A
4) [ Solution:
SOLUTION: The formula is represented by the following OBDD:
A1
A2
A3
A4
⊥ ⊤
⊤ ⊥
⊥ ⊤
⊥
⊥ ⊤
]
3
Using the semantic tableaux algorithm, decide whether the following formula is satisfiable or not.
(Write the search tree.)
( ¬A
1) ∧ ( A
1∨ ¬A
2) ∧ ( A
1∨ A
2∨ A
3) ∧ ( A
4∨ ¬A
3∨ A
6) ∧ ( A
4∨ ¬A
3∨ ¬A
6) ∧ ( ¬A
3∨ ¬A
4∨ A
7) ∧ ( ¬A
3∨ ¬A
4∨ ¬A
7) (Literal-selection criteria to your choice.)
[ Solution:
¬A3
¬A4
¬A3
¬A4
¬A3
¬A4
¬A3
¬A4
¬A1
A1
A1 A3
A2
¬A2
¬A3
A4 A6
¬A3 ¬A6
A4
¬A3 ¬A6
A4
¬A3
¬A4
A7 A7 A7
¬A3
¬A4¬A7 ¬A7 ¬A7
= ⇒ the formula is inconsistent.
]
Consider the following piece of a much bigger formula, which has been fed to a CDCL SAT solver:
c
1: ¬A
7∨ A
2c
2: A
4∨ A
1∨ A
11c
3: A
8∨ ¬A
6∨ ¬A
4c
4: ¬A
5∨ ¬A
1c
5: A
7∨ ¬A
8c
6: A
7∨ A
6∨ A
9c
7: ¬A
7∨ A
3∨ ¬A
12c
8: A
4∨ A
5∨ A
10...
Suppose the solver has decided, in order, the following literals (possibly interleaved by others not occurring in the above clauses):
{..., ¬A
9, ... ¬A
10, ... ¬A
11, ... A
12, ... A
13, ..., ¬A
7}
(a) List the sequence of unit-propagations following after the last decision, each literal tagged (in square brackets) by its antecedent clause
[ Solution:
¬A
8[c
5] A
6[c
6]
¬A
4[c
3] A
5[c
8] A
1[c
2] ]
(b) Derive the conflict clause via conflict analysis by means of the 1st-UIP technique [ Solution:
A
4∨ A
5∨ A
10A
4∨ A
1∨ A
11Conf licting cl.
z }| {
¬A
5∨ ¬A
1A
4∨ ¬A
5∨ A
11( A
1) A
4|{z}
1st U IP
∨ A
10∨ A
11( A
5)
]
(c) Using the 1st-UIP backjumping strategy, update the list of literals above after the backjumping step and the unit-propagation of the UIP
[ Solution: {..., ¬A
9, ... ¬A
10, ... ¬A
11, A
4} ]
5
Consider the following CNF formula:
( A
7) ∧
( A
8∨ ¬A
7) ∧
( ¬A
4∨ ¬A
7∨ ¬A
5) ∧ ( ¬A
8∨ ¬A
6∨ A
1) ∧ ( A
2∨ ¬A
7∨ ¬A
6) ∧ ( ¬A
8∨ A
6∨ ¬A
2) ∧ ( ¬A
1∨ ¬A
5∨ ¬A
2) ∧ ( A
2∨ ¬A
6∨ ¬A
8) ∧ ( ¬A
1∨ ¬A
5∨ A
8) ∧ ( A
2∨ A
7∨ ¬A
6) ∧ ( ¬A
6∨ A
4∨ ¬A
6) ∧ ( A
3∨ A
8∨ ¬A
7) Decide quickly if it is satisfiable or not, and briefly explain why.
[ Solution: After unit-propagating A
7, A
8:
( A
7) ∧
( A
8) ∧
( ¬A
4∨ ¬A
5) ∧
( ¬A
6∨ A
1) ∧
( A
2∨ ¬A
6) ∧
( A
6∨ ¬A
2) ∧
( ¬A
1∨ ¬A
5∨ ¬A
2) ∧
( A
2∨ ¬A
6) ∧
( ¬A
1∨ ¬A
5∨ A
8) ∧ ( A
2∨ A
7∨ ¬A
6) ∧ ( ¬A
6∨ A
4∨ ¬A
6) ∧
( A
3∨ A
8)
the result is a Horn formula with no positive unit clauses.
Therefore, the assignment {¬A
i}
8i=1is a model. ]
Consider the following Boolean formulas:
φ
1 def= ( ¬A
7∨ ¬A
3) ∧ ( A
7∨ ¬A
3) ∧
( A
2) ∧
( ¬A
2∨ ¬A
4) φ
2def