Chapter 4 Predicate Logics

Slides:



Advertisements
Similar presentations
Colors and Numbers.
Advertisements

This is a self running presentation that lasts about 4 minutes, and loops continuously until escape is pressed. The text appears one word at a time to.
The Foundations: Logic and Proofs
1. An Overview of Prolog.
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Introduction to PROLOG ME 409 Lab - 1. Introduction to PROLOG.
1 Logic Programming. 2 A little bit of Prolog Objects and relations between objects Facts and rules. Upper case are variables. parent(pam, bob).parent(tom,bob).
Logic Use mathematical deduction to derive new knowledge.
FLYING ANIMALS LAND ANIMALS WATER ANIMALS EXIT FLYING ANIMALS - GO FOR A RIDE - EXERCISES.
Bill Martin Jr. and Eric Carle
BROWN BEAR, BROWN BEAR, WHAT DO YOU SEE?
Lets look at some animals ....
Hi! I am Sally. A pronoun can replace a noun. We use pronouns so that we do not have to keep repeating the noun. What is a pronoun?
COSC 2P93 Logic Programming Instructor: Brian Ross Instructor: Brian Ross Texts: Texts: Prolog Programming for Artificial Intelligence,4e, Ivan Bratko,
ALL ABOUT ME By:Dawngi,van. THINGS I LIKE TO DO I like to swim, play outside, play with my friends, and be with my family.
Animals in our life. This animal is small. It lives in the forest. It’s grey or white. It runs very fast and it is afraid of everything. It likes carrot.
Possum by Timothy F. Mrs.Zoanetti Appearance Silver, Gray, Silver-Gray, Brown, Dark Red, Black, Gold. Long Tail, Fur, Females have babies in a pouch.
Created by Mrs. Lamb’s Class Next Page. What am I? Clue #1 I have a stinger. Clue #2 I have black stripes. Clue #3 I have yellow stripes too. Clue #4.
Chapter 2 Syntax and meaning of Prolog Programs LP and Prolog Chapter 22 PROLOG domains variable name = type predicates relation(variable name,
Part 3: Compound Subjects & Predicates Copyright © 2011 Kelly Mott.
Unit 3 Language in use Module 6 A trip to the zoo.
Chapter 7 Turbo Prolog Chapter 7 Turbo Prolog Artificial Intelligence ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์ คณะ วิทยาศาสตร์ มหาวิทยาลัยสงขลานครินทร์
ANT פורית אברמוב. DOG פורית אברמוב CAT פורית אברמוב.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
$1,000,000 $500,000 $100,000 $50,000 $10,000 $5000 $1000 $500 $200 $100 Is this your Final Answer? YesNo Who is the king of the Jungle? Lion Tiger Horse.
ANIMAL WORLD.
Watch the powerpoints. What is the bird doing? The bird is flying.
What You’re Called and What You Eat. Animals need to eat.  Here’s a fact you know is true every time your tummy growls: animals need to eat. Some animals.
Look at my cat! Tricks she can do. I love my cat, She loves me, too
Propositional & Predicate Calculus _I
Készítette: Harsányiné Tóth Tímea. Have got / has got 1. I ……………………. a big dog. 2. She ……………….. two sisters. 3. He ……………….. three cats. 4. I …………………..
Загадки о животных (Animals). My name is Jack. I'm very big. My name is Jack. I'm very big. I am white. I have four legs. I am white. I have four legs.
By Ms. Calkins’ Class Spring 2015
I see colors.. I see a blue bird. I see a yellow sun.
eraser sharpener textbook Whose textbook is this? It's mine.
Welcome to the Neverland Bagaeva I. N.. Is it …?
Brown Bear, What Do You See?. Brown Bear by Annabelle.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z English Alphabet.
I see a red bird Brown Bear, Brown Bear, looking at me. What do you see?
Naming Part.
Terezka Tunegová 6.A English.  This is my dog Roxie.  I must feed every day.  She is sleeping at the moment.  Do you like dogs ?
«Незнайка в мире животных» Цели урока: Цели урока: 1) Развитие навыков чтения; 2) Повторение правил чтения буквосочетания th и буквы x. Закрепление навыков.
1.What will happen if you are late for class? 2. What will happen if you don’t prepare for an exam? 3. What will happen if you don’t finish the homework.
A sentence in English What we need to write a sentence.
Brown Bear, Brown Bear, What Do You See?
Colors brown red yellow blue green purple white gold.
Brown Bear, Brown Bear, What Do You See. Written by Bill Martin, Jr
Carnivores, herbivores and omnivores
This is a frog. This is a green frog..
How are you. How is your mother/father/…. Where are you from
How are you. How is your mother/father/…. Where are you from
I see colors..
Hi! I am Sally. Pronouns.
Grammar.
Выерите и прочитайте слова со звуком [e], [eI], затем со звуком [ae], a затем со звуком[I]:
ANIMAL QUIZ What do we know about animals? CLIL Unit Lesson 5
Prolog programming Introduction to Prolog
Unit 4 Grammer Part B.
Brown Bear, Brown Bear, What Do You See?
Prolog programming Introduction to Prolog (part2)
ENGLISH LESSON BY : Stoina Moskova.
Types animals.
Subjects and Predicates
I see colors..
Prolog programming Introduction to Prolog (part4)
Quiz “Animals” START Gitulyar M.V..
Introduction to Computational Linguistics
Olga Ashurkova Belgorod State University
Part 3: Compound Subjects & Predicates
Presentation transcript:

