You are on page 1of 47

Chapter 2

Fuzzy sets and basic operations


on fuzzy sets
Contents
• From classical sets to fuzzy sets
• Basic concepts associated with fuzzy sets
• Operations on fuzzy sets

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 2


Classical Sets

• Classical sets have crisp boundaries


• Example: Numbers greater than 6
• Clear, Unambiguous boundary

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 3


The crisp sets vs the fuzzy sets
• The crisp set is defined in such a way as to dichotomize the
individuals in some given universe of discourse into two
groups: members and nonmembers.
▫ However, many classification concepts do not exhibit
this characteristic.
▫ For example, the set of tall people, expensive cars, or
sunny days.
• A fuzzy set can be defined mathematically by assigning to
each possible individual in the universe of discourse a value
representing its grade of membership in the fuzzy set.
▫ For example: a fuzzy set representing our concept of sunny
might assign a degree of membership of 1 to a cloud cover
of 0%, 0.8 to a cloud cover of 20%, 0.4 to a cloud cover of
30%, and 0 to a cloud cover of 75%.

Chap. 2 Mathematical Models of Systems 4


Crisp sets: an overview
• Three basic methods to define sets:
▫ The list method: a set is defined by naming all its members.
A  {a1 , a2 ,..., an }
▫ The rule method: a set is defined by a property satisfied by its
members.
A  {x | P(x)}
where ‘|’ denotes the phrase “such that”
P(x): a proposition of the form “x has
the property P ”
▫ A set is defined by a characteristic
 (x) 
function.A
0 for x 

the characteristic function
1 A for x  A
A : X  {0,1}

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 5


Crisp sets: an overview

• The union of sets A and B:


A  B  {x | x  A or x  B}
• The generalized union operation: for a family of sets,
 Ai  {x | x  Ai for some i  I}
iI

• The intersection of sets A and B:


A  B  {x | x  A and x  B}
• The generalized intersection operation: for a family of sets,
 Ai  {x | x  Ai for all i  I}
iI

• Disjoint: any two sets that have no common members


AB

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 6


Supremum and infimum
• Let R denote a set of real number.
▫ If there is a real number r such that x  r for every x  R ,
then
r is called an upper bound of R, and A is bounded above by r.
▫ If there is a real number s such that x  s for every x  R ,
then
s is called an lower bound of R, and A is bounded below by s.

• For any set of real numbers R that is bounded above, a real


number r is called the supremum of R (write r = sup R) iff:
(a)r is an upper bound of R;
(b)no number less than r is an upper bound of R (R is the
smallest upper bound).
• For any set of real numbers R that is bounded below, a real
number s is called the infimum of R (write s = inf R) iff:
(a)s is an lower bound of R;
(b)no number greater than s is an lower bound of R (R is the
largest lowerChap.
bound).
2 Fuzzy sets and basic operations on fuzzy sets 7
From classical sets to fuzzy sets
• Let be the universe of discourse, or universal set, which contains all the
possible elements of concern in each particular context or application.

• In the rule method, a set is represented as

• which introduces a zero-one membership function (also called characteristic


function, discrimination function, or indicator function) for , denoted by , such
that

• The set A is mathematically equivalent to its membership function in the


sense that knowing is the same as knowing itself.

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 8


From classical sets to fuzzy sets
• Example. 2.1
– Consider the set of all cars in Berkeley. This is the universe of discourse . We
can define different sets in according to the properties of cars.

or

Figure 2.1. Partitioning of the set of all cars in Berkeley into subsets
by: (a) US cars or non-US cars, and (b) number of cylinders.

– If we want to define a set in U according to whether the car is a US car or a non-


