0% found this document useful (0 votes)
265 views2 pages

Exercise Sheet 11: Theoretical Computer Science (Bridging Course)

This document contains an exercise sheet for a theoretical computer science course. It includes 3 exercises on propositional logic: (1) converting logical statements to conjunctive and disjunctive normal form, (2) deriving a logical statement from a knowledge base using inference rules, and (3) proving the contradiction theorem relating the unsatisfiability of a knowledge base with a statement to the logical implication of the negation of that statement. The document provides the questions, solutions, and relevant context for each of the 3 exercises.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
265 views2 pages

Exercise Sheet 11: Theoretical Computer Science (Bridging Course)

This document contains an exercise sheet for a theoretical computer science course. It includes 3 exercises on propositional logic: (1) converting logical statements to conjunctive and disjunctive normal form, (2) deriving a logical statement from a knowledge base using inference rules, and (3) proving the contradiction theorem relating the unsatisfiability of a knowledge base with a statement to the logical implication of the negation of that statement. The document provides the questions, solutions, and relevant context for each of the 3 exercises.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Theoretical Computer Science (Bridging Course)

Dr. G. D. Tipaldi University of Freiburg


F. Boniardi Department of Computer Science
Winter Semester 2014/2015

Exercise Sheet 11
Due: 29th January 2015

Exercise 11.1 (CNF, DNF)

(a) Convert φ := ¬(p → q) ∨ ((r ∨ s) → (q ∨ t)) ∨ (¬p → ¬v) into Conjunctive Normal Form.

Solution:

¬(p → q) ∨ ((r ∧ s) → (q ∨ t)) ∨ (¬p → ¬v) ≡


≡ ¬(¬p ∨ q) ∨ (¬(r ∨ s) ∨ (q ∨ t)) ∨ (p ∨ ¬v) ≡
≡ (p ∧ ¬q) ∨ (¬r ∧ ¬s) ∨ q ∨ t ∨ p ∨ ¬v ≡
≡ (p ∧ ¬q) ∨ ((¬r ∨ q ∨ t ∨ p ∨ ¬v) ∧ (¬s ∨ q ∨ t ∨ p ∨ ¬v)) ≡
≡ (¬r ∨ p ∨ q ∨ t ∨ ¬v) ∧ (¬s ∨ p ∨ q ∨ t ∨ ¬v) ∧ (¬r ∨ p ∨ t ∨ ¬v ∨ >) ∧ (¬s ∨ p ∨ t ∨ ¬v ∨ >) ≡
≡ (¬r ∨ p ∨ q ∨ t ∨ ¬v) ∧ (¬s ∨ p ∨ q ∨ t ∨ ¬v).
Wn
(b) Convert φ := i=1 (pi ↔ qi ) into Disjunctive Normal Form.

Solution:
n
_ n
_
(pi ↔ qi ) ≡ ((pi → qi ) ∧ (qi → pi )) ≡
i=1 i=1
_n
≡ ((¬pi ∨ qi ) ∧ (¬qi ∨ pi )) ≡
i=1
_n
≡ ((¬pi ∧ qi ) ∨ (¬pi ∧ pi ) ∨ (qi ∧ ¬qi ) ∨ (qi ∧ pi )) ≡
i=1
_n
≡ ((¬pi ∧ ¬qi ) ∨ (qi ∧ pi )) ≡
i=1
_n n
_
≡ (¬pi ∧ ¬qi ) ∨ (qi ∧ pi ).
i=1 i=1

Exercise 11.2 (Derivation, 3 marks)


Give a derivation of φ = B ∧ C from the knowledge base

KB = {A, B, A ∨ C, K ∧ E ↔ A ∧ B, ¬C → D, E ∨ F → ¬D},

using the inference rules for propositional logic.

Solution:
1. A (KB)
2. B (KB)
3. A ∧ B (1, 2, and introduction)
4. K ∧ E ↔ A ∧ B (KB)
5. A ∧ B → K ∧ E (4, ↔ elimination)
6. K ∧ E (3, 5, modus ponens)
7. E (6, and elimination)
8. E ∨ F (7, or introduction)
9. E ∨ F → ¬D (KB)
10. ¬D (8, 9, modus ponens)
11. ¬C → D (KB)
12. C (10, 11, modus tolens)
13. B ∧ C (2, 12, and introduction)

Exercise 11.3 (Contradiction Theorem)


Prove the contradiction theorem: KB ∪ {ϕ} is unsatisfiable iff KB |= ¬ϕ.
Hint: Deduction Theorem can be useful here.

Solution:

KB ∪ {ϕ} is unsatisfiable ⇔
⇔ KB ∪ {ϕ} |= ⊥ (immediate) ⇔
⇔ KB |= ϕ → ⊥ (deduction theorem) ⇔
⇔ KB |= (¬ϕ ∨ ⊥) (logical equivalence). ⇔
⇔ KB |= ¬ϕ (logical equivalence).

You might also like