solutions-Propositional_Logic
solutions-Propositional_Logic
(a) E ⇒ ¬H
Answer: If Liron is eating, then Liron is not hungry
(b) E ∧ ¬H
Answer: Liron is eating and not hungry
(c) ¬(H ⇒ ¬E)
Answer: Liron is hungry and eating
(((p ∧ q) ⇒ r) ∧ (p ⇒ q)) ⇒ (p ⇒ r)
d. Unsatisfiable
(p ∨ q) ∧ (¬p ∨ ¬q)
e. Valid
(p ⇒ p) ⇒ p
f. Contingent
((p ⇒ q) ⇒ p) ⇒ (q ⇒ p)
g. Contingent
(¬p ∧ q) ⇔ (p ⇒ q)
h. valid
(p ⇒ ¬q) ⇒ (q ⇒ ¬p)
i. contingent
j. valid
so, provide an example. If not, explain why it is impossible.
8) Prove that P A Q |= P V Q.
Answer:
P Q PAQ PV
Q
t t t t
t f f t
f t f t
f f f f
Since every interpretation that satisfies P A Q also satisfies P V Q, it holds that
P A Q |= P V Q.
9) Consider the following popular puzzle. When asked for the ages of her three
chil- dren, Mrs. Baker says that Alice is her youngest child if Bill is not her
youngest child, and that Alice is not her youngest child if Carl is not her
youngest child. Write down a knowledge base that describes this riddle and the
necessary back- ground knowledge that only one of the three children can be
her youngest child. Show with resolution that Bill is her youngest child.
Answer:
Let the propositions A, B and C denote that Mrs. Baker’s youngest child
is Alice, Bill and Carl, respectively. We have the following clauses for the
background knowledge:
1 A V B V C (One child has to be the youngest.)
2 ¬A V ¬B (Alice and Bill cannot both be the youngest.)
3 ¬A V ¬C
4 ¬B V ¬C
The following clauses represent the information from Mrs. Baker:
5 B V A (Alice is her youngest child if Bill is not her youngest child. That
is, ¬B ⇒ A.)
6 C V ¬A (Alice is not her youngest child if Carl is not her youngest child.
That is, ¬C ⇒ ¬A.)
We want to show that Bill is the youngest child. Negating this, we get the
following clause:
7 ¬B (Assume that Bill is not the youngest child.)
We use resolution to derive the empty clause as follows:
8 (from 5,7) A
9 (from 3,6) чA
10 (from 8,9) ⊥
10) Consider the following popular puzzle. A boy and a girl are talking. “I
am a boy” said the child with black hair. “I am a girl” said the child with white
hair. At least one of them is lying. Write down a knowledge base that describes
this riddle. Show with resolution that both of them are lying.
Answer: