Fuzzy Sets and Systems Lecture 4 - basu.ac.ir · Inference rules are tautologies used for making...
Transcript of Fuzzy Sets and Systems Lecture 4 - basu.ac.ir · Inference rules are tautologies used for making...
Fuzzy Sets and Systems
Lecture 4(Fuzzy Logic)
Bu- Ali Sina UniversityComputer Engineering Dep.
Spring 2010
OutlineFuzzy LogicClassical logic- an overviewMulti-valued logicFuzzy logic
– Fuzzy proposition• Unconditional
– Unqualified– Qualified
• Conditional– Unqualified– Qualified
Fuzzy QuantifierLinguistic hedges
Classical LogicLogic is the study of methods and principles of reasoning in all its
possible forms.Propositions - statements that are required to be true or false.Instead of propositions, we use logic variables. Logic variable may
asses one of the two truth values, if it is substituted by a particularproposition.
Propositional logic studies the rules by which new logic variablescan be produced from some given logic variables. The internalstructure of the propositions behind the variables does not matter!
Logic function assigns a truth value to a combination oftruth values of its variables:
Classical Logic
Classical Logic
Denfinition
� If v is a logic variable, then v and are logic formulae;� If v1 and v2 are logic formulae, then v1 ˄ v2 and v1 ˅ v2 are alsologic formulae;
v
� Tautology is (any) logic formula that corresponds to a logic functionone.�Contradiction is (any) logic formula that corresponds to a logicfunction zero.
Inference rules are tautologies used for making deductive inferences.
Examples:modus ponensmodus tollens
hypothetical syllogism
Propositions are, in general, of the form x is Pwhere x is a symbol of a subject and P is a predicate that characterizesa property.x is any element of universal set X, while P is a function on X, which foreach value of x forms a proposition.P(x) is called predicate; it becomes true or false for any particularvalue of x.
Multivalued logicThird truth value is allowed: truth: 1, false:
0, intermediate: 1/2
quasi-tautology is a logic formula thatnever assumes truth value 0;
quasi-contradiction is a logic formulathat never assumes truth value 1.
Multivalued logics
n-valued logics. The set of truth values:
Truth values are interpreted as degrees of truth.Primitives in n-valued logics of Lukasiewicz, denoted by Ln, are:
Possible operators for AND in fuzzy logic
µ µµ µ µ µ
A B
A B A B
x xx x x x
( ) ( )[ ( ) ( ) ( ) ( )]
⋅− + − ⋅2
max{ , ( ) ( ) }0 1µ µA Bx x+ −
µ µA Bx x( ) ( )⋅
µ µµ µ µ µ
A B
A B A B
x xx x x x
( ) ( )( ) ( ) ( ) ( )
⋅+ − ⋅
))(,)(max()( xxx BABA µµµ =+
Let A and B be fuzzy subsets of the universe X={-3, -2, -1, 0, 1, 2, 3, 4}A= 0.6/-3 + 0.0/-2 + 0.3/-1 + 0.6/0.0 + 1.0/1 + 0.6/2 + 0.3/3 + 0.5/4B= 0.2/-3 + 0.6/-2 + 0.4/-1 + 0.6/0.0 + 0.5/1 + 0.4/2 + 0.5/3 + 0.3/4µA∪B = 0.6/-3 + 0.6/-2 + 0.4/-1 + 0.6/0.0 + 1.0/1 + 0.6/2 + 0.5/3 + 0.5/4
µ µ µ µA B A Bx x x x( ) ( ) ( ) ( )+ − ⋅
µ µ µ µµ µ
A B A B
A B
x x x xx x
( ) ( ) ( ) ( )( ) ( )
+ − ⋅− ⋅
21
µ µµ µA B
A B
x xx x
( ) ( )( ) ( )]+
+ ⋅1
min{ , ( ) ( )}1 µ µA Bx x+
Possible operators for OR in fuzzy logic
)(1)( xx AA µµ −=
Let A be fuzzy subset of the universeX={-3, -2, -1, 0, 1, 2, 3, 4}
A = 0.6/-3 + 0.0/-2 + 0.3/-1 + 0.6/0.0 + 1.0/1 + 0.6/2 + 0.3/3 + 0.5/4
= 0.4/-3 + 1.0/-2 + 0.7/-1 + 0.4/0.0 + 0.0/1 + 0.4/2 + 0.7/3 + 0.5/4A
Approximate reasoning
Types of fuzzy linguistic terms– Fuzzy predicates: tall, young, small, median– Fuzzy truth values: true, false, very true– Fuzzy probabilities: likely, unlikely, very likely– Fuzzy quantifiers: many, few, most
Fuzzy logic - Fuzzy proposition
The range of truth values of fuzzy propositions is notonly {0; 1}, but [0; 1].
The truth of a fuzzy proposition is a matter of degree.
Classification of fuzzy propositions:– Unconditional and unqualified propositions
– The temperature is high
– Unconditional and qualified propositions– The temperature is high is very true
– Conditional and unqualified propositions– If the temperature is high, then it is hot
– Conditional and qualified propositions– If the temperature is high, then it is hot is true
Unconditional and unqualified propositions
Propositional form– p: χ is A
T(px ) = the degree of truth of px– px: χ=x is A
χ is a variable
A is some property or predicatep:’ χ is A’ is true
T( px) = A(x)
The degree of x belong to χ
The temperature (35ºC) is (high).
Example
T( px) = H(x)
The degree of x belong to χ
p65: Humidity of 65% is high
The degree of p65 isT(p65) = H(65) =0.25
Unconditional and qualified propositions
Propositional form– p: ‘χ is A’ is S
S is a fuzzy truth qualifier
The degree of truth, Ts(px)of the qualified proposition
px:‘χ=x is A’ is S
is Ts(px) = S(A(x))
‘Humidity of 65% is high’ is very false
example
p65: ‘Humidity of 65% is high’ is very true
The degree of truth of p65 isTs(p65) = S(A(x)) = S(0.25) = 0.125
0.25
0.125
0.25
example
p65: ‘Humidity of 65% is high’ is very false
The degree of truth of p65 isTs(p65) = S(A(x)) = S(0.25) = 0.5
Conditional and unqualified propositions
Propositional form– p: if χ is A, then γ is B– px,y: ‘if A(x), then B(y)’ is true– Fuzzy implication A(x) ⇒ B(y)
The degree of truth– T(px,y) = I[A(x), B(y)] = min[1, 1- A(x)+B(y)]
γ is Bχ is AIf Tina is young,then John is old
Lukasiewicz implication
example
p: if a textbook is large , then it is expensiveThe degree of truth of p isT (px,y) = min[1, 1- L(x)+E(y)]
T (p600, 45) = min[1, 1- L(600)+E(45)] = min[1, 1- 1+0.5] = 0.5
T (p450, 42) = min[1, 1- L(450)+E(42)] = min[1, 1- 0.75 +0.4] = 0.65
Conditional and qualified propositions
Propositional form– p: ‘if χ is A, then γ is B’ is S
‘If a textbook is large,then it is expensive’is very true
The degree of truthTs(px,y) = S[T(px,y)]
Fuzzy quantifiers
Two quantifiers of predicate logic– Universal quantifier: all, ∀– Existential quantifier: there exist, ∃
Fuzzy quantifiers– Absolute quantifiers
• About a dozen, at most about 10, at least about 100• About 20 hotels are in close proximity to the center of the city
– Relative quantifiers• Most, almost all, about half, about 20%• Almost all hotels are in close proximity to the center of the city
All snakes are reptiles(∀x) ( Sx ⇒ Rx)Some snakes are poisonous(∃x) ( Sx ∧ Px)Almost all snakes arepoisonous
To determine the truth value of a quantified proposition, we need toknow
1-how many students in the group are high-fluenti.e., cardinality of a fuzzy set High-fluent
2- how much is that value about 3i.e., membership of the obtained value to the fuzzy set About 3
or1. how many students in the group are high-fluent, relatively to thesize of the group i.e., cardinality of a fuzzy set High-fluent dividedby the size of the group2. how much is that value almost alli.e., membership of the obtained value to the fuzzy set Almost all.
Examples:p: There are about 3 high-fluent students in the groupq: Almost all students in the group are high-fluent
Group = { Adam, Bob, Cathy, David, Eve }.Fluency is represented by the value from the interval [0, 100].Fuzzy set F represents High fluency on [0,100].Fuzzy set Q represents fuzzy quantifier about 3.
Linguistic hedges
Special linguistic terms by which other linguistic terms aremodified.– Very, more ,less, fairly, extremely
In general for fuzzy proposition p: x is F and a linguistic hedge H wecan had a modified proposition Hp: x is HF
ModifierAny linguistic hedge H may be interpreted as a unary operation
h on the unit interval [0,1] thus:– HA(x) = h(A(x))– h(a) = a1/2 , a2, a3, L
Weak modifier, fairly
Very strong modifier, very very
strong modifier, very
Example
Propositions– p1: John is young– p2: John is very young– p3: John is fairly young
Assume John is 26 years old, the degree of truth ofthe propositions are– Young(26) = 0.8– Very young(26) = 0.82 = 0.64– Fairly young (26) = 0.81/2 = 0.89
Strong assertion is less true
Fuzzy Inference
Fuzzy inference rules
• Inference rules in classical logic � based on the various tautologies.• Inference rules can be generalized within the framework of fuzzy logic
– To facilitate approximate reasoning.
Here we describe generalizations for three classical inference rules:
• modus ponens,• modus tollens,• hypothetical syllogism.
Fuzzy Inference rule
For a given fuzzy relation R on X x Y, and a givenfuzzy set A’ on X, a fuzzy set B’ on Y can bederived for all y ɛ Y, so that
In matrix form, compositional rule of inference is
Fuzzy inference rulesThe fuzzy relation R is given by (one or more) conditionalfuzzy propositions.
For a given fuzzy proposition:
p : If X is A; then Y is B
Is determined for all x ɛ X and y ɛ Y by
where J stands for a fuzzy implication.
Generalized Modus ponens
Using relation R obtained from given proposition p (previous slide)and given another proposition q of the form
q : x is A'
we may conclude that y is B' by the compositional rule of inference.B’ is calculated by
This procedure is called a generalized modus ponens.
Example
Generalized modus tollens,Another inference rule in fuzzy logic, which is a generalized
modus tollens, is expressed by the following schema:
the compositional rule of inference has the form
Example
Generalization of hypothetical syllogism
The generalized hypothetical syllogism isexpressed by the following schema:
In this case, X , v , :Z are variables taking values in sets X, Y, Z,respectively, and A, B , C are fuzzy sets on sets X, Y, Z, respectively.In this case, X , v , :Z are variables taking values in sets X, Y, Z,respectively, and A, B , C are fuzzy sets on sets X, Y, Z, respectively.
For each conditional fuzzy proposition in (8.43), there is a fuzzy relation
Generalization of hypothetical syllogism,
Given R1, R2, R3, obtained by these equations, wesay that the generalized hypothetical syllogismholds if
This equation may also be written in the matrix form
Example
Inference from conditional and qualified propositions
Given a conditional and qualified fuzzy proposition pof the form
where S is a fuzzy truth qualifier, and a fact is in the form "X is A'," wewant to make an inference in the form “y is B'."
method of truth-value restrictions, is based on a manipulation oflinguistic truth values. The method involves the following four steps.
Example
Homework8-2, 8-4, 8-6, 8-9,