Docsity

Assignment 2: Translating Natural Language into FOPL with Logic & ML - Prof. Christoph Eic, Assignments of Computer Science

Toggle sidebar
bg1
COSC 6368 (Fall 2004)
Assignment 2: Logical Reasoning and Machine Learning
Solution Sketch Problem7
7) Translating Natural Language into FOPL
a. Some students took both COSC 6340and COSC 6351.
]x (student(x) ^ took-course(x, COSC6340) ^ took-course(x,
COSC6351))
b. Politician can fool some people all the time, and they can fool all the people some
of the time, but they can’t fool all the people all the time1.
Vp (politician(p) (]sVt(person(s) ^ fool(p,s,t)) ^ Vs]t(person(s)
fool(p,s,t)) ^ ~(VsVt person(s) fool (p,s,t)) )
c. Every rich person owns at least one car.
Vp (((person(p) ^ rich(p))]c (car(c) ^ owns(p,c)))
d. Every city has a dog catcher that has been bitten by every dog in town.
Vc ((city(c) ]dc (dog-catcher(dc) ^ at(dc,c) ^ Vd((dog(d) ^ at(d,c))
has-bitten(d,dc))) )
e. There are exactly 2 grey elephants in the Houston Zoo.
]e1]e2 … ^ ~(]e3 elephant(e3) ^ grey(e3) ^ inhoustonzoo(e3) ^
not(e1=e3) ^ not(e1=e2) )
f. For every set X there is a set Y, such that the cardinality of Y is greater than the
cardinality of X.
Vx (set(x) ]y (set(y) ^ >(cardinality(y),cardinality(x)) )
1 I believe there are multiple correct solutions to this problem!

Partial preview of the text

Download Assignment 2: Translating Natural Language into FOPL with Logic & ML - Prof. Christoph Eic and more Assignments Computer Science in PDF only on Docsity!

COSC 6368 (Fall 2004)

Assignment 2: Logical Reasoning and Machine Learning

Solution Sketch Problem

7) Translating Natural Language into FOPL a. Some students took both COSC 6340and COSC 6351. ]x (student(x) ^ took-course(x, COSC6340) ^ took-course(x, COSC6351)) b. Politician can fool some people all the time, and they can fool all the people some of the time, but they can’t fool all the people all the time^1. Vp (politician(p)  (]sVt(person(s) ^ fool(p,s,t)) ^ Vs]t(person(s)  fool(p,s,t)) ^ ~(VsVt person(s)  fool (p,s,t)) ) c. Every rich person owns at least one car. Vp (((person(p) ^ rich(p))]c (car(c) ^ owns(p,c))) d. Every city has a dog catcher that has been bitten by every dog in town. Vc ((city(c)  ]dc (dog-catcher(dc) ^ at(dc,c) ^ Vd((dog(d) ^ at(d,c))  has-bitten(d,dc))) ) e. There are exactly 2 grey elephants in the Houston Zoo. ]e1]e2 … ^ ~(]e3 elephant(e3) ^ grey(e3) ^ inhoustonzoo(e3) ^ not(e1=e3) ^ not(e1=e2) ) f. For every set X there is a set Y, such that the cardinality of Y is greater than the cardinality of X. Vx (set(x)  ]y (set(y) ^ >(cardinality(y),cardinality(x)) ) (^1) I believe there are multiple correct solutions to this problem!