Presentation is loading. Please wait.

Presentation is loading. Please wait.

FIRST ORDER LOGIC Berat YILMAZ. BEFORE START, LETS REMEMBER Logic Syntax Semantics.

Similar presentations


Presentation on theme: "FIRST ORDER LOGIC Berat YILMAZ. BEFORE START, LETS REMEMBER Logic Syntax Semantics."— Presentation transcript:

1 FIRST ORDER LOGIC Berat YILMAZ

2 BEFORE START, LETS REMEMBER Logic Syntax Semantics

3 PROPOSıTıONAL LOGıC VS FıRST-ORDER LOGıC Propositional logic: We have Facts Belief of agent: T|F|UNKNOWN

4 First-Order Logic: We have Facts Objects Relations

5 Propositional logic: Sentence-> Atomic|Complex Sentences Atom-> True|False|AP AP-Basic Propositions Complex Sentences-> |Sentence Connective Sentence |¬ Sentence Connective-> ^| v| |=>

6 First-Order Logic: Syntax Constant -> A|5|Something.. Variable -> a|y|z Predicate -> After|HasBorder|Snowing.. Function -> Father|Sine|…

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.

8 FUNCTIONS Predicates has true or false value But.. Functions have an event. Can return a value.. Numeric for example..

9 EXAMPLE Everyone loves its father.  x  y Father(x,y)  Loves(x,y) x Father(x)  x Loves(x,Father(x))

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 -> 

11 WHY WE CALL FIRST ORDER Because we are allowing quantifications over variables, not on predicates;  P  x  y P(x,y) (More Complex)

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

13 FIRST WAY:  x Student(x)  Takes(AI,x)  Takes(CG,x) 

14 SECOND WAY  x Student(x)   Takes(AI,x)  Takes(CG,x) 

15 EXAMPLE 2 The Best Score in AI is better than the best score in CG? How we do, what we need?

16 A ‘Function’ which returns the score value: So Function: Score(course,student) After? Another Function or A Predicate?

17 A PREDICATE Greater(x,y): x>y

18 SOLUTION Solution:  x  Student(x)  Takes(AI)  y  Student(y)  Takes(CG)  Greater(Score(AI),Score(CG)) 

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??

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

21 THANK YOU FOR LıSTENıNG


Download ppt "FIRST ORDER LOGIC Berat YILMAZ. BEFORE START, LETS REMEMBER Logic Syntax Semantics."

Similar presentations


Ads by Google