Chapter 4 Predicate Logics

Representing simple facts in logic The End It is raining. RAINING If it is raining then it is not sunny. RAINING  ~ SUNNY All men are motal. MORTALMAN man(mortal) X : man(X)  mortal(X) 1. Change sentences 1–8 on page 134 to predicate logic. 2. prove ~loyalto(Marcus,Caesar) on page 136 Fig. 5.2 344-471 AI & ES Chapter 4

Representing Instance and Isa Figure 5.3 page 138. : representing class membership 344-471 AI & ES Chapter 4

Computable functions and predicate The End Figure 5.4 page 142. :a set of facts about Marcus 344-471 AI & ES Chapter 4

Computable functions and predicate Figure 5.5 page 143. : Prove Marcus is dead 344-471 AI & ES Chapter 4

Propositional Logic Given Axioms Converted to Clause Form P P (P Q) R ~P v ~Q v R (S v T)  Q ~S v Q ~T v Q T T 344-471 AI & ES Chapter 4

EX05EX05 can_swim can_swim(What) , predicates type(symbol, symbol) is_a(symbol, symbol) lives(symbol, symbol) can_swim(symbol) goal can_swim(What) , write("A ", What, " can swim."). clauses type(ungulate, animal). type(fish, animal). is_a(zebra, ungulate). is_a(herring, fish). is_a(shark, fish). lives(zebra, on_land). lives(frog, on_land). lives(frog, in_water). lives(shark, in_water). can_swim(Y) :- type(X, animal) , is_a(Y, X) , lives(Y, in_water). 344-471 AI & ES Chapter 4

predecessor Z X Y parent parent sister For any X and Y, X is a sister of Y if Both X and Y have the same parent, and X is a female. Sister(X,Y) :- parent(Z,X), parent(Z,Y), female(X). 344-471 AI & ES Chapter 4

predecessor A B C D E parent parent parent parent 344-471 AI & ES Chapter 4

predecessor A B C D E predecessor(X,Z) :- parent(X,Y), parent(Y,Z). parent(Y1,Y2), parent(Y2,Z). parent B parent C predecessor(X,Z) :- parent(X,Y1), parent(Y1,Y2), parent(Y2,Y3), parent(Y3,Z). parent D parent E 344-471 AI & ES Chapter 4

Parent1.Pro parent(jim,joe). 344-471 AI & ES Chapter 4 predicates parent(symbol,symbol) predecessor(symbol,symbol) clauses parent(pam,bob). parent(tom,bob). parent(bob,ann). parent(ann,jim). parent(jim,joe). parent(joe,john). parent(john,jack). parent(tom,liz). pam bob ann jim joe john jack predecessor(X,Z) :- parent(X,Z). predecessor(X,Z) :- parent(X,Y), parent(Y,Z). predecessor(X,Z) :- parent(X,Y1),parent(Y1,Y2),parent(Y2,Z). predecessor(X,Z) :- parent(X,Y1),parent(Y1,Y2),parent(Y2,Y3) parent(Y3,Z). 344-471 AI & ES Chapter 4

predecessor A B C D E For all X and Z, X is a predecessor of Z if there is a Y such that 1. X is a parent of Y and 2. Y is a predecessor of Z. A parent B parent C parent D parent E 344-471 AI & ES Chapter 4

Parent2.Pro parent(jim,joe). predecessor(X,Z) :- parent(X,Z). predicates parent(symbol,symbol) predecessor(symbol,symbol) clauses parent(pam,bob). parent(tom,bob). parent(bob,ann). parent(ann,jim). parent(jim,joe). parent(joe,john). parent(john,jack). parent(tom,liz). predecessor(X,Z) :- parent(X,Z). predecessor(X,Z) :- parent(X,Y), predecessor(Y,Z). 344-471 AI & ES Chapter 4

ISA Relationship isa isa isa isa isa isa isa isa isa isa isa Animal kingdom Plant kingdom isa isa isa Animal Human plant isa isa isa isa Dog Cat Suwit Sunee Flower isa isa isa isa Toop Mew Rose Carnation 344-471 AI & ES Chapter 4

isa1.Pro 344-471 AI & ES Chapter 4 is(X,Z) :- isa(X,Z). predicates isa(symbol,symbol) is(symbol,symbol) clauses isa(human,animal_kingdom). isa(plant,plant_kingdon). isa(flower,plant). isa(rose,flower). isa(carnation,flower). isa(suwit,human). isa(sunee,human). isa(dog,animal). isa(animal,animal_kingdom). isa(cat,animal). isa(toop,dog). isa(mew,cat). isa(white,cat). is(X,Z) :- isa(X,Z). is(X,Z) :- isa(X,Y), is(Y,Z). 344-471 AI & ES Chapter 4

bear.Pro ?black(X),big(X) ?brown(X),big(X) ?big(X),black(X) predicates big(symbol) small(symbol) brown(symbol) black(symbol) gray(symbol) dark(symbol) clauses big(bear). big(elephant). small(cat). brown(bear). black(cat). gray(elephant). dark(Z) :- black(Z). dark(Z) :- brown(Z). ?black(X),big(X) ?brown(X),big(X) ?big(X),black(X) ?black(X), big(X) No solution ?brown(X),big(X) X=bear ?big(X),black(X) 344-471 AI & ES Chapter 4

One that would have the fruit must climb the tree