You are on page 1of 2

Computer Science Division Level 4- Autumn semester

Department of Mathematics Course: COMP 401


Faculty of Science November 2022

Sheet 3
First Order Logic

1. Translate the following statements into FOL:


a) Understanding leads to friendship.
b) Friendship is transitive.
c) All students are smart.
d) There exists a smart student.
e) Every student loves some student.
f) Every student loves some other student.
g) There is a student who is loved by every other student.
h) Adam is a student.
i) Adam takes either AI or Automata, but not both.
j) Adam takes either AI or Automata (or both).
k) No students love Adam.
l) Adam has at least one sister.
m) Adam has no sister.
n) Every student takes at least one course.
o) Only one student failed in Programming.
p) No student failed in Automata but at least one failed in Programming.
q) Every student who takes Automata also takes AI.
r) No student can fool the other entire student.

2. (Wumpus World) Represent the following English sentences in first-order logic:


a) Anyone who meets the wumpus is killed by it.

b) Anything that glitters is gold.

c) Not every square contains a pit.

3. Translate into good, natural English:


∀ x, y, l SpeaksLanguage(x, l) ∧ SpeaksLanguage(y, l)
⇒ Understands (x, y) ∧ Understands (y, x).

And then explain why this sentence is entailed by the sentence


∀ x, y, l SpeaksLanguage(x, l) ∧ SpeaksLanguage(y, l)
⇒ Understands (x, y).
4. Consider a vocabulary with the following symbols:
Occupation (p, o): Predicate. Person p has occupation o.
Customer (p1, p2): Predicate. Person p1 is a customer of person p2.
Boss (p1, p2): Predicate. Person p1 is a boss of person p2.
Doctor, Surgeon, Lawyer, Actor: Constants denoting occupations.
Emad, Jehan: Constants denoting people.
Use these symbols to write the following assertions in first-order logic:
1) Emad is either a surgeon or a lawyer.
2) Jehan is an actor, but he also holds another job.
3) All surgeons are doctors.
4) Jehan does not have a lawyer (i.e., is not a customer of any lawyer).
5) Emad has a boss who is a lawyer.
6) There exists a lawyer all of whose customers are doctors.
7) Every surgeon has a lawyer.

5. Represent the following sentences in first-order logic, using a consistent vocabulary


(which you must define):
a) Some students took French in spring 2001.
b) Every student who takes French passes it.
c) Only one student took Greek in spring 2001.
d) The best score in Greek is always higher than the best score in French.
e) Every person who buys a policy is smart.
f) No person buys an expensive policy.
g) There is an agent who sells policies only to people who are not insured.

6. Assuming predicates Parent (x, y) and Female (x), and constants Mona and Kareem.
Express each of the following in first-order logic. (You may use the abbreviation
∃1 to mean there exists ecactly one)
a) Mona has a daughter (possibly more than one, and possibly sons as well).
b) Mona has exactly one daughter (but may have sons as well).
c) Mona has exactly one child, a daughter.
d) Mona and Kareem have exactly one child together.
e) Mona has at least one child with Kareem, and no children with anyone else

You might also like