You are on page 1of 90

MODULE-4

Fuzzy Sets

1
Module 4

• Introduction
• Fuzzy set operations
• Fuzzy relations
• Fuzzy membership functions
• Fuzzification
• Defuzzification
FUZZY LOGIC
 Fuzzy logic is the logic underlying approximate, rather than exact, modes of
reasoning.

 It is an extension of multivalued logic: Everything, including truth, is a


matter of degree.

 It contains as special cases not only the classical two-value logic and
multivalue logic systems, but also probabilistic logic.

 A proposition p has a truth value


• 0 or 1 in two-value system,
• element of a set T in multivalue system,
• Range over the fuzzy subsets of T in fuzzy logic.

3
FUZZY LOGIC
 Boolean logic uses sharp distinctions.

 Fuzzy logic reflects how people think.

 Fuzzy logic is a set of mathematical principles for


knowledge representation and reasoning based on degrees
of membership.

4
NEED OF FUZZY LOGIC
 Based on intuition and judgment.

 No need for a mathematical model.

 Provides a smooth transition between members and


nonmembers.

 Relatively simple, fast and adaptive.

 Less sensitive to system fluctuations.

 Can implement design objectives, difficult to express


mathematically, in linguistic or descriptive rules.

5
CLASSICAL SETS (CRISP SETS)

Conventional or crisp sets are Binary. An element


either belongs to the set or does not.

{True, False}

{1, 0}

6
OPERATIONS ON CRISP SETS

 UNION:

 INTERSECTION:

 COMPLEMENT:

 DIFFERENCE:

7
PROPERTIES OF CRISP SETS
The various properties of crisp sets are as follows:

8
PROPERTIES OF CRISP SETS

9
CHARACTERISTIC FUNCTION FOR SETS

• Associated with any set A defined over a universal set U is the


characteristic function  A defined by
1, if x  A;
 A ( x)  
0, otherwise.

• EXAMPLE:
• Let U = {1, 2, ….10} and A = {1, 3, 5, 7, 9}.
• Then
•  A (3)  1 and  A (4)  0.
FUZZY SETS

11
FUZZY SETS

• The dichotomous nature of the characteristic function was


extended to define the membership function which is the
origin of fuzzy sets

• Membership function is gradual

• In a fuzzy set context we say that the membership of an


element is graded

• Instead of the values for a characteristic function which are 0


or 1, the values for a membership function can assume any
value lying in the interval [0, 1]
MEMBERSHIP FUNCTION

 We shall denote the membership function of a fuzzy set A


defined over a universal set U by  A , which is defined as
 A : U  [0,1]
such that for each x U ,
 A ( x)   , 0    1.
• Each fuzzy set is completely and uniquely defined by one
particular membership function.

• The fuzzy membership functions are not only dependent


upon the concept but also upon the context.
WHAT IS ACHIEVED?

What is gained through fuzzification is:


• greater generality
• higher expressive power
• an enhanced ability to model real world problems
• and most importantly, a methodology for exploiting the
tolerance for imprecision
• a methodology which serves to achieve tractability,
robustness and lower solution cost
REPRESENTATION OF FUZZY SETS

 There are several different ways in which a fuzzy set can be


represented.
 I. A fuzzy set is denoted by an ordered set of pairs, the first
element of which denotes the element and the second the
degree of membership.
 Let X be a set. Then a fuzzy set A in X is denoted by the
collection of pairs {( x,  A ( x)) x  X }.
 Example
 Let U = {1,2,3,4,5,6}. Then A = {(1, 0.6),(2, 0.3),(4, 0.7),(5,1)}
is a fuzzy set on U.
Note that the elements 3 and 6 have membership values 0.
REPRESENTATION OF FUZZY SETS CONTD…

• A fuzzy set A can be represented as


A   A ( x1 ) x1   A ( x2 ) x2  ...   A ( xn ) xn  ...
   A ( xi ) xi .
i

• The ‘+’ , ‘/’ and '  ' symbols have not been used with their
usual meanings, these are only representational.

