Download presentation

Presentation is loading. Please wait.

Published byFrancine Cole Modified over 2 years ago

1
INTRODUCTION TO ARTIFICIAL INTELLIGENCE Massimo Poesio LECTURE 3: Logic: predicate calculus, psychological evidence

2
PREDICATE CALCULUS The propositional calculus is only concerned with connectives – statements not containing connectives are left unanalyzed Massimo is happy: p In predicate calculus, or predicate logic, atomic statements are decomposed into TERMS and PREDICATES – Massimo is happy: HAPPY(m) – Students like AI: LIKE(students,AI) In this way it is possible to state general properties about predicates: for instance, every professor at the University of Trento is happy, etc.

3
FIRST-ORDER LOGIC Predicate calculus becomes FIRST ORDER LOGIC when we add QUANTIFIERS – logical symbols that make it possible to make universal and existential statements (i.e., to translate statements A, E, I and O of syllogisms)

4
THE EXISTENTIAL QUANTIFIER Used to traduce statements like – Some birds are swallows Notation: – ∃ (backwards E, for Exist – Peano, 1890) – ‘Some birds are swallows’ – There exists an x, such that x is a bird, and x is a swallow – ( ∃ x) (BIRD(x) & SWALLOW(x))

5
THE UNIVERSAL QUANTIFIER To represent – All men are mortal – But also: Swallows are birds Notation: – ∀ for inverted A (alle) Conversion of universal statements requires conditional: – For every x, is x is a man, then x is mortal – ( ∀ x) (MAN(x) → MORTAL(x))

6
THE SYNTAX OF FOL: VOCABULARY TERMS – Constants – Variables PREDICATES: 1 argument ( HAPPY), two arguments (LIKES), etc CONNECTIVES (from the propositional calculus): ~, &, ∨, →, ↔ QUANTIFIERS: ∀ ∃

7
THE SYNTAX OF FOL: PHRASES If P is an n-ary predicate and t 1, … t n are terms, then P(t 1,…,t n ) is a formula. If φ and ϕ are formulas, then ~φ, φ & ϕ, φ ∨ ϕ, φ →ϕ and φ ↔ ϕ are formulas If ϕ is a formula and x is a variable, then ( ∀ x) ϕ and ( ∃ x) ϕ are formulas.

8
SCOPE AND BINDING Let x be a variable and ϕ a formula, and let ( ∀ x) ϕ and ( ∃ x) ϕ be formulas. then ϕ is the SCOPE of x in these formulas. An occurrence of x is BOUND if it occurs in the scope of ( ∀ x) or ( ∃ x) Examples (PMW p. 141)

9
THE SEMANTICS OF FOL As in the case of propositional calculus, statements (formulas) can be either true or false But the other phrases of the language have set-theoretic meanings: – Terms denote set elements – Unary predicates denote sets – N-ary predicates denote n-ary relations – Quantifiers denote relations between sets

10
SET THEORY RECAP HAPPY PEOPLE John Matilda Fred Lucy HAPPY(m) = T HAPPY(f) = F Massimo

11
SET THEORY RECAP: RELATIONS PEOPLE John Matilda Fred LIKES(j,AI) = T LIKES(m,Maths) = F Massimo SUBJECTS AI Logic Maths

12
SET THEORY RECAP: QUANTIFIERS SWALLOWS Tweety Lou Roger Loreto Swallows are birds BIRDS Airplane1 AIRPLANES FLYING THINGS Birds fly

13
THE SEMANTICS OF FOL If t is a term and P a unary predicate, then [P(t)] = TRUE iff [t] ∈ [P] If φ and ϕ are formulas, then – [~φ] = TRUE iff [φ] = FALSE – [φ & ϕ] = TRUE iff [φ] = TRUE and [ϕ] = TRUE [( ∀ x) ϕ] = TRUE iff for every value a for x in model M, [ϕ(a/x)] = TRUE [( ∃ x) ϕ] = TRUE iff there is at least one object a in model M such that [ϕ(a/x)] = TRUE

14
SOME TAUTOLOGIES OF FOL Laws of Quantifier Distribution: – ( ∀ x) (φ(x) & ϕ(x)) ≡ ( ∀ x) φ(x) & ( ∀ x) ϕ(x) – “Every object is formed of elementary particles and has a spin” iff “Every object is formed of elementary particles” and “Every object has a spin” Law of Quantifier Negation: – ~ ( ∀ x) (φ(x)) ≡ ( ∃ y) (~ φ(y)) – “It is not the case that every object is made of cheese” iff “there is an object which is not made of cheese”

15
FROM SYLLOGISMS TO FOL Four types of syllogism: – Universal affirmative: All Ps are Qs – Universal negative: All Ps are not Qs (No P is a Q) – Particular affirmative: Some P is a Q – Particular negative: Some P is not a Q

