classical and fuzzy logic vtu

162
1 CLASSICAL LOGIC AND FUZZY LOGIC Dr S.Natarajan Professor Department of Information Science and Engineering PESIT, Bangalore Classical Predicate Logic – tautologies, Contradictions, Equivalence, Exclusive Or Exclusive Nor, Logical Proofs, Deductive Inferences Fuzzy Logic, Approximate Reasoning, Fuzzy Tautologies, Contradictions, Equivalence and Logical Proofs, Other forms of the Implication Operation, Other forms of the Composition Operation

Upload: natarajan-subramanyam

Post on 02-Dec-2014

140 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: Classical and Fuzzy Logic Vtu

1

CLASSICAL LOGIC AND FUZZY LOGIC

Dr S.Natarajan Professor Department of Information Science and Engineering PESIT, Bangalore

Classical Predicate Logic – tautologies, Contradictions, Equivalence, Exclusive Or Exclusive Nor, Logical Proofs, Deductive InferencesFuzzy Logic, Approximate Reasoning, Fuzzy Tautologies, Contradictions, Equivalence and Logical Proofs, Other forms of the Implication Operation, Other forms of the Composition Operation

Page 2: Classical and Fuzzy Logic Vtu

2

Python logic

Tell me what you do with witches?BurnAnd what do you burn apart from witches? More witches! Shh! Wood! So, why do witches burn? [pause] B--... 'cause they're made of... wood? Good! Heh heh. Oh, yeah. Oh. So, how do we tell whether she is made of wood? []. Does wood sink in water? No. No. No, it floats! It floats! Throw her into the pond! The pond! Throw her into the pond! What also floats in water? Bread! Apples! Uh, very small rocks!

ARTHUR: A duck! CROWD: Oooh. BEDEVERE: Exactly. So, logically... VILLAGER #1: If... she... weighs... the same as a duck,... she's made of wood. BEDEVERE:

And therefore? VILLAGER #2: A witch! VILLAGER #1: A witch!

10/14

Page 3: Classical and Fuzzy Logic Vtu

3

Page 4: Classical and Fuzzy Logic Vtu

4

Classical Logic

What is

LOGIC- Small part of Human body to reason

LOGIC- means to compel us to infer correct answers

What is

NOT LOGIC- Not responsible for our creativity or ability to

remember

LOGIC helps in organizing words to form words- not

context dependent

Page 5: Classical and Fuzzy Logic Vtu

5

Fuzzy Logic

FUZZY LOGIC is a method to formalize humancapacity to Imprecise learning called ApproximateReasoning

Such reasoning represents human ability to reason approximately and judge under uncertainty

In Fuzzy Logic --- all truths are partial or approximate Here, the reasoning has been termed as Interpolative reasoning

Page 6: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

6

Negation (NOT)Negation (NOT)

Unary Operator, Symbol: Unary Operator, Symbol:

PP PP

truetrue falsefalse

falsefalse truetrue

Page 7: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

7

Conjunction (AND)Conjunction (AND)

Binary Operator, Symbol: Binary Operator, Symbol:

PP QQ PPQQ

truetrue truetrue truetrue

truetrue falsefalse falsefalse

falsefalse truetrue falsefalse

falsefalse falsefalse falsefalse

Page 8: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

8

Disjunction (OR)Disjunction (OR)

Binary Operator, Symbol: Binary Operator, Symbol:

PP QQ PPQQ

truetrue truetrue truetrue

truetrue falsefalse truetrue

falsefalse truetrue truetrue

falsefalse falsefalse falsefalse

Page 9: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

9

Exclusive Or (XOR)Exclusive Or (XOR)

Binary Operator, Symbol: Binary Operator, Symbol:

PP QQ PPQQ

truetrue truetrue falsefalse

truetrue falsefalse truetrue

falsefalse truetrue truetrue

falsefalse falsefalse falsefalse

Page 10: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

10

Implication (if - then)Implication (if - then)

Binary Operator, Symbol: Binary Operator, Symbol:

PP QQ PPQQ

truetrue truetrue truetrue

truetrue falsefalse falsefalse

falsefalse truetrue truetrue

falsefalse falsefalse truetrue

Page 11: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

11

Biconditional (if and only if)Biconditional (if and only if)

Binary Operator, Symbol: Binary Operator, Symbol:

PP QQ PPQQ

truetrue truetrue truetrue

truetrue falsefalse falsefalse

falsefalse truetrue falsefalse

falsefalse falsefalse truetrue

Page 12: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

12

Statements and OperatorsStatements and OperatorsStatements and operators can be combined in any Statements and operators can be combined in any