• For example, the fuzzy set example above can be represented


as
A  .6 1  .3 2  .7 4  1 7.
OPERATIONS ON FUZZY SETS

17
Operation on Fuzzy sets

18
Operation on Fuzzy sets

19
PROPERTIES OF FUZZY SETS

20
PROPERTIES OF FUZZY SETS

21
Problem :1
Consider two given fuzzy sets

Perform union, intersection, difference and complement over fuzzy A and B

22
Problem 2
Problem 3
Consider two fuzzy set

A(x)={(x1,0.1),(x2,0.2),(x3,0.3),(x4,0.4)}
B(x)={(x1,0.5),(x2,0.7),(x3,0.8),(x4,0.9)}

Find the algebraic product, algebraic sum,


bounded sum and bounded difference of the
given fuzzy sets.

24
The Algebraic product
The Algebraic product of two fuzzy sets A(x) and
B(x) for all x ∈ X, is denoted by A(x).B(x) and
defined as follows
A(x).B(x) = {(x, μA(x).μB(x)), x ε X }
Example
A(x) = {(x1,0.1),(x2,0.2),(x3,0.3),(x4,0.4)}
B(x) = {(x1,0.5),(x2,0.7),(x3,0.8),(x4,0.9)}
A(x).B(x) = (x1,0.05),(x2,0.14),(x3,0.24),(x4,0.36)}
25
Algebraic sum of two fuzzy sets
μA+B(x) = μA(x)+μB(x) - μA(x).μB(x)
A(x)={(x1,0.1),(x2,0.2),(x3,0.3),(x4,0.4)}
B(x)={(x1,0.5),(x2,0.7),(x3,0.8),(x4,0.9)}

Now (x)+B(x) =
{(x1,0.55),(x2,0.76),(x3,0.86),(x4,0.94)}

26
Bounded sum
A(x)={(x1,0.1),(x2,0.2),(x3,0.3),(x4,0.4)}
B(x)={(x1,0.5),(x2,0.7),(x3,0.8),(x4,0.9)}
Ans :{(x1,0.6),(x2,0.9),(x3,1.0),(x4,1.0)}
Bounded difference
A(x)={(x1,0.1),(x2,0.2),(x3,0.3),(x4,0.4)}
B(x)={(x1,0.5),(x2,0.7),(x3,0.8),(x4,0.9)}
Ans ::{(x1,0),(x2,0),(x3,0),(x4,0)}
Classical Relation and Fuzzy
Relation
RELATIONS
 Relations represent mappings between sets and connectives in logic.

 A classical binary relation represents the presence or absence of a


connection or interaction or association between the elements of
two sets.

 Fuzzy binary relations are a generalization of crisp binary relations,


and they allow various degrees of relationship (association) between
elements.
Classical Relation
Consider the two universe X and Y; their cartesion product X x Y
is given by

The cartesion product forms of ordered pair of every x∈ 𝑋 and y


∈ Y.
Every element in X is completely releated to ordered pair to
every element in Y
Example
Consider the elements defined in the universe X and Y as follows
X={2,4,6} and Y = {p,q,r}

The cartesian product of thes two sets lead to


X x Y= {(p,2),(p,4),(p,6),(q,2),(q,4),(q,6),(r,2),(r,4),(r,6)}

From this set one may select a subsets such that


R={(p,2), (q,4), ),(r,4),(r,6)}
The relation could equivalentely be represented using a matrix
p q r
2 1 0 0
4 0 1 1
6 0 0 1
RELATION IN TERMS OF CHARACTERISTIC FUNCTION

The characteristic function is used to assign values of relationship R as the


mapping of the Cartesian space X × Y to the binary values of (0, 1):

1, if ( x, y)  R,
 R ( x, y )  