US car.
– US car and a non-US car is not as crisp, because many of the components for
what we consider to be US cars (for examples, Fords, GM's, Chryslers) are pro-
duced outside of the United States.
– Additionally, some "non-US" cars are manufactured in the USA. How to deal with
this kind of problems?

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 9


From classical sets to fuzzy sets
• Example. 2.1

– Essentially, the difficulty in Example 2.1 shows that some sets do


not have clear boundaries.

– Classical set theory requires that a set must have a well-defined


property, therefore it is unable to define the set like "all US cars
in Berkeley."

– To overcome this limitation of classical set theory, the concept of


fuzzy set was introduced. It turns out that this limitation is
fundamental and a new theory is needed-this is the fuzzy set
theory.

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 10


Fuzzy Sets

• Sets with fuzzy boundaries

A = Set of tall people

Crisp set A Fuzzy set A


1.0 1.0
.9
.5 Membership
function

180 cm Heights 180 190 Heights

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 11


From classical sets to fuzzy sets
• Definition. 2.1 fuzzy set is characterized by a membership function
that takes values in the interval [0, 1]

– fuzzy set in may be represented as a set of ordered pairs of a generic element


x and its membership value, that is,
ordered pairs :

– When is continuous (for example, ), A is commonly written as


IF is continuous :

– where the integral sign does not denote integration; it denotes the collection of all
points with the associated membership function . When is discrete, is commonly
written as
IF is discrete :

– where the summation sign does not represent arithmetic addition; it denotes the
collection of all points x E U with the associated membership function .

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 12


Fuzzy Sets
• A membership function:
▫ A characteristic function: the values assigned to the elements of
the universal set fall within a specified range and indicate the
membership grade of their elements in the set.
▫ Larger values denote higher degrees of set membership.
• A set defined by membership functions is a fuzzy set.
• The most commonly used range of values of membership
functions is the unit interval [0,1].
• Notation:
▫ The membership function of a fuzzy set A is denoted by  A
:
A : X  [0,1]
▫ In the other one, the
function is denoted by A and
has the same form
A : X  [0,1]
▫ In this course,
Chap. 2we use
Fuzzy sets the
and basic operations on fuzzy sets 13
From classical sets to fuzzy sets
• Example. 2.1 (cont’d)
– We can define the set 'US cars in Berkeley,"
denoted by D, as a fuzzy set according to the
percentage of the car's parts made in the USA
is defined by the membership function :

– where is the percentage of the parts of car x


made in the USA and it takes values from 0% to
100%.
– For example, if a particular car xo has 60% of
its parts made in the USA, then we say that the
car xo belongs to the fuzzy set D to the degree
of 0.6.
– we can define the set "non-US cars in
Berkeley," denoted by F, as a fuzzy set with the
membership function :
Figure 2.2. Membership functions for US (pD)
and nonUS(pF) cars based on the percentage of
A set of US car = {(Fords, 1), (GM, 0.5), (new car, 0.6)} parts of the car made in the USA (p(x)).

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 14


From classical sets to fuzzy sets
• Example. 2.2
– Let be a fuzzy set named "numbers close to zero." Then a possible membership
function for is :
(2.10)

– where . This is a Gaussian function with mean equal to zero and standard
– derivation equal to one. According to this membership function, the numbers 0
and 2 belong to the fuzzy set to the degrees of and , respectively.

– We also may define the membership function for as


(2.11)

– According to this membership function, the numbers 0 and 2 belong to the fuzzy
set Z to the degrees of 1 and 0, respectively. (2.10) and (2.11) are plotted graphi-
cally in Figs. 2.3 and 2.4, respectively. We can choose many other membership
functions to characterize "numbers close to zero."

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 15


From classical sets to fuzzy sets
• Example. 2.2
– From Example 2.2 we can draw three important remarks on fuzzy sets:

Remark1.
– The properties that a fuzzy set is used to characterize are usually fuzzy,
for example, "numbers close to zero" is not a precise description.
– Therefore, we may use different membership functions to characterize the same
description.

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 16


From classical sets to fuzzy sets

Remark 2.
– How to determine the membership functions?

– The first approach is to use the knowledge of human experts. The membership fun
tions represent a part of human knowledge. fine-tuning is required.

– In the second approach, we use data collected from various sensors . we first spec
ify the structures of the membership functions and then fine-tune the parameters of
the membership functions based on the data.

Remark 3.
– A fuzzy set has a one-to-one correspondence with its membership function.
– when we say a fuzzy set, there must be a unique membership function asso-
ciated with it
– Fuzzy sets and their membership functions are equivalent in this sense.

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 17


Membership Functions (MFs)
• Characteristics of MFs:
▫ Subjective measures
▫ Not probability
functions
MFs “tall” in China

.8
.5 “tall” in the Norway

“tall” in NBA
.1
178 cm Heights

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 18


From classical sets to fuzzy sets

• Formal definition:
A fuzzy set A in X is expressed as a set of ordered
pairs:

A  {( x,  A ( x ))| x  X }
Membership X: Universe or
Fuzzy set
function (MF) universe of discourse

A fuzzy set is totally characterized by a


membership function (MF).

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 19


Fuzzy Sets with Discrete Universes
• Fuzzy set C = “desirable city to live in”
X = {Tehran, Tabriz, Rasht} (discrete and non-ordered)
C = {(Tehran, 0.1), (Tabriz, 0.8), (Rasht, 0.9)}
• Fuzzy set A = “sensible number of children in a family”
X = {0, 1, 2, 3, 4, 5, 6} (discrete ordered universe)
A = {(0, .1), (1, .3), (2, .7), (3, 1), (4, .6), (5, .2), (6, .1)}

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 20


Fuzzy Sets with Cont. Universes

• Fuzzy set B = “about 50 years old”


X = Set of positive real numbers (continuous)
B = {(x, B(x)) | x in X}

1
 B( x ) 2
 1   x  5 0
 10 

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 21


Alternative Notation

• A fuzzy set A can be alternatively denoted


as follows:
X is discrete A 
x i X A ( xi ) / xi

X is continuous
A  X A (x)/
x
Note that  and integral signs stand for the union of
membership grades; “/” stands for a marker and
does not imply division.

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 22


Alternative Notation
• Examples:

A is discrete

C is discrete

B is continuous

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 23


From classical sets to fuzzy sets
Classical examples from Zadeh's seminal paper (Zadeh [1965]).

• Example. 2.3(continuous domain)


– Let U be the interval [0, 100] representing the age of ordinary humans. Then we
may define fuzzy sets "young" and "old"

• Example. 2.4(discrete domain)


That is, 5 and 6 belong to the fuzzy set "several" with degree 1, 4 and 7 with degree
0.8, 3 and 8 with degree 0.5, and 1,2,9 and 10 with degree 0.

several = 0.5/3 + 0.8/4 + 1/5 + 1/6 + 0.8/7 + 0.5/8

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 24


Fuzzy Variable

• A fuzzy variable is defined by the quadruple


V = { x, l, u, m}
• X is the variable symbolic name: temperature
• L is the set of labels: low, medium and high
• U is the universe of discourse
• M are the semantic rules that define the
meaning of each label in L (membership
functions).

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 25


Fuzzy Variable Example
• X = Temperature
• L = {low, medium, high}
• U = {xX | -70o <= x <= +70o}
• M=

low medium high


1.0

0.0

-70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60


70

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 26


Membership Functions?

• Subjective evaluation:
The shape of the functions is defined by specialists
• Ad-hoc: choose a simple function that is suitable to solve the
problem
• Distributions, probabilities: information extracted from
measurements
• Adaptation: testing
• Automatic: algorithms used to define functions from data

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 27


Variable Terminology

• Completude: A variable is complete if for any x 


X there is a fuzzy set such as μ(x) > 0

1.0
Complete

0.0
-70 -60 -50 -40 -30 -20 - 0 10 20 30 40 50 60
10 70
1.0
Incomplete

0.0
-70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 28


Partition of Unity
• A fuzzy variable formsp a partition of unity if for each input
value x
  Ai (x) 
i1 1
• where p is the number of sets to which x belongs
• There is no rule to define the overlapping degree between
two neighbouring sets
• A rule of thumb is to use 25% to 50%
1,0 1,0

0,5 0,5

0,0 0,0

-70 -60-50 -40-30 -20 - 0 10 20 30 40 50 60 -70 -60-50 -40-30-20- 0 10 20 30 40 50 60


10 70 of
Partition 10 No Partition
70 of
Unity Unity
Chap. 2 Fuzzy sets and basic operations on fuzzy sets 29
MF Terminology

MF

.5

0
Core
Crossover points
 - cut
Support

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 30


Basic concepts associated with fuzzy sets
• Definition. 2.2
– The concepts of support, fuzzy singleton, center, crossover point, height, normal
fuzzy set, a-cut, convex fuzzy set, and projections are defined as follows.

 The support of a fuzzy set


– The support of a fuzzy set in the universe of discourse U is a crisp set that con-
tains all the elements of that have nonzero membership values in , that is,

where supp(A) denotes the support of fuzzy set A.

– If the support of a fuzzy set is empty, it is called an empty fuzzy set. fuzzy single-
ton is a fuzzy set whose support is a single point in .

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 31


Basic concepts associated with fuzzy sets
• Definition. 2.2

 The center of a fuzzy set


– if the mean value of all points at which the
membership function of the fuzzy set
achieves its maximum value is finite, then de-
fine this mean value as the center of the
fuzzy set;

– if the mean value equals positive (negative)


infinite, then the center is defined as the
smallest (largest) among all points that
achieve the maximum membership value.

– Fig. 2.7 shows the centers of some typical


fuzzy sets. The crossover point of a fuzzy set
is the point in U whose membership value in
A equals 0.5

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 32


Basic concepts associated with fuzzy sets
• Definition. 2.2
 – cut
– An a-cut of a fuzzy set is a crisp set , that contains all the elements in that have
membership values in greater than or equal to a, that is,
, crisp set

– For example, for a = 0.3, the a-cut of the fuzzy set (2.11) (Fig. 2.4) is the crisp set
[-0.7,0.7], and for a = 0.9, it is [-0.1,0.1].

 Convex fuzzy set.


– When the universe of discourse is the n-dimensional Euclidean space , the con-
cept of set convexity can be generalized to fuzzy set. fuzzy set is said to be con-
vex if and only if its -cut , is a convex set for any a in the interval (0, 1].
– A fuzzy set in is convex if and only if

for all , and all [0,1].

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 33


Convexity of Fuzzy Sets

• A fuzzy set A is convex if for any  in [0,


1],
 A ( x 1  ( 1   ) x 2 )  min(  A ( x 1 ),  A ( x 2 ))

Alternatively, A is convex is all its a-cuts


are convex.

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 34


MF Terminology

MF
• Normality: 1
• Fuzzy set A is normal
.5
if core is non-empty.
its
a
0
• In other words: Core
Crossover points
• We can always find a
a - cut
point x in X for which: Support

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 35


MF Terminology
MF
1

• Fuzzy Singleton: .5
• A fuzzy set whose 
0
support is a single point Core
in X is a fuzzy singleton Crossover points
 - cut
if:
Support

• Example:
• A fuzzy singleton
• “45 years old”
Chap. 2 Fuzzy sets and basic operations on fuzzy sets 36
Operations on fuzzy sets

• Definition. 2.3
– The equality, containment, complement, union, and intersection of two fuzzy sets
and are defined as follows.
iff for all
iff for all

– The complement of A is a fuzzy set A in whose membership function is defined


as
(2.19)

– The union of and is a fuzzy set in , denoted by , whose membership function is


defined as
(2.20)

– The intersection of and is a fuzzy set in with membership function as


(2.21)

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 37


Set-Theoretic Operations
• Containment or Subset:
A  B  A
 B

• Sets contain subsets.


• A is a subset of B (AB) iff
every element of A is an
element of B.
• A is a subset of B iff A
belongs to the power set of B
• A is a subset of B iff there is
no element of A that does not
belong to B
Chap. 2 Fuzzy sets and basic operations on fuzzy sets 38
Set-Theoretic Operations

• Complement:
AX A A ( x )  1  A
 (x)

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 39


Set-Theoretic Operations

• Union:
C  A  B  c ( x )  max( A ( x ), B ( x ))  A ( x )
B ( x )

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 40


Set-Theoretic Operations

• Intersection:
C  A  B  c ( x )  min( A ( x ), B ( x ))  A ( x )
B ( x )

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 41


Operations on fuzzy sets
• Definition. 2.3
– The reader may wonder why we use "max" for union and "min" for intersection;

– An intuitively appealing way of defining the union is the following: the union of
and is the smallest fuzzy set containing both and .

– More precisely, if is any fuzzy set that contains both and , then it also contains
the union of and . To show that this intuitively appealing definition is equivalent
to (2.20), we note, first, that as defined max contains both and because and .
Furthermore, if is any fuzzy set containing both and , then and .

– Therefore, , which means that as defined by (2.20) is the smallest fuzzy set con-
taining both and . The intersection as defined by (2.21) can be justified in the
same manner.

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 42


Operations on fuzzy sets
• Example. 2.5
– Consider the two fuzzy sets D and F.
– The complement of F, F, is the fuzzy set defined by

• Lemma. 2.2 (De Morgan's Law)

and
,
0

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 43


MF Formulation (one dimensional)


 xa ,c x 
Triangular MF: trimf ( x; a , b , c )  max 
   b  a c  b  ,0 
min  

trapmf ( x; a , b , c , d )  max   x  a ,1 d  x ,0 
Trapezoidal    b  a , d  c  
MF: min  
2
1  x  c 

2 a 
Gaussian MF: gaussmf (x;a,c) 
e
1
gbellmf ( x ; a, b , c ) 
Generalized bell xc
2b

1
MF: a

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 44


MF Formulation (one dimensional)

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 45


MF Formulation (one dimensional)

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 46


MF Formulation (one dimensional)

1
• Sigmoidal MF: sigmf ( x ; a , c )
 1  e a(xc)

Extensions:

Absolute difference
of two sig. MFs

Product of two sig.


MFs

Chap. 2 Fuzzy sets and basic operations on fuzzy sets 47

You might also like