way to form new statements.way to form new statements.

PP QQ PP QQ ((P)P)((Q)Q)

truetrue truetrue falsefalse falsefalse falsefalse

truetrue falsefalse falsefalse truetrue truetrue

falsefalse truetrue truetrue falsefalse truetrue

falsefalse falsefalse truetrue truetrue truetrue

Page 13: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

13

Statements and OperationsStatements and OperationsStatements and operators can be combined in any way Statements and operators can be combined in any way

to form new statements.to form new statements.

PP QQ PPQQ (P(PQ)Q) ((P)P)((Q)Q)

truetrue truetrue truetrue falsefalse falsefalse

truetrue falsefalse falsefalse truetrue truetrue

falsefalse truetrue falsefalse truetrue truetrue

falsefalse falsefalse falsefalse truetrue truetrue

Page 14: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

14

Equivalent StatementsEquivalent Statements

PP QQ (P(PQ)Q) ((P)P)((Q)Q) (P(PQ)Q)((P)P)((Q)Q)

truetrue truetrue falsefalse falsefalse truetrue

truetrue falsefalse truetrue truetrue truetrue

falsefalse truetrue truetrue truetrue truetrue

falsefalse falsefalse truetrue truetrue truetrue

The statements The statements (P(PQ) and (Q) and (P)P)((Q) are Q) are logically equivalentlogically equivalent, ,

because because (P(PQ)Q)((P)P)((Q) is always true.Q) is always true.

Page 15: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

15

Conditional (Implication)Conditional (Implication)

This one is probably the least intuitive. It’s only This one is probably the least intuitive. It’s only partly akin to the English usage of “if,then” or partly akin to the English usage of “if,then” or “implies”.“implies”.

DEF: DEF: p p q q is true if is true if q q is true, or if is true, or if pp is false. In is false. In the final case (the final case (pp is true while is true while qq is false) is false) p p q q is false.is false.

Semantics: “Semantics: “pp implies implies q q ” is true if one can ” is true if one can mathematically derive mathematically derive q q from from pp..

Page 16: Classical and Fuzzy Logic Vtu

16

Truth Tables

P Q P P Q P Q P Q PQ

False False True False False True True

False True True False True True False

True False False False True False False

True True False True True True True

Page 17: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

17

Tautologies and ContradictionsTautologies and Contradictions

A tautology is a statement that is always true.A tautology is a statement that is always true.

Examples: Examples: RR((R)R)(P(PQ)Q)((P)P)((Q)Q)

If SIf ST is a tautology, we write ST is a tautology, we write ST.T.If SIf ST is a tautology, we write ST is a tautology, we write ST. This symbol T. This symbol

is also used for logical equivalence.is also used for logical equivalence.

Page 18: Classical and Fuzzy Logic Vtu

September 5, 2006 Applied Discrete MathematicsWeek 1: Logic and Sets

18

Tautologies and ContradictionsTautologies and Contradictions

A contradiction is a statement that is alwaysA contradiction is a statement that is always

false.false.

Examples: Examples:

RR((R)R)

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

The negation of any tautology is a contra-The negation of any tautology is a contra-

diction, and the negation of any contradiction is diction, and the negation of any contradiction is

a tautology.a tautology.

Page 19: Classical and Fuzzy Logic Vtu

19

TAUTOLOGIES

Tautologies – Compound Propositions which are ALWAYS TRUE , irrespective of TRUTH VALUES of INDIVIDUAL SIMPLE PROPOSITIONS

APPLICATIONS- DEDUCTIVE REASONING, THEOREM PROVING , DEDUCTIVE INFERENCING ETC.,Example: A is a set of prime numbers given by (A1 =

1 , A2 = 2, A3 = 3, A4 = 5, A5 = 7, A6 = 11 …) on the real line universe X, then the proposition Ai is not divisible by 6 is A TAUTOLOGY

Page 20: Classical and Fuzzy Logic Vtu

20

Proof by Contradiction

• A method for proving A method for proving p p qq..

• Assume Assume pp, and prove that , and prove that pp ( (qq qq))

• ((qq qq) is a trivial contradiction, equal to ) is a trivial contradiction, equal to FF

• Thus Thus ppFF, which is only true if , which is only true if pp==FF

Page 21: Classical and Fuzzy Logic Vtu

21

Contradiction Proof Example

• Definition:Definition: The real number The real number rr is is rational rational if there if there exist integers exist integers p p and and q q ≠≠ 0, 0, with no common factors with no common factors other than 1 (i.e., gcd(other than 1 (i.e., gcd(pp,,qq)=1), such that )=1), such that r=p/q.r=p/q. A A real number that is not rational is called real number that is not rational is called irrational.irrational.

