Assignment

Propositional Logic


Overview

Topic: Propositional Logic
Related Reading: Ch. 2
Due:

  1. (15 points)

    Convert the following formula to an equivalent formula in Conjunctive Normal Form (CNF), without any redundant or trivial clauses.

    ¬( (A ∨ B ∨ ¬C) ∧ (¬B ∨ C) ∧ (¬A ∨ C) )

    Solution:

    (¬A ∨ ¬C) ∧ (¬B ∨ ¬C) ∧ (A ∨ B ∨ C)
    With our derivation being as follows:
    ¬( (A ∨ B ∨ ¬C) ∧ (¬B ∨ C) ∧ (¬A ∨ C) )
    ¬(A ∨ B ∨ ¬C) ∨ ¬(¬B ∨ C) ∨ ¬(¬A ∨ C)
    (¬A ∧ ¬B ∧ C) ∨ (B ∧ ¬C) ∨ (A ∧ ¬C)
    (¬A ∨ B ∨ A) ∧ (¬A ∨ B ∨ ¬C) ∧ (¬A ∨ ¬C ∨ A) ∧ (¬A ∨ ¬C ∨ ¬C) ∧
    (¬B ∨ B ∨ A) ∧ (¬B ∨ B ∨ ¬C) ∧ (¬B ∨ ¬C ∨ A) ∧ (¬B ∨ ¬C ∨ ¬C) ∧
    (C ∨ B ∨ A) ∧ (C ∨ B ∨ ¬C) ∧ (C ∨ ¬C ∨ A) ∧ (C ∨ ¬C ∨ ¬C) by taking trivial Cartesian products of the three conjunctions
    (¬A ∨ B ∨ ¬C) ∧ (¬A ∨ ¬C) ∧ (¬B ∨ ¬C ∨ A) ∧ (¬B ∨ ¬C) ∧ (C ∨ B ∨ A) by removing redundancies in above clauses
    (¬A ∨ ¬C) ∧ (¬B ∨ ¬C) ∧ (A ∨ B ∨ C) by further removing redundancies

  2. (15 points)

    Demonstrate how to use resolution to prove the goal (¬A ∧ ¬B) given the following premises:

    1. B ⇔ (A ∨ D)
    2. D ⇒ F
    3. E ∧ C ⇒ ¬A
    4. D ⇒ A
    5. A ⇒ C
    6. A ⇒ E
    You should start by converting the combination of all premises into CNF form, numbering each clause, and then you should explicitly show each resolution step that is applied, giving the numeric labels for the two previous clauses that are being resolved.

    CNF equivalences of premises are:

    1. (¬B ∨ A ∨ D) ∧ (B ∨ ¬A) ∧ (B ∨ ¬D)
    2. ¬D ∨ F
    3. ¬E ∨ ¬C ∨ ¬A
    4. ¬D ∨ A
    5. ¬A ∨ C
    6. ¬A ∨ E

    Writing each clause as separate fact, and resolving further, we get:
    Fact 1)   ¬B ∨ A ∨ D
    Fact 2)   B ∨ ¬A
    Fact 3)   B ∨ ¬D
    Fact 4)   ¬D ∨ F
    Fact 5)   ¬E ∨ ¬C ∨ ¬A
    Fact 6)   ¬D ∨ A
    Fact 7)   ¬A ∨ C
    Fact 8)   ¬A ∨ E
    Fact 9)   A ∨ B (negated goal)
    Fact 10)  B (resolution of 2 and 9)
    Fact 11)  A ∨ D (resolution of 1 and 10)
    Fact 12)  A (resolution of 6 and 11)
    Fact 13)  C (resolution of 7 and 12)
    Fact 14)  E (resolution of 8 and 12)
    Fact 15)  ¬C ∨ ¬A (resolution of 5 and 14)
    Fact 16)  ¬A (resolution of 13 and 16)
    Fact 17)  False (resolution of 12 and 16)

  3. (20 points)

    A propositional 2-CNF formula is a conjunction of clauses, each containing exactly 2 literals, such as the following:

    (A ∨ B) ∧ (¬A ∨ C) ∧ (¬B ∨ D) ∧ (¬C ∨ G) ∧ (¬D ∨ G)
    1. Prove, using resolution, that the above formula entails G.

      (A ∨ B) ∧ (¬A ∨ C) resolves to (B ∨ C)
      (¬B ∨ D) ∧ (B ∨ C) resolves to (D ∨ C)
      (D ∨ C) ∧ (¬C ∨ G) resolves to (D ∨ G)
      (D ∨ G) ∧ (¬D ∨ G) resolves to G

    2. Two clauses are semantically distinct if they are not logically equivalent. How many semantically distinct 2-CNF clauses can be constructed from n proposition symbols?

      Given the n symbols and their negations, there are 2n possible literals. A 2-CNF formula can be formed by choosing any 2 distinct literals of those 2n, or by choosing the same one twice, if we consider a formula such as (A ∨ A) = (A) to be allowed in 2-CNF. This suggests approximately (2n choose 2) + 2n possible clauses, which simplifies to 2n(2n-1)/2 + 2n = n(2n-1) + 2n = 2n2 + n possible clauses. The number of semantically distinct ones are slightly less, as the n clauses of the form (A ∨ ¬A) are all equivalently true, and thus represent a single semantically different clause. So there are precisely 2n2 + 1 semantically distinct clauses.

    3. Using your answer to (b), prove that propositional resolution always terminates in time polynomial in n given a 2-CNF sentence containing no more than n distinct symbols.

      The key insight is that when two 2-CNF clauses are resolved, the resolvant will also be a 2-CNF clause. Resolution proceeds by taking two existing clauses that can be resolved, and adding the resultant as a new clause in the knowledge base (assuming it is not already there). Based on (b), at most O(n2) semantically distinct 2-CNF clauses can be added to the knowledge base. Each clause added requires a process that involves considering all possible pairs of existing clauses. Even without any special data structures, this suggest at most O(n2) steps, each of which requires at most O(n4) time. This leads to an upper bound of O(n6) on the time (although clearly much better is possible with more care).

    4. Explain why your argument in (c) does not apply to 3-CNF formulae.

      The problem with 3-CNF is that resolving two different 3-CNF clauses will in general produce a resultant that has four literals. The continued resolution of those larger clauses may result in even larger clauses.

      So although it is true that there are only polynomially many semantically distinct 3-CNF clauses, the process of resolution generates clauses with more literals.


Last modified: Saturday, 12 October 2013