Professional Documents
Culture Documents
Unit 2
Unit 2
Fuzzy logic
The word fuzzy means uncertainty. Any particular event which
do not result any of the exact value (i.e. true or false) is fuzzy .
It deals with Fuzzy set.
Yes or No
Crisp answer
True or False
Milk Yes
Water
A liquid
Crisp
Coca
Spite No
Is the liquid
colorless?
May be
May not be
Partially
etc
Score
99
Extremely honest
Ankit
Rajesh
Very honest 75
Santosh
Fuzzy
Kabita 55
Honest at times
Salmon
Extremely dishonest 35
Is the person
honest?
Real life situations appear frequently where some definitions have not clear
boundaries, like “the young people of a city”, “the good players of a team”, “the
diligent students of a class”, etc.
The need to model mathematically such kind of situations was one of the main
reasons that laid to the development of the FS theory.
Fuzzy element(s)
Fuzzy set(s)
INP
UT
Fuzzy rule(s)
Fuzzy implication(s)
(Inferences)
O
U
TP
Fuzzy system U
T
Universe of discourse x
H
M
Example:
H = { (h1, 1), (h2, 1), ... , (hL, 1) }
Person = { (p1, 1), (p2, 0), ... , (pN , 1) }
In case of a crisp set, the elements are with extreme values of degree
of membership namely either 1 or 0.
1 EX = Marks ≥ 90
2 A = 80 ≤ Marks < 90
3 B = 70 ≤ Marks < 80
4 C = 60 ≤ Marks < 70
5 D = 50 ≤ Marks < 60
6 P = 35 ≤ Marks < 50
7 F = Marks < 35
F P D C B A EX
1
0
35 50 60 70 80 90 100
F P D C B A EX
1
0
35 50 60 70 80 90 100
High Temperature
Low Pressure
Note:
µA(x) map each element of X onto a membership grade (or
membership value) between 0 and 1 (both inclusive).
Question:
How (and who) decides µA(x) for a Fuzzy set A in X ?
Example:
X = All cities in India A = City of comfort
A ={(0,0.1),(1,0.30),(2,0.78)……(10,0.1)}
1.0
0.8
0.6 Note : X = discrete value
µ
0.4
0.2
How you measure happiness ??
0 2 4 6 8 10
A = “Happy family”
1.0
B (x) 1
4
0.8 x50
1
0.6 10
0.4
0.2
0 50 100
B
Age (X)
Note : x = real value
B = “Middle aged” = R+
Core: The core of a fuzzy set A is the set of all points x in X such that
µA(x) = 1
1.0
µ
0.5
x
For any fuzzy set A the core of a membership function is that
region of universe that is characterize by full membership in
the set.
1.0
Symmetry :
Example: India will win the T20 tournament with a chance 60% means
that out of 100 matches, India own 60 matches.
Forecasting : When you take the information from the past job and
apply it to new job.
12/16/2022 32 / 69
Fuzzy membership functions
A fuzzy set is completely characterized by its membership function
(sometimes abbreviated as MF and denoted as µ ). So, it would
be important to learn how a membership function can be
expressed (mathematically or otherwise).
Note: A membership function can be on
(a)a discrete universe of discourse and
(b)a continuous universe of discourse.
Example:
1.0 1.0
0.8 0.8
µA
µB
0.6 0.6
0.4 0.4
0.2 0.2
0 2 4 6 8 10 0 10 20 30 40 50 60
µ
µ
x x x
µ
µ
x x
1.0
a b c
1.0
a b c d
c
0.1
0.1c 0.9c
b
Slope at x =
2a
b
Slope at y =
b 2a
x y
c-a c c+a
1.0
-1 0 1
Changing a Changing b
Changing a
Changing a and b
1.0
Slope = a
0.5
Excellent = Marks ≤ 90
Very good = 75 ≤ Marks ≤ 90
Good = 60 ≤ Marks ≤ 75
Average = 50 ≤ Marks ≤ 60
Poor = 35 ≤ Marks ≤ 50
Bad= Marks ≤ 35
1
.8
.6
.4
.2
0
10 20 30 40 50 60 70 80 90
marks
You can decide a standard fuzzy MF for each of the fuzzy garde.
12/16/2022 44 / 69
Basic fuzzy set operations: Union
Union (A ∪ B):
µA∪B (x ) = max{µA(x ), µB (x )}
Example:
A = {(x1, 0.5), (x2, 0.1), (x3, 0.4)} and
B = {(x1, 0.2), (x2, 0.3), (x3, 0.5)};
C = A ∪ B = {(x1, 0.5), (x2, 0.3), (x3, 0.5)}
µA µA
µB µB
µ µAUB
a p x b q c a p x b q c
Intersection (A ∩ B):
µA∩B (x ) = min{µA(x ), µB (x )}
Example:
A = {(x1, 0.5), (x2, 0.1), (x3, 0.4)} and
B = {(x1, 0.2), (x2, 0.3), (x3, 0.5)};
C = A ∩ B = {(x1, 0.2), (x2, 0.1), (x3, 0.4)}
µA
µB
µ
µAᴖB
a p x b q c a p x b q c
Complement (AC ):
Example:
A = {(x1, 0.5), (x2, 0.1), (x3, 0.4)}
C = AC = {(x1, 0.5), (x2, 0.9), (x3, 0.6)}
µA µA
1.0 µA’
p x q p x q
µA•B (x ) = µA(x ) • µB (x )
µαA(x ) = α · µA(x )
Sum (A + B):
Difference (A − B = A ∩ BC ):
µA−B (x ) = µA∩BC (x )
Equality (A = B):
µA(x ) = µB (x )
Example 3:
A(x) = {(x1, 0.2), (x2, 0.3), (x3, 0.5), (x4, 0.6)}
B(y) = {(y1, 0.8), (y2, 0.6), (y3, 0.3)}
y1 y2 y3
x1 0.2 0.2 0.2
x2 0.3 0.3 0.3
A × B = min{µA(x ), µB (y )} =
0.5 0.5 0.3
x3
x4 0.6 0.6 0.3
Commutativity :
Associativity :
A ∪ (B ∪ C) = (A ∪ B) ∪ C A ∩ (B ∩ C) = (A ∩ B) ∩ C
Distributivity :
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
Transitivity :
If A ⊆ B, B ⊆ C then A ⊆ C
Involution :
(Ac )c = A
De Morgan’s law :
(A ∩ B)c = Ac ∪ Bc
(A ∪ B)c = Ac ∩ Bc
Vinay Kumar Nassa Fuzzy Set Theory 12/16/2022 53 / 69
Few Illustrations on Fuzzy
Sets
12/16/2022 54 / 69
Example 1: Fuzzy Set Operations
Let A and B are two fuzzy sets defined over a universe of discourse X
with membership functions µA(x ) and µB (x ), respectively. Two MFs
µA(x ) and µB (x ) are shown graphically.
µA(x)
µB µA
µ
b1 a1 a2 b4 a3 a4
x
µB µA
b1 a1 a2 b4 a3 a4 x
A B (x)
A B (x)
a2 b4
b1 a1 a2 a3 a4
x
x
The plots of union µA¯(x) of the fuzzy set A is shown in the following.
(x)
A(x)
A
a b a b
x x
i.A , B
ii.A ∪ B
iii.A ∩ B
iv.(A ∪ B)c [Hint: Use De’ Morgan law]
µA µB
1.0
0.5
µ
-15 -10 -5 0 5 10 15 20 25 30 35 40 45 50
3 Extreme climate
4 Pleasant climate
Note: Note that ”Not cold climate” /= ”Hot climate” and vice-versa.
0.
AB
5
µ
- -
15 10 -5 0 5 10 15 20 25 30 35 40 45 50
5 15 25 5 25
x
x x
Suppose
A is a fuzzy set on the universe of discourse X with µA(x )|x ∈ X
B is a fuzzy set on the universe of discourse Y with µB (y )|y ∈ Y
Then R = A × B ⊂ X × Y ; where R has its membership function given
by µR (x, y ) = µA×B (x, y ) = min{µA(x ), µB (y )}
Example :
A = {(a1, 0.2), (a2, 0.7), (a3, 0.4)}and B = {(b1, 0.5), (b2, 0.6)}
b1 b2
a1 0.2 0.2
R=A×B= a2 0.5 0.6
a3 0.4 0.4
Intersection:
Complement:
µR (a, b) = 1 − µR (a, b)
Composition
T=R◦S
µR◦S = maxy∈Y {min(µR (x, y ), µS (y, z))}