Name Hassan Ahmed Reg. No.
FA18-BSE-031
AI- Quiz No. 3
1. Let’s consider a propositional language where [CLO-3]
p means “Paola is happy”,
q means “Paola paints a picture”,
r means “Renzo is happy”.
Represent the following sentences in propositional logic:
a. “if Paola is happy and paints a picture then Renzo isn’t happy”
b. “if Paola is happy, then she paints a picture”
c. “Paola is happy only if she paints a picture”
Ans :
a) (p∧q) → ¬r
b) p → q
c) ¬(p∧¬q) which is equivalent to p → q !
2. Let A =“Aldo is Italian” and B =“Bob is English”. [CLO-3]
Name Hassan Ahmed Reg. No. FA18-BSE-031
Formalize the following sentences (convert to propositional language):
a. “Aldo isn’t Italian”
b. “Aldo is Italian while Bob is English”
c. “If Aldo is Italian then Bob is not English”
d. “Aldo is Italian or if Aldo isn’t Italian then Bob is English”
e. “Either Aldo is Italian and Bob is English, or neither Aldo is Italian nor Bob is English”
Ans:
a) ¬A
b) A∧B
c) A → ¬B
d) A ∨ (¬A → B)
e) (A ∧ B) ∨ (¬A ∧ ¬B) logically equivalent to A ↔ B
3. KB = R2 R4 = (B1,1 (P1,2 P2,1)) B1,1.
Prove P1,2 by adding the negation P1,2 [CLO-3]
Ans :
B1,1 ⇔ (P1,2 ∨ P2,1)
1. Eliminate ⇔, replacing α ⇔ β with (α ⇒ β)∧(β ⇒ α). (B1,1 ⇒ (P1,2 ∨ P2,1)) ∧ ((P1,2 ∨ P2,1)
⇒ B1,1)
2. Eliminate ⇒, replacing α ⇒ β with ¬α∨ β. (¬B1,1 ∨ P1,2 ∨ P2,1) ∧ (¬(P1,2 ∨ P2,1) ∨ B1,1)
3. Move ¬ inwards using de Morgan's rules and doublenegation: (¬B1,1 ∨ P1,2 ∨ P2,1) ∧ ((¬P1,2
∧ ¬P2,1) ∨ B1,1)
4. Apply distributive law (∧ over ∨) and flatten: (¬B1,1 ∨ P1,2 ∨ P2,1) ∧ (¬P1,2 ∨ B1,1) ∧ (¬P2,1
∨ B1,1)
Name Hassan Ahmed Reg. No. FA18-BSE-031
4. Which of the columns below represents the truth table for the formula, [CLO-3]
(p q) (r q)?
p q r 1 2 3 4 5
T T T F T T T T
T T F T T T T F
T F T F F F T T
T F F T T T T T
F T T F T T T F
F T F T T T T F
F F T F F T T T
F F F T T T T T
Ans :
Column 3 represents truth table for the formula (p q ) (r q)