0, if ( x, y )  R.
The constrained cartesion product for sets when r=2(AxA) is called
Identity relation
Unconstrained cartesion product for set when r =2 is called universal
relation
Consider set A={2,4,6}
Identity relation ={(2,2)(4,4)(6,6)
Universal relation= {(2,2)(2,4)(2,6),(4,2),(4,4)(4,6),(6,2),(6,4),(6,6)}
SPECIAL RELATIONS

• Define R and S as two separate relations on the Cartesian universe


X×Y
• define the null relation and the complete relation as the relation
matrices O and E, respectively.
• An example of a 4 × 4 form of the O and E matrices is given here is

0 0 0 0  1 1 1 1
0 0 0 0  1 1 1 1
O  E 
0 0 0 0  1 1 1 1
   
0 0 0 0  1 1 1 1
• Since relations are sets their union, intersection and complements
are defined just as for sets
COMPOSITION OF RELATIONS

• There are two common forms of the composition operation


• one is called the max–min composition
• the other the max–product composition
• Let R be a relation from X to Y and S be a relation from Y to Z
and we define T = R ◦ S,

• (max-min) T ( x, z )   (  R ( x, y)   R ( y, z ))
yY

• (max-product) T ( x, z )   (  R ( x, y)   R ( y, z ))
yY
EXAMPLE

• Let X = {x1, x2, x3}, Y = {y1, y2, y3, y4} and Z = {z1, z2}.
• R = { (x1, y1), (x1, y3), (x2, y4)}
• S = { (y1, z2), (y3, z2)}
• The relation matrices are given by

1 0 1 0  0 1
0 0 1 
  0  0 0
• R= 0 0 0 1
  and S=  . Then T =
0 1  
0 0 0 0   0 0 
0 0
T ( x1, z1)  max[min(1, 0), min(0, 0), min(1, 0), min(0, 0)] = 0
T ( x1, z 2)  max[min(1, 1), min(0, 0), min(1, 1), min(0, 0)] = 1
FUZZY RELATIONS

A fuzzy relation from a set X to a set Y is a fuzzy subset of X × Y


• Let R an S be two fuzzy relations on X × Y. Then
• Union
 R S ( x, y)  max{ R ( x, y), S ( x, y)}
• Intersection
R S ( x, y)  min{R ( x, y), S ( x, y)}
• Complement
R ( x, y)  1  R ( x, y)
C

• Subrelation
RS iff  R ( x, y )  S ( x, y )
PROPERTIES OF FUZZY RELATIONS

• The properties of commutativity, associativity, distributivity,


involution, and idempotency all hold for fuzzy relations

• De Morgan’s principles hold for fuzzy relations

• R RC  E ,where E is the complete relation

• R RC  O ,where O is the null relation


FUZZY CARTESIAN PRODUCT

• Let A be a fuzzy set on universe X and B be a fuzzy set on


universe Y, then the Cartesian product between fuzzy sets A
and B will result in a fuzzy relation R, which is contained
within the full Cartesian product space,
A B  R  X Y

R ( x, y)   AB ( x, y)  min{ A ( x),  B ( y)}

• Each of the fuzzy sets could be thought of as a vector of


membership values; each value is associated with a
particular element in each set.
EXAMPLE OF FUZZY CARTESIAN PRODUCT

• Let A be a fuzzy set (vector) having four elements


• Then A can be represented as a column vector of size 4 × 1

• Let B be a fuzzy set (vector) having five elements


• Then B can be represented as a row vector size of 1 × 5

• The resulting fuzzy relation R will be represented by a matrix


of size 4 × 5, that is, R will have four rows and five columns
EXAMPLE OF FUZZY CARTESIAN PRODUCT

• Let X = {x1, x2, x3} and Y = {y1, y2}


• Let A and B be two fuzzy sets defined over X and Y
respectively by
• A = {(x1,0. 2), (x2, 0.5), (x3,1)} and B = { (y1, 0.3 ), (y2, 0.9) }.
• A can be represented as a column vector 0.2
0.5
 
 1 
• B can be represented as a row vector [0.3 0.9]
• The fuzzy Cartesian product A  B is given by a 3 x 2 matrix
(0.2,0.3) (0.2,0.9)  0.2 0.2 
(0.5,0.3) (0.5,0.9)  0.3 0.5
(1,0.3) (1,0.9) 
 0.3 0.9 
COMPOSITION OF FUZZY RELATIONS

• Composition of fuzzy relations can be defined just as it is for


crisp (binary) relations
• Suppose R is a fuzzy relation on the Cartesian space X × Y
• S is a fuzzy relation on Y × Z
• Then the composition 𝑆𝑜𝑅 = T is a fuzzy relation on X × Z
• Then fuzzy max–min composition is defined in terms of the
set-theoretic notation and membership function-theoretic
notation in the following manner:
T ( x, z )   (  R ( x, y )   S ( y, z ))
yY
• Neither CRISP nor FUZZY COMPOSITION are commutative in
general, that is R SS R
EXAMPLE (Max- Min composition)

• Let X = {x1, x2}, Y = {y1, y2}, and Z = {z1, z2, z3}.


• R and S be given by
Y1 y2 z1 z2 z3
X1 0.7 0.5 Y1  0.9 0.6 0.2 
x2  0.8 0.4 y2  
  0.1 0.7 0.5 

• The resulting composition R o S, which relates elements of X


to elements of Z is defined on the Cartesian space X x Z as
z1 z2 z3
X1  0.7 0.6 0.5 
x2  
 0.8 0.6 0.4 
T ( x1, z1)  max[min(0.7, 0.9), min(0.5, 0.1)]  0.7
max(0.7,0.1)= 0.7
EXAMPLE

• If we take the max product composition then


z1 z2 z3
x1  0.63 0.42 0.25
T=
x2 0.72 0.48 0.20
 
CLASSICAL EQUIVALENCE RELATION

44
45
CLASSICAL TOLERANCE RELATION

46
FUZZY EQUIVALENCE RELATION

47
FUZZY TOLERANCE RELATION
A binary fuzzy relation that possesses the properties of
reflexivity and symmetry is called fuzzy tolerance relation or
resemblance relation.

The equivalence relations are a special case of the tolerance


relation. The fuzzy tolerance relation can be reformed into
fuzzy equivalence relation in the same way as a crisp
tolerance relation is reformed into crisp equivalence relation,
i.e.,

where ‘n’ is the cardinality of the set that defines R1.

48
Problem
• Consider the following two fuzzy sets:
0.3 0.7 1
𝐴= + +
𝑥1 𝑥2 𝑥3

0.4 0.9
𝐵= +
𝑦1 𝑦2

Perform the cartesian product over these given


fuzzy sets.
Answer
0.3 0.3
R= 0.4 0.7
0.4 0.9
Problem
Two fuzzy relation are given by

Obtain the fuzzy relation T as a composition


between the fuzzy relation.
Max- min composition
Max- production
MEMBERSHIP FUNCTIONS
Membership Functions
• Membership function defines the fuzziness in a fuzzy set
irrespective of the element in the set, which are discrete or
continuous

• It represented in graphical form

• A fuzzy set A in the universe of disclosure X can defined as a set of


ordered pairs: A={(x,μA(x))|xϵX}

Where μA(.) is called membership of A

• The membership value range in the interval [0,1]


Characteristics Of Fuzzy Membership
Core
The core of a membership function for some fuzzy set A is
defined as that region of the universe that is characterized by
complete and full membership in the set A.

That is, the core comprises of those elements x of the universe


such that = 1.

54
Characteristics Of Fuzzy Membership
Support
• The support of a membership function for some fuzzy set A is
defined as that region of the universe that is characterized by
nonzero membership in the set A.

• That is, the support comprises of those elements x of the


universe such that >0.
Characteristics Of Fuzzy Membership
Boundary
The boundaries of a membership function for some fuzzy set A
are defined as that region of the universe containing elements
that have a nonzero membership but not complete membership.

That is, the boundaries comprise those elements x of the universe


such that
FEATURES OF MEMBERSHIP FUNCTIONS

 CORE:

 SUPPORT:

 BOUNDARY:
Characteristics Of Fuzzy Membership
• A normal fuzzy set is one whose membership function has at
least one element x in the universe whose membership value is
unity.

• In fuzzy sets, where one and only one element has a


membership equal to one, the element is typically referred to as
the prototype of the set, or the prototypical element.

• A fuzzy set wherein no membership function has its value equal


to 1 is sub normal fuzzy set

58
CHARACTERISTICS OF FUZZY MEMBERSHIP
A convex fuzzy set is described by a membership function whose
membership values are strictly monotonically increasing, or
strictly monotonically decreasing, or whose membership values
are strictly monotonically increasing then strictly monotonically
decreasing with increasing values for elements in the universe.

Nonconvex fuzzy set


The membership function are not strictly monotonically
increasing or decreasing or strictly monotonically increasing than
decreasing.

59
FUZZIFICATION
Intuition
• It is simply derived from the capacity of human to develop
membership functions through their own innate intelligence
and understanding.

61
Inference
• In inference method we use knowledge to
perform deductive reasoning
• To deduce or infer a conclusion, we have to
use the facts and knowledge on that particular
problem

62
Inference
Let A, B, C be the interior angles of a triangle such that
A ≥ B ≥ C > 0° and A + B + C = 180°
For this purpose we are having or defining 5 types of triangles namely:
R = Approximately Right-Angle Triangle
I = Approximately Isosceles Triangle
E = Approximately Equilateral Triangle
I.R = Isosceles Right-Angle Triangle
T = Other type of Triangle

Now we can infer membership values for all those type of triangles through

the method of inference because we posses the knowledge about the

geometry of their shapes for assigning membership values.

63
Inference
• Below given are the membership values for
the 5 types of triangles defined above.

64
Rank Ordering
• In Rank Ordering method preferences are assigned by a single
individual, committee, a poll and other opinion methods can
be used to assign membership values to fuzzy variables. Here
preference is determined by pairwise comparisons and these
are used to determine ordering of the membership.

65
Problem
• Suppose the 10000 people to questionnaire about
the pairwise preference among five cars,
X={Maruti 800, Scorpio, matiz, Santro, Octavia}.
Define a Fuzzy set A on the universe of cars “best
cars”.

April 2007 66
• Solution

67
Problem
• Using the inference approach, find the
membership values for the triangular shapes
I,R,E,IR and T for a triangle with angles 45,55
and 80

68
DEFUZZIFICATION
FUZZIFICATION

• Fuzzification is the process of making a crisp set fuzzy


• We do this by simply recognizing that many of the quantities
that we consider to be crisp and deterministic are actually
not deterministic at all; they carry considerable uncertainty
• If the form of uncertainty happens to arise because of
imprecision, ambiguity, or vagueness, then the variable is
probably fuzzy and can be represented by a membership
function.
• The representation of imprecise data as fuzzy sets is a useful
but not mandatory step when those data are used in fuzzy
systems
FUZZIFICATION CONTD…

• Example 1:
• Suppose in the reading of a voltage, we say it is low voltage
• We need not measure it precisely
• When we measure it precisely it may be 0.3
• That is the membership value of the current voltage in the
fuzzy set representing low voltage is 0.3
• The membership function for “low” may be given by
0, if x  80;
 80  x

 Low ( x)   , if 50  x  80;
 x  20

1, if x  50.
EXAMPLES OF FUZZIFICATION

• Example 2:
• We can say that somebody is young
• He may be 37 years
• But when we measure it precisely we say he is 0.92 young

• Example 3:
• In finding the height of a person, we may say that he is tall.
• Actually, his height may be 5 feet 10 inches.
• So, taking the height of tall persons, we may say he is 0.95 tall.
DEFUZZIFICATION

• We begin by considering a fuzzy set A, then define a lambda-


cut set, A where 0 ≤ λ ≤ 1.

• The set A is a crisp set called the lambda (λ)-cut set of the
fuzzy set A, where A = {x|  A ( x) ≥ λ}.

• Any particular fuzzy set A can be transformed into an infinite


number of λ-cut sets, because there are an infinite number
of values λ in the interval [0, 1].
EXAMPLE
Let us consider the discrete fuzzy set, using Zadeh’s notation, defined on
universe X = {a, b, c, d, e, f },

We can reduce this fuzzy set into several λ-cut sets, all of which are
crisp λ = 1,0.9, 0.6,0.3,0+, and 0.
A1 = {a},
A0.9 = {a, b},
A0.6 = {a, b, c},
A0.3 = {a, b, c, d},
A0+ = {a, b, c, d, e}
A0 = X.
λ-CUTS FOR FUZZY RELATIONS

• A fuzzy relation can be converted to a crisp relation in the


following manner
• R = {(x, y)| R ( x, y) ≥ λ} as a λ-cut relation of the fuzzy relation
R
 1 0.8 0 0.1 0.2
0.8 1 0.4 0 0.9
 
R   0 0.4 1 0 0 
 
 0.1 0 0 1 0.5
0.2 0.9 0 0.5 1 
EXAMPLE CONTD…

• Taking   1 1 0 0 0 0 
0 1 0 0 0 
 
R1  0 0 1 0 0 
 
 0 0 0 1 0 
0 0 0 0 1 

• Taking   0.6 1 1 0 0 0
1 1 0 0 1 

R0.6  0 0 1 0 0
 
0 0 0 1 0
0 1 0 0 1 
PROPERTIES OF λ-CUTS OF FUZZY RLATIONS

• For any two fuzzy relations R and S, we have

(i) (R S)  R S

(ii) (R S)  R S

(iii) ( RC )  ( R )C

(iv) For any λ ≤ α, 0 ≤ α ≤ 1, then R ⊆ R


METHODS OF DEFUZZIFICATION
Defuzzification is the process of conversion of a fuzzy
quantity into a precise quantity. Defuzzification methods
include:

 Max-membership principle,
 Centroid method,
 Weighted average method,
 Mean-max membership,
 Center of sums,
 Center of largest area,
 First of maxima, last of maxima.
Defuzzification Methods
Consider a fuzzy output comparising two parts, the first part is C1
a triangularshape and C2 is trapezoidal shape . The union of these
two membership function
C = 𝐶1 ∪ 𝐶2
C1
C2

C
FUZZY DECISION
MAX MEMBERSHIP METHOD
 Fuzzy set with the largest membership value is selected.
 Fuzzy decision: Fn = {P, F. G, VG, E}
 Fn = {0.6, 0.4, 0.2, 0.2, 0}
 Final decision (FD) = Poor Student
 If two decisions have same membership max, use the average of the
two.

P
CENTROID METHOD
This method is also known as center-of-mass, center-of-area, or center-of-
gravity method. It is the most commonly used defuzzification method. The
defuzzified output x* is defined as

where the symbol  denotes an algebraic integration.


WEIGHTED AVERAGE METHOD
Each membership function is weighted by its maximum
membership value.
Fuzzy decision: Fn = {P, F. G, VG, E}
Fn = {0.6, 0.4, 0.2, 0.2, 0}

P
MEAN MAX MEMBERSHIP METHOD
CENTER OF SUMS
This method employs the algebraic sum of the individual fuzzy subsets instead
of their unions. The calculations here are very fast but the main drawback is
that the intersecting areas are added twice. The defuzzified value x* is given
by
CENTER OF LARGEST AREA

• The method can be adopted when the output consists of at least convex
fuzzy subsets which are not overlapping.
• The output in this case is biased towards a side of one membership
function.
• When output fuzzy set has at least two convex regions then the center-of-
gravity of the convex fuzzy subregion having the largest area is used to
obtain the defuzzified value x*. This value is given by

where is the convex subregion that has the largest area making up
FIRST OF MAXIMA (LAST OF MAXIMA)
The steps used for obtaining crisp values are as follows:
Consider the discrete fuzzy set defined on the
universe X ={a,b,c,d,e} as

You might also like