• Theorem:Theorem: Prove that is irrational. Prove that is irrational.2

Page 22: Classical and Fuzzy Logic Vtu

22

Page 23: Classical and Fuzzy Logic Vtu

23

Symbolic logic

• Definition– Language represented by a small set of symbols

reflecting the fundamental structure of reasoning with full precision.

• Propositional logic• Predicate logic

premiseconclusion

Page 24: Classical and Fuzzy Logic Vtu

24

Forms of reasoning

Page 25: Classical and Fuzzy Logic Vtu

25

The structure of propositional logic

• Simple proposition– A proposition that does not contain any other

proposition. (atomic proposition)

• Affirmative proposition– A proposition that contains no negating words or

prefixes.

A dog has four legs and tomorrow is Sunday.

Proposition p Proposition q

Complex proposition

Page 26: Classical and Fuzzy Logic Vtu

26

Logic Operations

Page 27: Classical and Fuzzy Logic Vtu

27

Negation

• p = 『 a dog has four legs 』• q = 『 Elvis is mortal 』

Truth table

Page 28: Classical and Fuzzy Logic Vtu

28

Conjunction

Page 29: Classical and Fuzzy Logic Vtu

29

Disjunction

Page 30: Classical and Fuzzy Logic Vtu

30

Implication

antecedent consequent

Page 31: Classical and Fuzzy Logic Vtu

31

Equivalence

Page 32: Classical and Fuzzy Logic Vtu

32

Classical Logic & Fuzzy Logic

Classical predicate logic

T: uU [0,1]

U: universe of all propositions.

All elements u U are true for proposition P are called the truth set of P: T(P).

Those elements u U are false for P are called falsity set of P: F(P).

T(Y) = 1 T(Ø) = 0

Page 33: Classical and Fuzzy Logic Vtu

33

Classical Logic &Fuzzy Logic

Logic connectives

Disjunction Conjunction Negation –Implication Equivalence

If xA, T(P) =1 otherwise T(P) = 0OrxA(x)={ 1 if x A, otherwise it is 0 }

If T(p)T()=0 implies P true, false, or true P false. P and are mutually exclusive propositions.

Page 34: Classical and Fuzzy Logic Vtu

34

Classical Logic &Fuzzy Logic

Given a proposition P: xA, P: xA, we have the following logical connectives:

Disjunction PQ: x A or x B hence, T(PQ) = max(T(P),T(Q))Conjunction PQ: xA and xB

hence T(P Q)= min(T(P),T(Q))Negation If T(P) =1, then T(P) = 0 then T(P) =1Implication (P Q): xA or xB Hence , T(P Q)= T(P Q)

Page 35: Classical and Fuzzy Logic Vtu

35

Classical Logic &Fuzzy Logic

Equivalence

1, for T(P) = T(Q)(P Q): T(PQ)=

0, for T(P) T(Q)

The logical connective implication, i.e.,P Q (P implies

Q) presented here is also known as the classical

implication.

P is referred to as hypothesis or antecedent

Q is referred to as conclusion or consequent.

Page 36: Classical and Fuzzy Logic Vtu

36

Classical Logic &Fuzzy Logic

T(PQ)=(T(P)T(Q))Or PQ= (AB is true)T(PQ) = T(PQ is true) = max (T(P),T(Q))(AB)= (AB)= ABSo (AB)= ABOr AB false AB

Truth table for various compound propositions

P Q P PQ PQ PQ PQ

T(1) T(1) F(0) T(1) T(1) T(1) T(1)

T(1) F(0) F(0) T(1) F(0) F(0) F(0)

F(0) T(1) T(1) T(1) F(0) T(1) F(0)

F(0) F(0) T(1) F(0) F(0) T(1) T(1)

Page 37: Classical and Fuzzy Logic Vtu

37General format:

– If x is A then y is B (where A & B are linguistic values defined by fuzzy sets on universes of discourse X & Y).

• “x is A” is called the antecedent or premise• “y is B” is called the consequence or

conclusion– Examples:

• If pressure is high, then volume is small.• If the road is slippery, then driving is dangerous.• If a tomato is red, then it is ripe.• If the speed is high, then apply the brake a little.

Fuzzy if-then rules

Page 38: Classical and Fuzzy Logic Vtu

38

– Meaning of fuzzy if-then-rules (A B)

• It is a relation between two variables x & y; therefore it is a binary fuzzy relation R defined on X * Y

