Transcript Slide 1

Fuzzy Logic
The restriction of classical propositional calculus to a twovalued 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.
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:

T P   A x 
~
~
0  A  1
~
Fuzzy Logic


Negation
T P  1 T P
Disjunction
P Q : x  A or B
~
~
~
~
~
~



T  P Q   max T P , T  Q  
~ ~
 ~  ~ 
Conjunction
P  Q : x  A and B
~
~
~
~



T  P  Q   min T P , T  Q  
~ ~
 ~  ~ 
Implication [Zadeh, 1973]
P Q
~
~



T  P  Q   T  P Q   max T P , T  Q  
~ 
~
~ ~
 ~  ~ 
Fuzzy Logic

 
R  A B  A Y
~
~
~
~




  R x, y   max  A x    B  y  , 1   A x 
~
~
~
~
Example:
A = medium uniqueness =
 0.6 1 0.2 
 


 2 3 4 
B = medium market size =
 0.4 1 0.8 0.3 
 



5 
 2 3 4
~
~
Then…
Fuzzy Logic
Fuzzy Logic
When the logical conditional implication is of the
compound form,
IF x is A~ , THEN y is B~ , ELSE y is C~
Then fuzzy relation is:
   
R  A B  A C
~
~
~
~
~
whose membership function can be expressed as:

 

 R x, y   max  A x    B  y  ,  1   A x   C  y 
~

~
~
~
~

Fuzzy Logic
Rule-based format to represent fuzzy information.
Rule 1: IF x is A~ , THEN y is B~ , where A~ and B~ represent
fuzzy propositions (sets)
Now suppose we introduce a new antecedent, say, and we
consider the following rule
Rule 2: IF x is A~ ' , THEN y is B~ '
B'  A' R
~
~
Fuzzy Logic
Fuzzy Logic
Suppose we use A in fuzzy composition, can we get
B  B R
~
~
The answer is: NO
Example:
For the problem in pg 127, let
A’ = A
B’ = A’  R
= A R
= {0.4/1 + 0.4/2 + 1/3 + 0.8/4 + 0.4/5 + 0.4/6} ≠ B
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.
Fuzzy Tautologies, Contradictions,
Equivalence, and Logical Proofs
Truth table (approximate modus ponens)
A
B
AB
(A(AB))
(A(AB))B
.3
.2
.7
.3
.7
.3
.8
.8
.3
.8
.7
.2
.3
.3
.7
.7
.8
.8
.7
.8
Quasi tautology
Truth table (approximate modus ponens)
A
B
AB
(A(AB))
(A(AB))B
.4
.1
.6
.4
.6
.4
.9
.9
.4
.9
.6
.1
.4
.4
.6
.6
.9
.9
.6
.9
Quasi tautology
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 R defined on the Cartesian product
~
space X × Y:
Fuzzy Tautologies, Contradictions,
Equivalence, and Logical Proofs
The following common methods are among those proposed
in the literature for the composition operation B~  A~  R~ , where A~
is the input, or antecedent defined on the universe X, B~ is
the output, or consequent defined on the universe Y, and R~
is a fuzzy relation characterizing the relationship between
specific inputs (x) and specific outputs (y):
Refer fig on next slide…
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.
Fuzzy Rule-based systems
Using fuzzy sets as a calculus to interpret natural
language. It is vague, imprecise, ambiguous and fuzzy.
Fundamental terms  atoms
Collection of atomic terms  composite or set of terms
An atomic term (a linguistic variable) can be interpreted
using fuzzy sets.
An atomic term  in the universe of natural language, X.
Define a fuzzy set A~ in the universe of interpretations or
meanings, Y as a specific meaning of .
Fuzzy Rule-based systems

A
~
 
MA
X
~
~
Y
Mapping of a linguistic atom  to a cognitive interpretation A~
 M  , y    A  y 
~
~
2 1


y

25



1  

  25  

 M  youg y   
~


1

y  25
y  25
Fuzzy Rule-based systems
Composite
 or  :
 or   y   max  y ,    y 
 and  :
 and   y   min  y ,    y 
Not    :   y   1    y 
Linguistic Hedges
Very    2
 y
   
y
2
y
Very very    4
plus    1.25
Slightly   
1
2
 y
 2      
y
5
1
y
Minus    0.75
 2  2  y 

Intensify   
1  21    y 2


