You are on page 1of 23

Fuzzy Logic (1)

Intelligent System Course

Apples, oranges or in between?


O

A
A

O
O

A
A

Group of apple

Group of orange

Lotfi Zadeh

Thinking in Fuzzy
O

O
A
O

A
A
A

Fuzzy group of apples

A
A

O
O

Fuzzy group of oranges

Crisp vs Fuzzy
Crisp sets handle only 0s and 1s
Fuzzy sets handle all values between 0 and
1
Crisp
No
Yes

No

Fuzzy
Slightly
Mostly

Yes

Fuzzy Set Notation


Continuous

F F x / x

Discrete

F F x / x

Continuous Fuzzy Membership Function


The set, B, of numbers near to two is

1
B ( x)
2
( x 2)
B(x)

Discrete Fuzzy Membership Function


The set, B, of numbers near to two is

B 0 / 0.5 0.2 / 1 0.3 / 1.25 0.4 / 1.5 1 / 2


0.4 / 2.5 0.3 / 2.75 / 0.2 / 3 0 / 3.5
B(x)

Example
Example Fuzzy Sets to Aggregate...
A = { x | x is near an integer}
B = { x | x is close to 2}
A(x)

B(x)

Fuzzy Union
Fuzzy Union (logic or)

A B ( x) max [ A ( x), B ( x)]


Meets crisp boundary conditions
Commutative
Associative
Idempotent

Fuzzy Union - example


A OR B = A+B ={ x | (x is near an integer) OR (x is close to 2)}
= MAX [A(x), B(x)]

A+B (x)

Fuzzy Intersection
Fuzzy Intersection (logic and)

A B ( x) min [ A ( x), B ( x)]


Meets crisp boundary conditions
Commutative
Associative
Idempotent

Fuzzy Intersection - example


A AND B = AB ={ x | (x is near an integer) AND (x is close to 2)}
= MIN [A(x), B(x)]

AB(x)

Fuzzy Complement
The complement of a fuzzy set has a membership function...

A ( x) 1 A ( x)
Meets crisp boundary conditions
Two Negatives Should Make a Positive
Law of Excluded Middle: NO!
Law of Contradiction: NO!

Fuzzy Complement - example


complement of A ={ x | x is not near an integer}

A (x )
1

Fuzzy Associativity (1)


Min-Max fuzzy logic has intersection distributive over union...

A( B C ) ( x) ( A B )( AC ) ( x)
since
min[ A,max(B,C) ]=min[ max(A,B), max(A,C) ]

Fuzzy Associativity (2)


Min-Max fuzzy logic has union distributive over intersection...

A ( BC ) ( x) ( A B ) ( AC ) ( x)
since
max[ A,min(B,C) ]= max[ min(A,B), min(A,C) ]

Fuzzy and DeMorgans Law (1)


Min-Max fuzzy logic obeys DeMorgans Law #1...

B C ( x ) B C ( x )
since
1 - min(B,C)= max[ (1-B), (1-C)]

Fuzzy and DeMorgans Law (2)


Min-Max fuzzy logic obeys DeMorgans Law #2...

B C ( x ) B C ( x )
since
1 - max(B,C)= min[(1-B), (1-C)]

Fuzzy and Excluded Middle


Min-Max fuzzy logic fails The Law of Excluded Middle.

A A
since
min( A,1- A) 0
Thus, (the set of numbers close to 2) AND (the set of
numbers not close to 2) null set

Fuzzy and the Law of Contradiction


Min-Max fuzzy logic fails the The Law of Contradiction.

A A U
since
max( A,1- A) 1
Thus, (the set of numbers close to 2) OR (the set of
numbers not close to 2) universal set

Cartesian Product
The intersection and union operations can also be used to assign
memberships on the Cartesian product of two sets.
Consider, as an example, the fuzzy membership of a set, G, of
liquids that taste good and the set, LA, of cities close to Los
Angeles

G 0.0 / Swamp Water


0.5 / Radish Juice
0.9 / Grape Juice

LA 0.0 / LA 0.5 / Chicago


0.8 / New York 0.9 / London

Cartesian Product
We form the set...

E = G LA
= liquids that taste good AND cities that
are close to LA
The following table results...
LosAngeles(0.0)
Swamp Water (0.0)
0.00
Radish Juice (0.5)
0.00
Grape Juice (0.9)
0.00

Chicago (0.5) New York (0.8)


0.00
0.00
0.50
0.50
0.50
0.80

London(0.9)
0.00
0.50
0.90

You might also like