# first order logic berat yilmaz. before start, lets remember logic syntax semantics

Post on 24-Dec-2015

215 views

Category:

## Documents

Tags:

• #### xy slide

Embed Size (px)

TRANSCRIPT

• Slide 1
• FIRST ORDER LOGIC Berat YILMAZ
• Slide 2
• BEFORE START, LETS REMEMBER Logic Syntax Semantics
• Slide 3
• PROPOSTONAL LOGC VS FRST-ORDER LOGC Propositional logic: We have Facts Belief of agent: T|F|UNKNOWN
• Slide 4
• First-Order Logic: We have Facts Objects Relations
• Slide 5
• Propositional logic: Sentence-> Atomic|Complex Sentences Atom-> True|False|AP AP-Basic Propositions Complex Sentences-> |Sentence Connective Sentence | Sentence Connective-> ^| v| |=>
• Slide 6
• First-Order Logic: Syntax Constant -> A|5|Something.. Variable -> a|y|z Predicate -> After|HasBorder|Snowing.. Function -> Father|Sine|
• Slide 7
• PREDICATES Can have one or more arguments Like: P(x,y,z) x,y,z are variables If for that selected x,y,z values are true, then predicate is true.
• Slide 8
• FUNCTIONS Predicates has true or false value But.. Functions have an event. Can return a value.. Numeric for example..
• Slide 9
• EXAMPLE Everyone loves its father. x y Father(x,y) Loves(x,y) x Father(x) x Loves(x,Father(x))
• Slide 10
• SYNTAX OF FOL Sentece-> Atomic Sentence |Sentence Connective Sentence |Quantifier Variable, . Sentence | Sentence | (Sentence) Atomic Sentence -> Predicate (Term, .)|Term=Term Term->Function(Term,) |Constant | Variable Connective -> Quantifier ->
• Slide 11
• WHY WE CALL FIRST ORDER Because we are allowing quantifications over variables, not on predicates; P x y P(x,y) (More Complex)
• Slide 12
• EXAMPLE 1 Not all students takes both AI & Computer Graphics Course Student(x) = x is a student Takes(x,y) = Subject x is taken by y
• Slide 13
• FIRST WAY: x Student(x) Takes(AI,x) Takes(CG,x)
• Slide 14
• SECOND WAY x Student(x) Takes(AI,x) Takes(CG,x)
• Slide 15
• EXAMPLE 2 The Best Score in AI is better than the best score in CG? How we do, what we need?
• Slide 16
• A Function which returns the score value: So Function: Score(course,student) After? Another Function or A Predicate?
• Slide 17
• A PREDICATE Greater(x,y): x>y
• Slide 18
• SOLUTION Solution: x Student(x) Takes(AI) y Student(y) Takes(CG) Greater(Score(AI),Score(CG))
• Slide 19
• RUSSEL PARADOX There is a single barber in town Those and only those who do not shave themselves are shaved by the barber So who shaves the barber??
• Slide 20
• WAY TO SOLUTION x Barber(x) y x y Barber(y) That means there is only one barber in the town x Shaves(x,x) Shaves(x,y) Barber(y) That means y is in the domain of x, so member of town and not shaves itself but shaved by barber
• Slide 21
• THANK YOU FOR LSTENNG

Recommended