0    y   0.5
0.5    y   1
It increases contrast.
Precedence of the Operations
1 Hedge, not
2 and
3 or
Example:
Suppose we have a universe of integers, Y = {1,2,3,4,5}.
We define the following linguistic terms as a mapping onto
Y:
1 .8 .6 .4 .2 
“small” = 1  2  3  4  5 
“large” =
.2 .4 .6 .8 .1
     
2
3
4 5
1
Example (contd)
Then we construct a phrase, or a composite term:
 = “not very small and not very, very large”
which involves the following set-theoretic operations:
 .36 .64 .84 .96   1 1 .9 .6 



 
  
3
4
5  1 2 3
4
 2
 .36 .64 .6 


 
3
4
 2
 
Suppose we want to construct a linguistic variable
“intensely small” (extremely small); we will make use of the
equation defined before to modify “small” as follows:
Example (contd)
1  21  12 1  21  0.82 1  21  0.62 






1
2
3

“Intensely small” = 
2
2
 20.4  20.2



4
5


1 0.92 0.68 0.32 0.08
 




2
3
4
5 
1
Rule-based Systems
IF-THEN rule based form
Canonical Rule Forms
1. Assignment statements
x = large, x  y
2. Conditional statements
If A then B,
If A then B, else C
3. Unconditional statements
stop
go to 5
unconditional can be
If any conditions, then stop
If condition Ci, then restrict Ri
Decomposition of Compound Rule
Any compound rule structure can be decomposed and
reduced to a number of simple canonical rules.
The most commonly used techniques
Multiple Conjunctive Antecedents
2
L
S
A
A

A
B
If x is ~ and ~
, then y is ~
~
Define
A  A  A  A
S
1
~
~
2
~
L
~
 A x   min  A x ,,  A x 


S
1
~
~
The rule can be rewritten.
S
S
IF A THEN B
~
~
L
~
Multiple Disjunctive Antecedents
1
2
If x is A
or A
or … or A
~
~
~
then y is B
~
L
S
A  A  A   A
S
1
~
~
2
~
L
~
 A x   max A x ,,  A x 
S
S
IF A
THEN B~
~
S
1
L
Condition Statements
1
2
1
1. IF A~ THEN ( B~ ELSE B~ ) decomposed into:
1
1
1
2
IF A THEN B
or
IF NOT A THEN B
~
~
~
~
1
1
2
2. IF A~ (THEN B~ ) unless A decomposed into:
~
1
1
2
1
IF A THEN B
or
IF NOT A THEN NOT B
~
~
~
1
~
2
1
2
3. IF A~ THEN ( B~ ELSE IF A~ THEN ( B~ )) decomposed into:
1
1
1
2
2
IF A~ THEN B~
or
IF NOT A~ and A~ THEN NOT B~
4. Nested IF-THEN rules
1
1
2
B
IF A THEN (IF A , THEN ( ~ )) becomes
~1
~
2
IF A and A THEN B1
~
~
~
Each canonical form is an implication, and we can reduce
the rules to a series of relations.
Condition Statements
“likely” “very likely” “highly likely” “true” “fairly true” “very true”
“false” “fairly false” “very false”
x  X
anything x   1
Let  be a fuzzy truth value “very true” “true” “fairly true”
“fairly false” “false”
A truth qualification proposition can be expressed as:
“x is A~ is ”
or
x is A is  =  A x 
~
~
 A x   0.5
~
Aggregation of fuzzy rule
The process of obtaining the overall consequent
(conclusion) from the individual consequent contributed by
each rule in the rule-base is known as aggregation of
rules.
Conjunctive System of Rules:
y  y1  y 2    y r
 y  y   min  y1  y ,,  y r  y  y  Y


Disjunctive System of Rules:
y  y1  y 2    y r
 y  y   max  y1  y ,,  y r  y  y  Y


Graphical Technique of Inference
If x1 is
and x2 is
then y is
, k = 1,2,..., r
Graphical methods that emulate the inference process and
make manual computations involving a few simple rules.
Case 1: inputs x1, and x2 are crisp.
Memberships
(x1) = (x1 – input(i)) =
(x2) = (x2 – input(i)) =
1
x1 = input(i)
0
otherwise
1
x2 = input(i)
0
otherwise
Graphical Technique of Inference
For r disjunctive rules:


 B  y  maxmin A inputi ,  A input j  
k

k  1,2,, r
~
k

k
k
~1
~2

A11 refers to the first fuzzy antecedent of the first rule.
A12 refers to the second fuzzy antecedent of the first rule.