Handout #26
CS103
April 19, 2011
Robert Plummer
CS103 Review Session Solutions
Logic
Give a formal proof for the following.
Use numbered steps and refer to those numbers in
the justification you give for each step.
1.
¬
x (R(x)
S(x))
2.
y (S(y)
M(y)
L(y))
3.
x ¬(R(x)
S(x))
De Morgan's, 1
4.
Let c be an arbitrary object
5.
¬(R(c)
S(c)
Universal instantiation, 3
6.
¬R(c)
¬S(c)
De Morgan's, 5
7.
S(c)
M(c)
L(c)
Universal instantiation, 2
8.
¬R(c)
M(c)
L(c)
Resolution, 6, 7
9.
¬R(c)
(L(c)
M(c))
Associativity, Commutativity, 8
10.
R(c)
(L(c) _M(c))
Equivalence in table, 9
11.
x (R(x)
(L(x)
M(x)))
Universal generalization, 4—10
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document2
Translations
Translate each of the following sentences into firstorder logic. The questions describe
events occurring at a Halloween party. The domain of discourse includes exactly the
people who attended the party. You may only use the following predicates:
M(x)
x wore a mask to the party.
S(x, y)
x scared y at the party.
F(x, y)
x and y are friends
Notes:
F should be considered to be symmetric, i.e. F(x, y)
F(y, x).
It is possible to scare yourself.
It is possible to be friends with yourself.
1) Nobody who didn’t wear a mask scared a friend.
x
y((S(x, y)
F(x, y))
M(x))
x
y(
M(x)
F(x, y)
S(x, y))
2) A person who wore a mask and who had no friends scared everybody else at the
party.
x( M(x)
yF(x, y)
z(z
≠
x
S(x, z) )
3) No two people wearing masks scared each other.
x
y( (M(x)
M(y)
y
≠
x)
(S(x, y)
S(y, x))
x
y( M(x)
M(y)
y
≠
x
S(x, y)
S(x, y))
Common Mistake: For the first translation, writing (
S(x, y)
S(y, x)). The
original sentence allows that a person x wearing a mask scared another person y
in a mask, as long as y did not also scare x.
But this translation would not allow
for that possibility.
4) Everybody with at least two friends scared somebody.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '11
 PLUMMER
 Equivalence relation, Binary relation, Transitive relation, Symmetric relation, Firstorder logic

Click to edit the document details