Skip to main content

Lecture 2 Exercises

Laura Kovács

Problem 2.1

Let SS be the following set of clauses:

S={¬p¬q,  ¬pq,  p¬q,  pq}.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.

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 (¬pq)(\neg p \vee q) and (pq)(p \vee q) derive (qq)(q \vee q).
  3. Factor (qq)(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 (qq)(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 (pq)(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 LiLjL_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 L0L1L2L_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,  ¬pq,  p¬q,  pq}.S = \{\neg p \vee \neg q,\; \neg p \vee q,\; p \vee \neg q,\; p \vee q\}.

Take any ordering such that pqp \succ q and any selection function σ\sigma over SS such that

{¬p¬q,  ¬pq,  p¬q,  pq}.\{\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 pqp \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 ¬pq\underline{\neg p} \vee q and pq\underline{p} \vee q, yielding

¬pq      pqqq(BR).\displaystyle\frac{\underline{\neg p} \vee q \;\;\; \underline{p} \vee q}{q \vee q}(BR).

Thus exactly one inference is applicable.