artificial intelligence

19
1

Upload: palmer-duncan

Post on 31-Dec-2015

21 views

Category:

Documents


0 download

DESCRIPTION

Artificial Intelligence. Predicate & Propositional Calculus. It is a representation language for AI Its advantages include: Well defined formal semantics Complete inference rules This part reviews propositional calculus and then describes predicate calculus. Propositional Calculus. - PowerPoint PPT Presentation

TRANSCRIPT

1

It is a representation language for AI Its advantages include:1. Well defined formal semantics2. Complete inference rules

This part reviews propositional calculus and then describes predicate calculus

2

Symbols:P, Q, R, S, …{Propositions or statements about the world that may be either true or false}

Truth symbols:true, false

Connectives: ¬

3

Every propositional symbol and truth symbol is a sentenceexample: true, P, Q, R are sentences

The negation of a sentence is a sentenceexample: ¬P , ¬false are sentences

The conjunction (and) of two sentences is a sentenceexample: P ¬P is a sentence

4

The disjunction (or) of two sentences is a sentenceexample: P ¬P is a sentence

The implication of one sentence from another is a sentenceexample: P Q is a sentence

The equivalence of two sentences is a sentenceexample: P v Q R is a sentence

5

In P Q, P and Q are called conjuncts

In P Q, P and Q are called disjuncts

In P Q, P is called premise or antecedent and Q the conclusion or consequent

6

( ) and [ ] are used to group symbols to control their order of evaluation and meaning:

( P Q ) R is different from P ( Q R )

7

An expression is a sentence or well-defined formula of the propositional calculus if and only if it can be formed of legal symbols through some sequence of these rules.

Example:((P Q) R ) ¬ P ¬ Q R

8

P, Q and R are propositions and thus sentences

P Q, conjunction is a sentence (P Q) R , implication is a sentence ¬ P and ¬ Q, negation is a sentence ¬ P ¬ Q, disjunction is a sentence ¬ P ¬ Q R disjunction is a sentence ((P Q) R ) ¬ P ¬ Q R, equivalence is a

sentence

9

Because AI programs must reason with their representational structures, it is important to demonstrate that the truth of their conclusion depends only on the truth of their initial knowledge, i.e. the logical errors are not introduced by the inference procedures.

10

It is the assignment of T or F to each propositional symbol

, and ¬ follow the normal truth tables gives F only if the precedent is T and the

consequent is F. (Otherwise T) gives T only when both expressions have

same truth assignment

11

P Q ¬P ¬PQ PQ (¬PQ) (PQ)

T T F T T T

T F F F F T

F T T T T T

F F T T T T

12

1. ¬(¬P) P2. (PQ) (¬P Q)3. (PQ) (¬Q ¬P)4. ¬(PQ) (¬P ¬Q)5. ¬(PQ) (¬P ¬Q)6. (P Q) (Q P)7. (P Q) (Q P)8. ((P Q) R) (P (Q R))9. ((P Q) R) (P (Q R))10. P ( Q R ) (P Q ) (P R)11. P ( Q R ) (P Q ) (P R)

13

Example:KB = { Mike comes to the party;

If Cathy comes to the party then Becky comes;

If Cathy doesn't come then Mike won't come to the party}

Let:M represent Mike comes to the party.C represent Cathy comes to the party.B represent Becky comes to the party.

KB = { M, C B, ¬C ¬M}(N.B. statements in the KB are implicitly connected by ^)

14

Show that:(P Q) ( Q P) (PQ) (PQ)

15

16

P Q (PQ)1 (QP)2 12 (PQ)3 (PQ)4 3 4

T T T T T T T T T

T F F T F T F F T

F T T F F T F F T

F F T T T F F T T

If the sentences P and P Q are known to be true, then modus ponens lets us infer Q.

If the sentence P Q is known to be true, and the sentence Q is known to be false, modus tollens lets us infer P.

17

And elimination lets us infer the truth of either of the conjuncts from the truth of a conjunctive sentence. For instance, P Q lets us conclude both P and Q are true.

And introduction allows us to infer the truth of a conjunction from the truth of its conjuncts. For instance, if P and Q are true, then P Q is true.

18

Universal instantion states that if any universally quantified variable in a true sentence is replaced by any appropriate term from the domain, the result is a true sentence. Thus, if a is from the domain of X, X P(X) lets us infer P(a).

19