Skip to main content

Lecture 2 Exercises

Laura Kovács

Problem 2.1​

Let SS be the following set of clauses:

S={¬p∨¬q,  ¬p∨q,  p∨¬q,  p∨q}.S = \{\neg p \vee \neg q,\; \neg p \vee q,\; p \vee \neg q,\; p \vee q\}.

Consider the binary resolution inference system BR\mathbb{BR}. Show that there exists an infinite number of different BR\mathbb{BR} derivations of the empty clause □\square from the clauses of SS.

🎬 Related animation: Review resolution visually before working through the derivation.

Solution

One concrete derivation of □\square from SS is obtained by resolving the clauses in the following sequence (numbers refer to the clauses as they appear in SS):

  1. From (¬p∨¬q)(\neg p \vee \neg q) and (p∨¬q)(p \vee \neg q) derive (¬q∨¬q)(\neg q \vee \neg q).
  2. From (¬p∨q)(\neg p \vee q) and (p∨q)(p \vee q) derive (q∨q)(q \vee q).
  3. Factor (q∨q)(q \vee q) to obtain qq.
  4. Resolve (¬q∨¬q)(\neg q \vee \neg q) with qq to get ¬q\neg q.
  5. Resolve the second copy of (q∨q)(q \vee q) with ¬q\neg q to obtain □\square.

To build infinitely many different derivations, insert the following detour any number of times just before the last resolution step:

  • Use qq (derived in step 3) together with (¬p∨¬q)(\neg p \vee \neg q) to obtain ¬p\neg p.
  • Resolve ¬p\neg p with (p∨q)(p \vee q) to derive qq again.

Repeating this detour an arbitrary number of times yields infinitely many distinct resolution derivations that still end in □\square.

Problem 2.2​

Consider a well-founded strict ordering ≻\succ on atoms. Prove that the induced ordering on literals, as defined in the lecture, is also well-founded.

Solution

Let LL be a literal and define atom⁡(L)\operatorname{atom}(L) to be pp if LL is either pp or ¬p\neg p. By construction of the induced ordering, whenever Li≻LjL_i \succ L_j we also have atom⁡(Li)≻atom⁡(Lj)\operatorname{atom}(L_i) \succ \operatorname{atom}(L_j).

Suppose, for contradiction, that the literal ordering is not well-founded. Then there is an infinite descending chain L0≻L1≻L2≻⋯L_0 \succ L_1 \succ L_2 \succ \cdots. Applying the observation above yields an infinite descending chain on atoms:

atom⁡(L0)≻atom⁡(L1)≻atom⁡(L2)≻⋯ ,\operatorname{atom}(L_0) \succ \operatorname{atom}(L_1) \succ \operatorname{atom}(L_2) \succ \cdots,

contradicting the assumption that the atom ordering is well-founded. Hence the induced literal ordering is well-founded.

Problem 2.3​

Let p,qp, q be boolean atoms and let SS be the following set of ground formulas:

S={¬p∨¬q,  ¬p∨q,  p∨¬q,  p∨q}.S = \{\neg p \vee \neg q,\; \neg p \vee q,\; p \vee \neg q,\; p \vee q\}.

Take any ordering such that p≻qp \succ q and any selection function σ\sigma over SS such that

{¬p∨¬q‾,  ¬p‾∨q,  p∨¬q‾,  p‾∨q}.\{\neg p \vee \underline{\neg q},\; \underline{\neg p} \vee q,\; p \vee \underline{\neg q},\; \underline{p} \vee q\}.

a.) Is σ\sigma a well-behaved selection function over SS? Justify your answer.

b.) How many inferences of BRσ\mathbb{BR}_{\sigma} are applicable to SS? Justify your answer.

Solution

a.) A selection function is well-behaved if, for every clause, either a negative literal is selected or all maximally ordered literals are selected. In the first three clauses of SS, σ\sigma selects a negative literal, so the condition holds. In the last clause, σ\sigma selects pp, which is the unique maximal literal because p≻qp \succ q. Therefore, σ\sigma is well-behaved on SS.

b.) No factoring inference applies, since no clause contains the same positive literal twice. A binary resolution step in BRσ\mathbb{BR}_\sigma must resolve on selected literals of opposite polarity. The only such pair is ¬p‾∨q\underline{\neg p} \vee q and p‾∨q\underline{p} \vee q, yielding

¬p‾∨q      p‾∨qq∨q(BR).\displaystyle\frac{\underline{\neg p} \vee q \;\;\; \underline{p} \vee q}{q \vee q}(BR).

Thus exactly one inference is applicable.

Problem 2.4​

Give an example of a non-tautological ground clause with at least one selected literal such that the selection is not well-behaved for any ordering.

Solution

Take p∨p‾p \lor \underline{p}. The maximal literal must be pp under any ordering, but only one occurrence is selected, so the selection can never satisfy the “select all maximal literals” requirement.

Problem 2.5​

Let

S={¬q∨r, ¬p∨q, ¬r∨¬q, ¬q∨¬p, ¬p∨¬r, ¬r∨p, r∨q∨p}.S = \{\neg q \lor r,\ \neg p \lor q,\ \neg r \lor \neg q,\ \neg q \lor \neg p,\ \neg p \lor \neg r,\ \neg r \lor p,\ r \lor q \lor p\}.
  1. Prove SS is unsatisfiable using BR\mathbb{BR}.
  2. Encode SS in TPTP and use Vampire (run with -av off) to prove unsatisfiability.
Solution (sketch)
  1. Use binary resolution to derive unit clauses: resolve ¬q∨r\neg q \lor r with ¬r∨¬q\neg r \lor \neg q to obtain ¬q\neg q, then propagate to derive pp and rr, eventually leading to a contradiction when resolving with clauses containing their negations. Any complete derivation is acceptable.
  2. Translate each clause into TPTP CNF syntax, run vampire -av off input.tptp, and inspect the proof output to confirm the empty clause is produced.