Professional Documents
Culture Documents
.in
rs
de
ea
yr
Fuzzy Set Theory : Soft Computing Course Lecture 29 34, notes, slides
.m
w
w
www.myreaders.info/ , RC Chakraborty, e-mail rcchak@gmail.com , Aug. 10, 2010
,w
ty
http://www.myreaders.info/html/soft_computing.html
or
ab
www.myreaders.info
kr
ha
C
C
R
Return to Website
Soft Computing
yr
.m
w
w
,w
Soft Computing
ty
or
ab
Topics
kr
ha
C
What is Fuzzy set? Classical set theory; Fuzzy set theory; Crisp and
Non-crisp Sets : Representation; Capturing uncertainty, Examples
4. References 42
02
fo
.in
rs
de
ea
yr
Fuzzy Set Theory
.m
w
w
,w
ty
Classical set theory allows the membership of the elements in the set
in binary terms, a bivalent condition - an element either belongs or
does not belong to the set.
Example:
Words like young, tall, good, or high are fuzzy.
For some people, age 25 is young, and for others, age 35 is young.
ea
1. Introduction
yr
.m
w
w
In real world, there exists much fuzzy knowledge;
,w
ty
or
probabilistic in nature.
ha
C
C
R
However, our systems are unable to answer many questions. The reason
is, most systems are designed based upon classical set theory and
two-valued logic which is unable to cope with unreliable and incomplete
information and give expert opinions.
We want, our systems should also be able to cope with unreliable and
incomplete information and give expert opinions. Fuzzy sets have been
able provide solutions to many real world problems.
04
fo
.in
rs
de
SC - Fuzzy set theory - Introduction
ea
Classical Set Theory
yr
.m
w
w
A Set is any well defined collection of objects. An object in a set is
,w
ty
or
1 if x X
A (x) =
0 otherwise
: [0, 1]
A(x) = 1 , x is a member of A Eq.(1)
A(x) = 0 , x is not a member of A
1 if x X
A (x) = Eq.(2)
0 otherwise
Thus in classical set theory A (x) has only the values 0 ('false')
and 1 ('true''). Such sets are called crisp sets.
05
fo
.in
rs
de
SC - Fuzzy set theory - Introduction
ea
Fuzzy Set Theory
yr
.m
w
w
Fuzzy set theory is an extension of classical set theory where
,w
ty
or
the two truth values, True and False, is sometimes inadequate when
ha
C
C
describing human reasoning. Fuzzy logic uses the whole interval between
R
A Fuzzy Set is any set that allows its members to have different
Fuzzy logic is derived from fuzzy set theory dealing with reasoning
that is approximate rather than precisely deduced from classical
predicate logic.
ea
Crisp and Non-Crisp Set
yr
.m
w
w
,w
07
fo
.in
rs
de
SC - Fuzzy set theory - Introduction
ea
Representation of Crisp and Non-Crisp Set
yr
.m
w
w
Example : Classify students for a basketball team
,w
ty
or
0 0
1.8 m Height x 1.8 m Height x
A student of height 1.79m would belong to both tall and not tall sets
with a particular degree of membership.
As the height increases the membership grade within the tall set would
increase whilst the membership grade within the not-tall set would
decrease.
08
fo
.in
rs
de
SC - Fuzzy set theory - Introduction
ea
Capturing Uncertainty
yr
.m
w
w
Instead of avoiding or ignoring uncertainty, Lotfi Zadeh introduced Fuzzy
,w
ty
or
: [0, 1]
Example
c (x) F (x)
1
C F
0.5
0 x
ea
Examples of Crisp and Non-Crisp Set
yr
.m
w
w
,w
10
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Set
ea
2. Fuzzy Set
yr
.m
w
w
A Fuzzy Set is any set that allows its members to have different degree
,w
ty
or
ea
Definition of Universal Space
yr
.m
w
w
Originally the universal space for fuzzy sets in fuzzy logic was
,w
ty
or
defined only on the integers. Now, the universal space for fuzzy sets
ab
kr
ha
The first two numbers specify the start and end of the universal space,
and the third argument specifies the increment between elements.
This gives the user more flexibility in choosing the universal space.
12
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Membership
ea
2.1 Fuzzy Membership
yr
.m
w
w
A fuzzy set A defined in the universal space X is a function defined
,w
ty
or
ea
Graphic Interpretation of Fuzzy Sets SMALL
yr
.m
w
w
The fuzzy set SMALL of small numbers, defined in the universal space
,w
ty
or
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Sets SMALL
14
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Membership
ea
Graphic Interpretation of Fuzzy Sets PRIME Numbers
yr
.m
w
w
The fuzzy set PRIME numbers, defined in the universal space
,w
ty
or
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Sets PRIME
15
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Membership
ea
Graphic Interpretation of Fuzzy Sets UNIVERSALSPACE
yr
.m
w
w
In any application of sets or fuzzy sets theory, all sets are subsets of
,w
ty
or
UNIVERSALSPACE = FuzzySet {{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1},
{7, 1}, {8, 1}, {9, 1}, {10, 1}, {11, 1}, {12, 1}}
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Set UNIVERSALSPACE
16
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Membership
ea
Finite and Infinite Universal Space
yr
.m
w
w
Universal sets can be finite or infinite.
,w
ty
or
elements, that is, if in counting the different elements of the set, the
ha
C
C
Examples:
1. Let N be the universal space of the days of the week.
N = {Mo, Tu, We, Th, Fr, Sa, Su}. N is finite.
2. Let M = {1, 3, 5, 7, 9, ...}. M is infinite.
3. Let L = {u | u is a lake in a city }. L is finite.
(Although it may be difficult to count the number of lakes in a city,
but L is still a finite universal set.)
17
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Membership
ea
Graphic Interpretation of Fuzzy Sets EMPTY
yr
.m
w
w
An empty set is a set that contains only elements with a grade of
,w
ty
or
membership equal to 0.
ab
kr
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Set EMPTY
18
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Operation
ea
2.2 Fuzzy Operations
yr
.m
w
w
A fuzzy set operations are the operations on fuzzy sets. The fuzzy set
,w
ty
or
19
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Operation
ea
Inclusion
yr
.m
w Let A and B be fuzzy sets defined in the same universal space X.
w
,w
ty
The fuzzy set A is included in the fuzzy set B if and only if for every x in
or
ab
kr
Example :
C
R
.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Inclusion
FuzzyPlot [SMALL, VERYSMALL]
20
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Operation
ea
Comparability
yr
.m
w Two fuzzy sets A and B are comparable
w
,w
ty
if one of the fuzzy sets is a subset of the other set, they are comparable.
ha
C
C
R
Example 1:
Let A = {{a, 1}, {b, 1}, {c, 0}} and
B = {{a, 1}, {b, 1}, {c, 1}}.
Then A is comparable to B, since A is a subset of B.
Example 2 :
Let C = {{a, 1}, {b, 1}, {c, 0.5}} and
D = {{a, 1}, {b, 0.9}, {c, 0.6}}.
Then C and D are not comparable since
C is not a subset of D and
D is not a subset of C.
ea
Equality
yr
.m
w
w
Let A and B be fuzzy sets defined in the same space X.
,w
ty
or
Example.
R
.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Note : If equality A(x) = B(x) is not satisfied even for one element x in
the set X, then we say that A is not equal to B.
22
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Operation
ea
Complement
yr
.m
w
w
Let A be a fuzzy set defined in the space X.
,w
ty
or
Then the fuzzy set B is a complement of the fuzzy set A, if and only if,
ab
kr
ha
.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
23
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Operation
ea
Example 2.
yr
.m
w The empty set and the universal set X, as fuzzy sets, are
w
,w
ty
' = X , X' =
kr
ha
C
C
R
.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Compliment
FuzzyPlot [EMPTY, UNIVERSALSPACE]
24
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Operation
ea
Union
yr
.m
w Let A and B be fuzzy sets defined in the space X.
w
,w
ty
The union is defined as the smallest fuzzy set that contains both A and B.
or
ab
kr
A(x) = 0.6 and B(x) = 0.4 (A B)(x) = max [0.6, 0.4] = 0.6
.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Union
FuzzyPlot [UNION]
The notion of the union is closely related to that of the connective "or".
Let A is a class of "Young" men, B is a class of "Bald" men.
If "David is Young" or "David is Bald," then David is associated with the
union of A and B. Implies David is a member of A B.
25
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Operation
ea
Intersection
yr
.m
w
w
,w
as the greatest fuzzy set that include both A and B. Intersection of A and
ab
kr
ha
intersection operation :
for all x in the set X, (A B)(x) = Min (A(x), B(x)).
Fuzzy Intersection : (A B)(x) = min [A(x), B(x)] for all x X
A(x) = 0.6 and B(x) = 0.4 (A B)(x) = min [0.6, 0.4] = 0.4
.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Union
FuzzyPlot [INTERSECTION]
26
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Operation
ea
Difference
yr
.m
w
w
,w
.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
ea
2.3 Fuzzy Properties
yr
.m
w
w
,w
Identity:
A =A
input = Equality [SMALL EMPTY , SMALL]
output = True
AX=X
input = Equality [SMALL UnivrsalSpace , UnivrsalSpace]
output = True
Idempotence :
AA=A
input = Equality [SMALL SMALL , SMALL]
output = True
Commutativity :
AB =BA
input = Equality [SMALL MEDIUM, MEDIUM SMALL]
output = True
28
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Properties
ea
[Continued from previous slide]
yr
.m
Associativity:
w
w
,w
ty
A (B C) = (A B) C
or
ab
kr
output = True
R
Small = FuzzySet {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4}, {6, 0.3},
{7, 0.2}, {8, 0.1}, {9, 0.7 }, {10, 0.4 }, {11, 0}, {12, 0}}
Medium = FuzzySet {{1, 0 }, {2, 0 }, {3, 0}, {4, 0.2}, {5, 0.5}, {6, 0.8},
{7, 1}, {8, 1}, {9, 0 }, {10, 0 }, {11, 0.1}, {12, 0}}
29
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Properties
ea
Properties Related to Intersection
yr
.m
w
w
Absorption, Identity, Idempotence, Commutativity, Associativity.
,w
ty
or
ab
A =
C
C
R
Identity :
A X=A
input = Equality [Small UnivrsalSpace , Small]
output = True
Idempotence :
A A=A
input = Equality [Small Small , Small]
output = True
Commutativity :
A B=B A
input = Equality [Small Big , Big Small]
output = True
Associativity :
A (B C) = (A B) C
input = Equality [Small (Medium Big), (Small Medium) Big]
output = True
30
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Properties
ea
Additional Properties
yr
.m
w
w
Related to Intersection and Union
,w
ty
or
ab
Distributivity:
kr
ha
A (B C) = (A B) (A C)
C
C
R
Distributivity:
A (B C) = (A B) (A C)
input = Equality [Small (Medium Big) ,
(Small Medium) (Small Big)]
output = True
A A' = X
input = Equality [Small NotSmall , UnivrsalSpace ]
output = True
Law of contradiction
A A' =
input = Equality [Small NotSmall , EmptySpace ]
output = True
31
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Properties
ea
Cartesian Product Of Two Fuzzy Sets
yr
.m
w
w
,w
Let A and B be two crisp sets in the universe of discourse X and Y..
ab
kr
ha
Defined as A x B = { (a , b) a A , b B }
Note : Generally AxB BxA
Example : Graphic representation of A x B
B
Let A = {a, b, c} and B = {1, 2}
2
then A x B = { (a , 1) , (a , 2) ,
(b , 1) , (b , 2) , 1
(c , 1) , (c , 2) } A
a b c
32
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Relations
ea
3. Fuzzy Relations
yr
.m
w
w
Fuzzy Relations describe the degree of association of the elements;
,w
ty
or
Fuzzy relations offer the capability to capture the uncertainty and vagueness
C
R
In this section, first the fuzzy relation is defined and then expressing fuzzy
relations in terms of matrices and graphical visualizations. Later the
properties of fuzzy relations and operations that can be performed with fuzzy
relations are illustrated.
33
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Relations
ea
3.1 Definition of Fuzzy Relation
yr
.m
w
w
Fuzzy relation is a generalization of the definition of fuzzy set
,w
ty
or
Note :
Definition of fuzzy relation is a generalization of the definition of fuzzy
set from the 2-D space (x , , R (x)) to 3-D space ((x , y) , R (x , y)).
Cartesian product A x B is a relation by itself between x and y .
ea
Example of Fuzzy Relation
yr
.m
w
w
R = { ((x1 , y1) , 0)) , ((x1 , y2) , 0.1)) , ((x1 , y3) , 0.2)) ,
,w
ty
or
y y1 Y2 Y3
x
x1 0 0.1 0.2
R
X2 0.7 0.2 0.3
X3 1 0.6 0.2
1 Note : Since the values of the
.8
.6
membership function 0.7, 1, 0.6
.4 are in the direction of x below the
.2
1 2 3 y major diagonal (0, 0.2, 0.2) in the
0
matrix are grater than those
1
0.1, 0.2, 0.3 in the direction of y,
2
we therefore say that the relation
3
x R describes x is grater than y.
35
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Relations
ea
3.2 Forming Fuzzy Relations
yr
.m
w Assume that V and W are two collections of objects.
w
,w
ty
or
The first item is a list containing element and membership grade pairs,
ha
C
C
{{v1, w1}, R11}, {{ v1, w2}, R12}, ... , {{ vn, wm}, Rnm}}.
R
where { v1, w1}, { v1, w2}, ... , { vn, wm} are the elements of the relation
are defined as ordered pairs, and { R11 , R12 , ... , Rnm} are the membership
grades of the elements of the relation that range from 0 to 1, inclusive.
The second item is the universal space; for relations, the universal space
where the first pair defines the universal space for the first set and the second
pair defines the universal space for the second set.
Example showing how fuzzy relations are represented
Let V = {1, 2, 3} and W = {1, 2, 3, 4}.
A fuzzy relation R is, a function defined in the space V x W, which takes
values from the interval [0, 1] , expressed as R : V x W [0, 1]
R = FuzzyRelation [{{{1, 1}, 1}, {{1, 2}, 0.2}, {{1, 3}, 0.7}, {{1, 4}, 0},
{{2, 1}, 0.7}, {{2, 2}, 1}, {{2, 3}, 0.4}, {{2, 4}, 0.8},
{{3, 1}, 0}, {{3, 2}, 0.6}, {{3, 3}, 0.3}, {{3, 4}, 0.5},
UniversalSpace {{1, 3, 1}, {1, 4, 1}}]
This relation can be represented in the following two forms shown below
Membership matrix form 1 Graph form
.8
w w1 w2 w3 w4 .6
v .4
v1 1 0.2 0.7 0 .2
R
v2 0.7 1 0.4 0.8 0 1 2 3 4w
2
3
v
Vertical lines represent membership grades
Elements of fuzzy relation are ordered pairs {vi , wj}, where vi is first and
wj is second element. The membership grades of the elements are
represented by the heights of the vertical lines.
36
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Relations
ea
3.3 Projections of Fuzzy Relations
yr
.m
w
w
Definition : A fuzzy relation on A x B is denoted by R or R(x , y) is
,w
ty
or
function. The first, the second and the total projections of fuzzy
relations are stated below.
R
(1)
= {(x) , R(1) (x , y))}
= {(x) , max R (x , y)) | (x , y) AxB}
Y
R
(2)
= {(y) , R(2) (x , y))}
= {(y) , max R (x , y)) | (x , y) AxB}
X
{ R (x , y) | (x , y) AxB}
(T) max max
R =
X Y
ea
Example : Fuzzy Projections
yr
.m
w
w
The Fuzzy Relation R together with First, Second and Total Projection
,w
ty
or
(1)
y y1 y2 y3 y4 Y5 R
ha
C
x
C
R
(2)
R 0.3 0.6 1 0.9 0.6 1 = R(T)
Note :
(1)
For R select max means max with respect to y while x is considered fixed
Y
For R(2) select max means max with respect to x while y is considered fixed
x
R(1) R(2)
1 1
.8 .8
.6 .6
.4 .4
.2 .2
0 x y
0
1 2 3 4 5 1 2 3 4 5
(1) (2)
Fig Fuzzy plot of 1st projection R Fig Fuzzy plot of 2nd projection R
38
fo
.in
rs
de
SC - Fuzzy set theory Fuzzy Relations
ea
3.4 Max-Min and Min-Max Composition
yr
.m
w
w
The operation composition combines the fuzzy relations in different
,w
ty
or
Max-Min Composition
function R1 R2 defined as
R1 R2 = { ((x , z) , max(min (R1 (x , y) , R2 (y , z))))} ,
Y
(x , z) AxC, y B
ea
Example : Max-Min Composition
yr
.m
w Consider the relations R1(x , y) and R2(y , z) as given below.
w
,w
ty
or
ab
y y1 y2 y3 z z1 z2 z3
kr
x y
ha
C
R2
R
y3 0.5 0 0.4
Note : Number of columns in the first table and second table are equal.
Compute max-min composition denoted by R1 R2 :
Step -1 Compute min operation (definition in previous slide).
Consider row x1 and column z1 , means the pair (x1 , z1) for all yj ,
j = 1, 2, 3, and perform min operation
min (R1 (x1 , y1) , R2 (y1 , z1)) = min (0.1, 0.8) = 0.1,
min (R1 (x1 , y2) , R2 (y2 , z1)) = min (0.3, 0.2) = 0.2,
For x = x1 , z = z1 , y = yj , j = 1, 2, 3,
Calculate the grade membership of the pair (x1 , z1) as
{ (x1 , z1) , max ( (min (0.1, 0.8), min (0.3, 0.2), min (0, 0.5) )
x2 0.8 1 0.3
ea
Example : Min-Max Composition
yr
.m
w The min-max composition is similar to max-min composition with the
w
,w
ty
function R1 R2 is defined by
R1 R2 = { ((x , z) , min (max (R1 (x , y) , R2 (y , z))))} ,
y
(x , z) AxC, y B
y y1 y2 y3 z z1 z2 z3
x y
R1 x1 0.1 0.3 0 y1 0.8 0.2 0
R2
x2 0.8 1 0.3 y2 0.2 1 0.6
y3 0.5 0 0.4
z z1 z2 z3
x
R1 R2 = x1 0.3 0 0.1
R1 R2 = R1 R2
41
fo
.in
rs
de
SC - Fuzzy set theory References
ea
4. References : Textbooks
yr
.m
w
w
1. "Neural Network, Fuzzy Logic, and Genetic Algorithms - Synthesis and
,w
ty
2. "Soft Computing and Intelligent Systems Design - Theory, Tools and Applications",
C
R
4. "Fuzzy Sets and Fuzzy Logic: Theory and Applications", by George J. Klir and
Bo Yuan, (1995), Prentice Hall, Chapter 1-9, page 1-278.
6. "Fuzzy Logic: Intelligence, Control, and Information", by John Yen, Reza Langari,
(1999 ), Prentice Hall, Chapter 1-7, page 1-167.
7. "Fuzzy Logic with Engineering Applications", by Timothy Ross, (2004), John Wiley
& Sons Inc, Chapter 1-4 , page 1-114.
8. "Fuzzy Logic and Neuro Fuzzy Applications Explained", by Constantin Von Altrock,
(1995), Prentice Hall, Chapter 1-2, page 1-28.
42