• There are two ways to interpret A B:–A coupled with B–A entails B

if A is coupled with B then:

Fuzzy if-then rules (cont.)

Page 39: Classical and Fuzzy Logic Vtu

39

If A entails B then:

R = A B = A B ( material implication)

R = A B = A (A B) (propositional calculus)

R = A B = ( A B) B (extended propositional calculus)

Fuzzy if-then rules (3.3) (cont.)

Page 40: Classical and Fuzzy Logic Vtu

40

Two ways to interpret “If x is A then y is B”:

A coupled with B

B

A

y

x

Fuzzy if-then rules (cont.)

Page 41: Classical and Fuzzy Logic Vtu

41

Classical Logic &Fuzzy Logic

PQ: If x A, Then y B, or PQ AB

The shaded regions of the compound Venn diagram in the following figure represent the truth domain of the implication, If A, then B(PQ).

B Y

X

A

Page 42: Classical and Fuzzy Logic Vtu

42

Classical Logic &Fuzzy Logic

IF A, THEN B, or IF A , THEN CPREDICATE LOGIC (PQ)(PS)Where P: xA, AX

Q: yB, BYS: yC, CY

SET THEORETIC EQUIVALENT (A X B)(A X C) = R = relation ON X Y

Truth domain for the above compound proposition.

Page 43: Classical and Fuzzy Logic Vtu

43

Classical Logic &Fuzzy Logic

Some common tautologies follow:

BB X AX; A X X

AB (A(AB))B (modeus ponens)(B(AB))A (modus tollens)Proof:(A(AB)) B(A(AB)) B Implication((AA) (AB))B Distributivity((AB))B Excluded middle laws(AB)B Identity(AB)B Implication(AB)B Demorgans lawA(BB) AssociativityAX Excluded middle lawsX T(X) =1 Identity; QED

Page 44: Classical and Fuzzy Logic Vtu

44

Classical Logic & Fuzzy Logic

Proof(B(AB))A(B(AB))A((BA)(BB)) A((BA))A(BA)A

(BA)A

