Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial – First Order (Predicate) Logic

Similar presentations


Presentation on theme: "Tutorial – First Order (Predicate) Logic"— Presentation transcript:

1 Tutorial – First Order (Predicate) Logic
Foundations of Computing Science Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

2 Convert to Normal Form Express the statements below in FOL and convert each to Normal Form using the predicates: Phil(x) : x is a Philosopher Book(x): x is a Book Write(x,y): x writes book y StudentOf(y,x): y is a student of x. Read(x,y): x reads y Every philosopher writes at least one book All students of a philosopher read one of their teacher’s books. There exists a philosopher with students INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

3 Reasoning using Predicate Logic
Consider the following statements: A topper is a student with highest CGPA. For each topper, either everyone likes the topper or the topper dislikes everyone. Raj dislikes everyone. Express these statements in first-order logic. Use meaningful predicate names, such as, Topper(x), Likes(x, y) (for x likes y). Convert the statements into normal form. For each of the following statements, determine whether it is entailed from the above statements. For the ones that are entailed, provide a resolution-refutation proof. For the ones that are not entailed (if any), provide a justification. G1: Raj is the topper G2: Every topper dislikes everyone INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

4 Did Curiosity kill the cat?
Encode the following sentences in FOL: Jack owns a dog Every dog owner is an animal lover No animal lover kills an animal Either Jack or Curiosity killed the cat, who is named Tuna Did Curiosity kill the cat? INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

5 Questions What is the meaning of the following FOL formulas?
bought(Frank, dvd) ∃x.bought(Frank, x) ∀x(bought(Frank, x) → bought(Susan, x)) ∀x.bought(Frank, x) → ∀x.bought(Susan, x) ∀x∃y.bought(x, y) ∃x∀y.bought(x, y) [Question 3.6] INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

6 Questions 2. Define an appropriate language and formalize the following sentences using FOL formulas. Bill has at least one sister. Bill has no sister. Bill has at most one sister. Bill has (exactly) one sister. Bill has at least two sisters. Every student takes at least one course. Only one student failed Geometry. No student failed Geometry but at least one student failed Analysis. Every student who takes Analysis also takes Geometry. [Question 3.6] INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

7 Questions 3. Which of the following formulas is a formalization of the sentence: "There is a computer which is not used by any student” ∃x.(Computer(x) ∧ ∀y.(¬Student(y) ∧ ¬Uses(y, x))) ∃x.(Computer(x) → ∀y.(Student(y) → ¬Uses(y, x))) ∃x.(Computer(x) ∧ ∀y.(Student(y) → ¬Uses(y, x))) [Question 3.6] INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR


Download ppt "Tutorial – First Order (Predicate) Logic"

Similar presentations


Ads by Google