Tutorial First Order Predicate Logic Foundations of Computing

  • Slides: 7
Download presentation
Tutorial – First Order (Predicate) Logic Foundations of Computing Science INDIAN INSTITUTE OF TECHNOLOGY

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

Convert to Normal Form Express the statements below in FOL and convert each to

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 Student. Of(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. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR 2 • There exists a philosopher with students

Reasoning using Predicate Logic Consider the following statements: A topper is a student with

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. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR 3 • 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. • G 1: Raj is the topper • G 2: Every topper dislikes everyone

Encode the following sentences in FOL: • Jack owns a dog • Every dog

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 INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR 4 Did Curiosity kill the cat?

Questions 1. What is the meaning of the following FOL formulas? i. bought(Frank, dvd)

Questions 1. What is the meaning of the following FOL formulas? i. bought(Frank, dvd) ii. ∃x. bought(Frank, x) iii. ∀x(bought(Frank, x) → bought(Susan, x)) iv. ∀x. bought(Frank, x) → ∀x. bought(Susan, x) v. ∀x∃y. bought(x, y) INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR 5 vi. ∃x∀y. bought(x, y)

Questions 2. Define an appropriate language and formalize the following sentences using FOL formulas.

Questions 2. Define an appropriate language and formalize the following sentences using FOL formulas. i. Bill has at least one sister. ii. Bill has no sister. iii. Bill has at most one sister. iv. Bill has (exactly) one sister. v. Bill has at least two sisters. vi. Every student takes at least one course. vii. Only one student failed Geometry. ix. Every student who takes Analysis also takes Geometry. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR 6 viii. No student failed Geometry but at least one student failed Analysis.

Questions 3. Which of the following formulas is a formalization of the sentence: "There

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))) INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR 7 • ∃x. (Computer(x) ∧ ∀y. (Student(y) → ¬Uses(y, x)))