CSE 463/563, Spring 2005
HOMEWORK #6 Answers
Translating English
into a First-Order Language
Last Update: 1 March 2005
Note:
or
material is highlighted
|
Provide an FOL syntax and semantics...
0-Place Functions (i.e., constants):
[[compSci]] = Computer Science
[[philosophy]] = Philosophy
1-Place Predicates:
[[Barber(x)]] = [[x]] is a barber
[[CS(x)]] = [[x]] is a computer scientist
[[Man(x)]] = [[x]] is a man
[[Person(x)]] = [[x]] is a person
[[Politician(x)]] = [[x]] is a politician
[[Professor(x)]] = [[x]] is a professor
[[Smart(x)]] = [[x]] is smart
[[Student(x)]] = [[x]] is a Student
[[Town(x)]] = [[x]] is in town
[[Woman(x)]] = [[x]] is a woman
2-Place Predicates:
[[BestScore(x,y)]] = [[x]] is the best score in [[y]]
[[BetterThan(x,y)]] = [[x]] is better than [[y]]
[[Dislikes(x,y)]] = [[x]] dislikes [[y]]
[[Fails(x,y)]] = [[x]] fails [[y]]
[[Likes(x,y)]] = [[x]] likes [[y]]
[[Shaves(x,y)]] = [[x]] shaves [[y]]
[[Takes(x,y)]] = [[x]] takes [[y]]
3-Place Predicate:
[[Fools(x,y,z)]] = [[x]] fools [[y]] at time [[z]]
...to represent the following English sentences, and then represent them:
- Not all students take both Computer Science and Philosophy.
- ¬x[Student(x)
(Takes(x, compSci) ^ Takes(x, philosophy))]
- Only one student failed Computer Science.
-
x[Student(x)
^ Fails(x, compSci) ^
y[(Student(y)
^ Fails(y, compSci))
y=x]]
- Only one student failed both Computer Science and Philosophy.
-
x[Student(x)
^ Fails(x, compSci) ^ Fails(x, philosophy)
^ y[(Student(y)
^ Fails(y, compSci) ^ Fails(x, philosophy))
y=x]]
- The best score in Computer Science was better than the best score in Philosophy.
-
xy[BestScore(x, compSci)
^ BestScore(y, philosophy) ^ BetterThan(x,y)]
- Every person who dislikes all computer scientists is smart.
-
x[(Person(x) ^
y[CS(y)
Dislikes(x,y)])
Smart(x)]
- No person likes a smart computer scientist.
-
xy[(Person(x) ^ CS(y)
^ Smart(y))
Dislikes(x,y)]
- There is a woman who likes all men who are not computer scientists.
-
x[Woman(x)
^
y[(Man(y)
^ ¬CS(y))
Likes(x,y)]
- There is a barber who shaves all men in town who do not shave themselves.
-
x[Barber(x)
^
y[(Man(y)
^ Town(y) ^ ¬Shaves(y,y))
Shaves(x,y)]]
- No person likes a professor unless the professor is smart.
-
xy[(Person(x) ^ Professor(y))
(Dislikes(x,y) v Smart(y))]
- Politicians can fool some of the people all of the time, and they can fool all of the people some of
the time, but they can't fool all of the people all of the time.
-
x[Politician(x)
(yt[Person(y) ^
Fools(x,y,t))]
^
(ty[Person(y)
Fools(x,y,t)])
^
¬(ty[Person(y)
Fools(x,y,t)])]
Copyright © 2005 by
William J. Rapaport
(rapaport@cse.buffalo.edu)
file: 563S05/hw06-answers-2005-03-01.html