16
THE SQUARE OF OPPOSITION AFFIRMATIVENEGATIVE UNIVERSALA (Adfirmo)E (nEgo) PARTICULARI (adfIrmo)O (negO)

17
THE SQUARE OF OPPOSITION

18
FROM SYLLOGISMS TO FOL Syllogism in FOL: – Universal affirmative: ( ∀ x) (P(x) → Q(x)) – Universal negative: ( ∀ y) (P(y) → ~ Q(y)) – Particular affirmative: ( ∃ z) (P(z) & Q(z)) – Particular negative: ( ∃ w) (P(w) & ~ Q(w))

19
FROM SYLLOGYSM TO FOL A Birds fly A Swallows are birds A Swallows fly An example of BARBARA:

20
BARBARA IN PREDICATE CALCULUS ( ∀ x) (BIRD(x) → FLY(x)) ( ∀ y) ( SWALLOW(y) → BIRD(y)) ( ∀ z) ( SWALLOW(z) → FLY(z))

21
SET THEORETIC DEMONSTRATIONS OF VALIDITY OF SYLLOGISMS A: All Ps are Qs P Q Q R A: All Qs are Rs R A: All Ps are Rs P (A more general method exists)

22
REPRESENTING KNOWLEDGE IN LOGIC, 2 Modern logics make it possibile to represent every type of knowledge Different types of knowledge have different EXPRESSIVE POWER

23
REPRESENTING KNOWLEDGE IN LOGIC, 2 “Tutte le biciclette hanno due ruote” Propositional calculus: p Predicate logic + quantifiers: – ( ∀ x) (BICYCLE(x) → HAS_TWO_WHEELS(x)) – Can be used to represent DARII Explicit representation of the number 2: – ( ∀ x) (BICYCLE(x) → HAS_WHEELS(x,2)) Set of wheels:

24
DEDUCTION IN FOL The system of inference rules for FOL includes all the inference rules from the propositional calculus, together with four new rules for quantifier introduction and elimination The tableaus system has also been extended

25
NATURAL DEDUCTION FOR FOL, 1 ( ∀ y) P(y) ∴ P(c) (for any constant c) UNIVERSAL INSTANTIATION ∴ ( ∀ y) P(y) P(c) (for any constant c) UNIVERSAL GENERALIZATION

26
UI AND UG EXAMPLES ( ∀ y) MADE-OF-ATOMS(y) ∴ MADE-OF-ATOMS(c) (for any c) UNIVERSAL INSTANTIATION

27
NATURAL DEDUCTION FOR FOL, 2 ( ∃ y) P(y) ∴ P(k) (for a new k) EXISTENTIAL INSTANTIATION ∴ ( ∃ y) P(y) P(c) (for a constant c) EXISTENTIAL GENERALIZATION

28
BEYOND FIRST ORDER LOGIC Artificial Intelligence research moved beyond first order logic in several directions: – Beyond using logic as a formalization of valid inference only, developing logics for non-valid (or NONMONOTONIC / UNCERTAIN) reasoning – Developing simpler logics in which inference can be done more efficiently (description logics, discussed in later lectures)

29
PSYCHOLOGICAL EVIDENCE ON REASONING First order logic and the propositional calculus are good formalizations of ‘sound’ reasoning, and are therefore the basis for work on proving mathematical truths But are they a good formalization of the way people reason? Evidence suggests that this is not the case – The WASON SELECTION TASK perhaps the best known example of this evidence

30
THE WASON SELECTION TASK Subjects are asked to verify the truth of a statement (typically, a conditional statement) by turning over cards

31
WASON TEST: EXAMPLE If A CARD SHOWS AN EVEN NUMBER ON ONE SIDE, then THE OPPOSITE FACE IS RED Answer: the second and fourth card

32
READINGS Basics: B. Partee, A. ter Meulen, R. Wall, Mathematical Methods in Linguistics, Springer, ch. 5, 6, 7 (in Italian): D. Palladino, Corso di Logica, Carocci To know more: History of logic: P. Odifreddi, Le menzogne di Ulisse, Tea, ch. 1-7 Inference: P. Blackburn, J. Bos, Representation and Inference for Natural Language, CSLI K. Stenning and M. van Lambalgen, Human Reasoning and Cognitive Science, MIT Press Logic on the Web: – http://www.thelogiccourse.com/ http://www.thelogiccourse.com/ – Do the Wason selection task: http://coglab.wadsworth.com/experiments/WasonSelection.shtml

Similar presentations

OK

Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)

Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on area of a parallelogram worksheet Ppt on surface chemistry class 12 Ppt on endangered species of flora and fauna in india Interactive ppt on male reproductive system Ppt on itc group of hotels Ppt on economic order quantity assumptions Ppt on airport automation Ppt on hong kong tourism Ppt on programmable logic array application Ppt on bluetooth hacking