(BA)AB(AA)BX = X T(X) =1 A B AB (A(AB) (A(AB)B

O 0 1 0 1

O 1 1 0 1

1 0 0 0 1

1 1 1 1 1

Truth table (modus ponens)

Page 45: Classical and Fuzzy Logic Vtu

45

Classical Logic &Fuzzy Logic

Contradictions

BBA; AEquivalencePQ is true only when both P and Q are true or when both P and q are false.Example

Suppose we consider the universe positive integers X={1 n8}. Let P = “n is an even number “ and let Q =“(3n7)(n6).” then T(P)={2,4,6,8} and T(Q) ={3,4,5,7}. The equivalence PQ has the truth set T(P Q)=(T(P)T(Q)) (T(P) (T(Q)) ={4} {1} ={1,4}

T(A)

T(B)Venn diagram for equivalence

Page 46: Classical and Fuzzy Logic Vtu

46

Classical Logic &Fuzzy Logic

Exclusive orExclusive NorExclusive or P “” Q(AB) (AB)Exclusive Nor(P “” Q)(PQ)Logical proofsLogic involves the use of inference in everyday life.

In natural language if we are given some hypothesis it is often useful to make certain conclusions from them the so called process of inference (P1P2….Pn) Q is true.

Page 47: Classical and Fuzzy Logic Vtu

47

Classical Logic &Fuzzy Logic

Hypothesis : Engineers are mathematicians. Logical thinkers do not believe in magic. Mathematicians are logical thinkers.Conclusion : Engineers do not believe in magic.Let us decompose this information into individual propositionsP: a person is an engineerQ: a person is a mathematicianR: a person is a logical thinkerS: a person believes in magicThe statements can now be expressed as algebraic propositions as((PQ)(RS)(QR))(PS)It can be shown that the proposition is a tautology.ALTERNATIVE: proof by contradiction.

Page 48: Classical and Fuzzy Logic Vtu

48

Classical Logic &Fuzzy Logic

Deductive inferences

The modus ponens deduction is used as a tool for making inferences in rule based systems. This rule can be translated into a relation between sets A and B.

R = (AB)(AY)

Now suppose a new antecedent say A’ is known, since A implies B is defined on the cartesian space X Y, B can be found through the following set theoretic formulation B= AR= A((AB)(AY))

Denotes the composition operation. Modus ponens deduction can also be used for compound rule.

Page 49: Classical and Fuzzy Logic Vtu

49

Classical Logic &Fuzzy Logic

Whether A is contained only in the complement of A or whether A’ and A overlap to some extent as described next:

IF AA, THEN y=B

IF AA THEN y =C

IF AA , AA, THEN y= BC

Page 50: Classical and Fuzzy Logic Vtu

50

Page 51: Classical and Fuzzy Logic Vtu

51

Page 52: Classical and Fuzzy Logic Vtu

52

Page 53: Classical and Fuzzy Logic Vtu

53

Page 54: Classical and Fuzzy Logic Vtu

54

Page 55: Classical and Fuzzy Logic Vtu

55

Page 56: Classical and Fuzzy Logic Vtu

56

Page 57: Classical and Fuzzy Logic Vtu

57

Truth values of complex propositions

Page 58: Classical and Fuzzy Logic Vtu

58

Table of a complex proposition

Page 59: Classical and Fuzzy Logic Vtu

59

Logic functions

Page 60: Classical and Fuzzy Logic Vtu

60

Valid inference

Page 61: Classical and Fuzzy Logic Vtu

61

Invalid inferenceerror

Page 62: Classical and Fuzzy Logic Vtu

62

Basic Inference forms

Page 63: Classical and Fuzzy Logic Vtu

63

Rules of Replacement

Page 64: Classical and Fuzzy Logic Vtu

64

Predicate Logic

Singular Proposition

General Proposition

Subject term Predicate term

Page 65: Classical and Fuzzy Logic Vtu

65

Singular Propositions

Lassie is a dog

DlIndividual constant

lPredicate variable

D

Fido is a dog DfBuster is a dog DbGinger is a dog Dg

Page 66: Classical and Fuzzy Logic Vtu

66

Generalization

Lassie is a dog

DlIndividual constant

lPredicate variable

D

Fido is a dog DfBuster is a dog DbGinger is a dog Dg

Dx x: Individual variableDx: propositional functionDf: substitution instances

Dx

Dl

instantiation generalization

Page 67: Classical and Fuzzy Logic Vtu

67

General Propositions

(∃x)Dx : There exists at least one x, such that the x is a dog

(∃x)( Dx Q∧ x) : There exists at least one thing, such that it is both a dog and a quadruped.

( ∀ x) Dx : For any x, x is a dog

( ∀ x) Dx Qx : for any x, if x is a dog, then x is a quadruped

Existential generalization ∃x : Existential quantifier

universal generalization ∀x : universal quantifier

Page 68: Classical and Fuzzy Logic Vtu

68

Relations represented by predicate logic

• John loves Mary --- LjmL : relation j,m : individual constant

• Everything is attracted by something --- ( ∀ x )(∃y)Ayx

x y

Page 69: Classical and Fuzzy Logic Vtu

69

Quantifier Negation

• It is false that everything is square --- ¬( ∀ x )Sx

• There is something which is not square --- ( ∃ x) ¬Sx

Quantifier negation equivalences

Page 70: Classical and Fuzzy Logic Vtu

70

The Square of Opposition

Page 71: Classical and Fuzzy Logic Vtu

Spring 2003 CMSC 203 - Discrete Structures 71

Rules of InferenceRules of Inference

Rules of inferenceRules of inference provide the justification of provide the justification of the steps used in a proof.the steps used in a proof.

One important rule is called One important rule is called modus ponensmodus ponens or the or the law of detachmentlaw of detachment. It is based on the . It is based on the tautology tautology (p (p (p (p q)) q)) q. We write it in the following q. We write it in the following way:way:

ppp p q q________ qq

The two The two hypotheseshypotheses p and p p and p q q are are written in a column, and the written in a column, and the conclusionconclusionbelow a bar, where below a bar, where means means “therefore”.“therefore”.

Page 72: Classical and Fuzzy Logic Vtu

Spring 2003 CMSC 203 - Discrete Structures 72

Rules of InferenceRules of Inference

The general form of a rule of inference is:The general form of a rule of inference is:

pp11

pp22 .. .. .. ppnn________ qq

The rule states that if pThe rule states that if p11 andand p p22 andand … … andand p pnn are all true, then q is true as are all true, then q is true as well.well.

Each rule is an established tautology Each rule is an established tautology ofof pp11 p p22 … … p pnn q q

These rules of inference can be used These rules of inference can be used in any mathematical argument and do in any mathematical argument and do not not require any proof.require any proof.

Page 73: Classical and Fuzzy Logic Vtu

73

CS 173 Proofs - Modus Ponens

I am Mila.If I am Mila, then I am a great swimmer.

I am a great swimmer!

p

p q

q

Tautology:

(p (p q)) q

Inference Rule:

Modus Ponens

Page 74: Classical and Fuzzy Logic Vtu

74

CS 173 Proofs - Modus Tollens

I am not a great skater.If I am Erik, then I am a great skater.

I am not Erik!

q

p q

p

Tautology:

(q (p q)) p

Inference Rule:

Modus Tollens

Page 75: Classical and Fuzzy Logic Vtu

75

Page 76: Classical and Fuzzy Logic Vtu

76

Page 77: Classical and Fuzzy Logic Vtu

77

Page 78: Classical and Fuzzy Logic Vtu

78

Page 79: Classical and Fuzzy Logic Vtu

79

Page 80: Classical and Fuzzy Logic Vtu

80

Page 81: Classical and Fuzzy Logic Vtu

81

Page 82: Classical and Fuzzy Logic Vtu

3.1-82

Rules of Inference

• Many (implication) tautologies are rules of inference, and have the form:

H1 H2 … Hn C

where Hi are the hypotheses, and C is the conclusion. • They can be represented by the symbolic form:

H1

H2

.

.

Hn

C

Page 83: Classical and Fuzzy Logic Vtu

3.1-83

Fallacies

• Fallacies are incorrect inferences.– Based on contingencies, NOT tautologies.

• Some common fallacies are:– Affirming the conclusion (or the consequent) – Denying the hypothesis (the antecedent)– Begging the question (or circular reasoning)

Page 84: Classical and Fuzzy Logic Vtu

3.1-84

The Fallacy of Affirming the Conclusion

• This invalid argument has the form:

p q

q

p• It is based on the implication:

[(p q) q] p,which is NOT a tautology.

Page 85: Classical and Fuzzy Logic Vtu

3.1-85

Example

• Is the following argument valid:If you do every problem in the ‘Rosen’ textbook, then you will learn discrete mathematics.

You learned discrete mathematics.

Therefore, you did every problem in the textbook.

Page 86: Classical and Fuzzy Logic Vtu

3.1-86

Example - Solution

No. Let p and q be the following propositionsp: “You did every problem in the ‘Rosen’ textbook,”q: “You learned discrete mathematics.”The argument used is of the form:

p qq p

It is based on the implication:

[(p q) q] p,which is NOT a tautology.

Page 87: Classical and Fuzzy Logic Vtu

87

Page 88: Classical and Fuzzy Logic Vtu

88

Page 89: Classical and Fuzzy Logic Vtu

89

Page 90: Classical and Fuzzy Logic Vtu

90

Page 91: Classical and Fuzzy Logic Vtu

91

Page 92: Classical and Fuzzy Logic Vtu

92

Page 93: Classical and Fuzzy Logic Vtu

93

Page 94: Classical and Fuzzy Logic Vtu

94

Page 95: Classical and Fuzzy Logic Vtu

95

Page 96: Classical and Fuzzy Logic Vtu

96

Page 97: Classical and Fuzzy Logic Vtu

97

Page 98: Classical and Fuzzy Logic Vtu

98

Page 99: Classical and Fuzzy Logic Vtu

99

Page 100: Classical and Fuzzy Logic Vtu

100

Page 101: Classical and Fuzzy Logic Vtu

101

Page 102: Classical and Fuzzy Logic Vtu

102

Page 103: Classical and Fuzzy Logic Vtu

103

Fuzzy Logic

The restriction of classical propositional calculus to a two-valued logic has created many interesting paradoxes over the ages. For example, the barber of Seville is a classic paradox (also termed as Russell’s barber). In the small Spanish town of Seville, there is a rule that all and only those men who do not shave themselves are shaved by a barber. Who shaves the barber?

Another example comes from ancient Greece. Does the liar from Crete lie when he claims, “All Cretians are liars”? If he is telling the truth, then the statement is false. If the statement is false, he is not telling the truth.

Page 104: Classical and Fuzzy Logic Vtu

104

Fuzzy Logic

Let S: the barber shaves himself

S’: he does not

S S’ and S’ S

T(S) = T(S’) = 1 – T(S)

T(S) = 1/2

But for binary logic T(S) = 1 or 0

Fuzzy propositions are assigned for fuzzy sets:

10

~

~~

A

A xPT

Page 105: Classical and Fuzzy Logic Vtu

105

Fuzzy Logic

~~

1 PTPT

~~~~

~~~~

,max

:

QTPTQPT

BorAxQP

~~~~

~~~~

,min

:

QTPTQPT

BandAxQP

~~~~~~

~~

,max QTPTQPTQPT

QP

Negation

Disjunction

Conjunction

Implication [Zadeh, 1973]

Page 106: Classical and Fuzzy Logic Vtu

106

Fuzzy Logic

xyxyx

YABAR

ABAR~~~~

1,max,~~~~

Example:

= medium uniqueness =

= medium market size =

Then…

4

2.0

3

1

2

6.0

5

3.0

4

8.0

3

1

2

4.0

~A

~B

Page 107: Classical and Fuzzy Logic Vtu

107

Fuzzy Logic

Page 108: Classical and Fuzzy Logic Vtu

108

Fuzzy Logic

When the logical conditional implication is of the compound form,

IF x is , THEN y is , ELSE y is

Then fuzzy relation is:

whose membership function can be expressed as:

~A

~B

~C

~~~~~CABAR

yxyxyx CABAR

~~~~~

1,max,

Page 109: Classical and Fuzzy Logic Vtu

109

Fuzzy Logic

Rule-based format to represent fuzzy information.

Rule 1: IF x is , THEN y is , where and represent fuzzy propositions (sets)

Now suppose we introduce a new antecedent, say, and we consider the following rule

Rule 2: IF x is , THEN y is

~A

~B

~B

~A

'~A '

~B

RAB ''~~

Page 110: Classical and Fuzzy Logic Vtu

110

Fuzzy Logic

Page 111: Classical and Fuzzy Logic Vtu

111

Fuzzy Logic

Suppose we use A in fuzzy composition, can we get

The answer is: NO

Example:

For the problem in pg 127, let

A’ = AB’ = A’ R = A R = {0.4/1 + 0.4/2 + 1/3 + 0.8/4 + 0.4/5 + 0.4/6} ≠ B

RBB ~~

Page 112: Classical and Fuzzy Logic Vtu

112

Fuzzy Tautologies, Contradictions, Equivalence, and Logical Proofs

The extension of truth operations for tautologies, contradictions, equivalence, and logical proofs is no different for fuzzy sets; the results, however, can differ considerably from those in classical logic. If the truth values for the simple propositions of a fuzzy logic compound proposition are strictly true (1) or false (0), the results follow identically those in classical logic. However, the use of partially true (or partially false) simple propositions in compound propositional statements results in new ideas termed quasi tautologies, quasi contradictions, and quasi equivalence. Moreover, the idea of a logical proof is altered because now a proof can be shown only to a “matter of degree”. Some examples of these will be useful.

Page 113: Classical and Fuzzy Logic Vtu

113

Fuzzy Tautologies, Contradictions, Equivalence, and Logical Proofs

Truth table (approximate modus ponens)

A B AB (A(AB)) (A(AB))B

.3 .2 .7 .3 .7

.3 .8 .8 .3 .8 Quasi tautology

.7 .2 .3 .3 .7

.7 .8 .8 .7 .8

Truth table (approximate modus ponens)

A B AB (A(AB)) (A(AB))B

.4 .1 .6 .4 .6

.4 .9 .9 .4 .9 Quasi tautology

.6 .1 .4 .4 .6

.6 .9 .9 .6 .9

Page 114: Classical and Fuzzy Logic Vtu

114

Fuzzy Tautologies, Contradictions, Equivalence, and Logical Proofs

The following form of the implication operator show different techniques for obtaining the membership function values of fuzzy relation defined on the Cartesian product space X × Y:

~R

Page 115: Classical and Fuzzy Logic Vtu

115

Page 116: Classical and Fuzzy Logic Vtu

116

Page 117: Classical and Fuzzy Logic Vtu

117

Page 118: Classical and Fuzzy Logic Vtu

118

Page 119: Classical and Fuzzy Logic Vtu

119

Page 120: Classical and Fuzzy Logic Vtu

120

Page 121: Classical and Fuzzy Logic Vtu

121

Page 122: Classical and Fuzzy Logic Vtu

122

Page 123: Classical and Fuzzy Logic Vtu

123

Page 124: Classical and Fuzzy Logic Vtu

124

Page 125: Classical and Fuzzy Logic Vtu

125

Page 126: Classical and Fuzzy Logic Vtu

126

Page 127: Classical and Fuzzy Logic Vtu

127

Page 128: Classical and Fuzzy Logic Vtu

128

Page 129: Classical and Fuzzy Logic Vtu

129

Page 130: Classical and Fuzzy Logic Vtu

130

Page 131: Classical and Fuzzy Logic Vtu

131

Page 132: Classical and Fuzzy Logic Vtu

132

Page 133: Classical and Fuzzy Logic Vtu

133

Page 134: Classical and Fuzzy Logic Vtu

134

Page 135: Classical and Fuzzy Logic Vtu

135

Page 136: Classical and Fuzzy Logic Vtu

136

Page 137: Classical and Fuzzy Logic Vtu

137

Page 138: Classical and Fuzzy Logic Vtu

138

Page 139: Classical and Fuzzy Logic Vtu

139

Page 140: Classical and Fuzzy Logic Vtu

140

Page 141: Classical and Fuzzy Logic Vtu

141

Page 142: Classical and Fuzzy Logic Vtu

142

Page 143: Classical and Fuzzy Logic Vtu

143

Page 144: Classical and Fuzzy Logic Vtu

144

Page 145: Classical and Fuzzy Logic Vtu

145

Page 146: Classical and Fuzzy Logic Vtu

146

Page 147: Classical and Fuzzy Logic Vtu

147

Page 148: Classical and Fuzzy Logic Vtu

148

Page 149: Classical and Fuzzy Logic Vtu

149

Page 150: Classical and Fuzzy Logic Vtu

150

Page 151: Classical and Fuzzy Logic Vtu

151

Page 152: Classical and Fuzzy Logic Vtu

152

Page 153: Classical and Fuzzy Logic Vtu

153

Page 154: Classical and Fuzzy Logic Vtu

154

Page 155: Classical and Fuzzy Logic Vtu

155

Fuzzy Logic

Rule-based format to represent fuzzy information.

Rule 1: IF x is , THEN y is , where and represent fuzzy propositions (sets)

Now suppose we introduce a new antecedent, say, and we consider the following rule

Rule 2: IF x is , THEN y is

~A

~B

~B

~A

'~A '

~B

RAB ''~~

Page 156: Classical and Fuzzy Logic Vtu

156

Fuzzy Logic

Page 157: Classical and Fuzzy Logic Vtu

157

Fuzzy Logic

Suppose we use A in fuzzy composition, can we get

The answer is: NO

Example:

For the problem in pg 127, let

A’ = AB’ = A’ R = A R = {0.4/1 + 0.4/2 + 1/3 + 0.8/4 + 0.4/5 + 0.4/6} ≠ B

RBB ~~

Page 158: Classical and Fuzzy Logic Vtu

158

Fuzzy Tautologies, Contradictions, Equivalence, and Logical Proofs

The extension of truth operations for tautologies, contradictions, equivalence, and logical proofs is no different for fuzzy sets; the results, however, can differ considerably from those in classical logic. If the truth values for the simple propositions of a fuzzy logic compound proposition are strictly true (1) or false (0), the results follow identically those in classical logic. However, the use of partially true (or partially false) simple propositions in compound propositional statements results in new ideas termed quasi tautologies, quasi contradictions, and quasi equivalence. Moreover, the idea of a logical proof is altered because now a proof can be shown only to a “matter of degree”. Some examples of these will be useful.

Page 159: Classical and Fuzzy Logic Vtu

159

Fuzzy Tautologies, Contradictions, Equivalence, and Logical Proofs

Truth table (approximate modus ponens)

A B AB (A(AB)) (A(AB))B

.3 .2 .7 .3 .7

.3 .8 .8 .3 .8 Quasi tautology

.7 .2 .3 .3 .7

.7 .8 .8 .7 .8

Truth table (approximate modus ponens)

A B AB (A(AB)) (A(AB))B

.4 .1 .6 .4 .6

.4 .9 .9 .4 .9 Quasi tautology

.6 .1 .4 .4 .6

.6 .9 .9 .6 .9

Page 160: Classical and Fuzzy Logic Vtu

160

Fuzzy Tautologies, Contradictions, Equivalence, and Logical Proofs

The following form of the implication operator show different techniques for obtaining the membership function values of fuzzy relation defined on the Cartesian product space X × Y:

~R

Page 161: Classical and Fuzzy Logic Vtu

161

Fuzzy Tautologies, Contradictions, Equivalence, and Logical Proofs

The following common methods are among those proposed in the literature for the composition operation , where is the input, or antecedent defined on the universe X, is the output, or consequent defined on the universe Y, and is a fuzzy relation characterizing the relationship between specific inputs (x) and specific outputs (y):

Refer fig on next slide…

~~~RAB

~A

~B

~R

Page 162: Classical and Fuzzy Logic Vtu

162

Fuzzy Tautologies, Contradictions, Equivalence, and Logical Proofs

where f(.) is a logistic function (like a sigmoid or step function) that limits the value of the function within the interval [0,1]

Commonly used in Artificial Neural Networks for mapping between parallel layers of a multi-layer network.