You are on page 1of 46

Chapter 3

Classical Relations and


Fuzzy Relations

Fuzzy Logic with Engineering Applications by


Thimothy J. Ross,
Classical Relations and Fuzzy Relations
 Cartesian Product
 Crisp Relations
 Cardinality of Crisp Relations
 Operations on Crisp Relations
 Properties of Crisp Relations
 Composition
 Fuzzy Relations
 Cardinality of Fuzzy Relations
 Operations on Fuzzy Relations
 Properties of Fuzzy Relations
 Fuzzy Cartesian Product and Composition
 Non-interactive Fuzzy Sets
 Tolerance and Equivalent Relations
 Crisp Equivalent Relation
 Crisp Tolerance Relation
 Fuzzy Tolerance and Equivalent Relations
 Value Assignments
Introduction

Operations on Sets

 Cartesian Products
 Composition of relations
 Equivalence properties
Relations

 Logic
 Approximate reasoning
 Rule-based systems
 Nonlinear Simulation
 Classification
 Pattern Recognition
 Control
Crisp Relation
 Two degree of relationship
 Completely related
 Not related
Fuzzy Relation
 On an infinite number of degree of
relationship
 Between the extremes of “completely related”
and “not related”.
CARTESIAN PRODUCT
 An ordered sequence of r elements,
 (a1, a2, a3,……ar)
 For crisp sets A1, A2, A3, …..Ar
 The set of all r-tuples (a1, a2, a3,……ar)
 a1A1, a2A2, ……….. arAr
 Ar = A1× A2, × A3 × ….. × Ar
Example 3.1

A ={0,1}
B={ a,b,c }
Find the various Cartesian products of these two sets.
A×B={(0,a),(0,b),(0,c),(1,a),(1,b),(1,c)}
B×A={(a,0),(a,1),(b,0),(b,1),(c,0),(c,1)}
A×A=A2={(0,0),(0,1),(1,0),(1,1)}
B×B=B2={(a,a), (a,b), (a,c), (b,a), (b,b), (b,c), (c,a), (c,b),
(c,c)}
Crisp Relations
 An r-ary relation over A1, A2, A3, …..Ar
 For r=2, A1× A2
 Cartesian product of two universe X and Y
 X×Y={(x,y)/ xX, yY}
 Strength of this relation by characteristic
function, x
 xX×Y(x,y)= 1 (x,y)X×Y
0 (x,y)X×Y
Relation Matrix
 The universe or sets are finite
a b c
1 1 1 1
 R = 21 1 1
3 1 1 1

For X={1, 2, 3} and Y={a, b, c}


Sagittal Diagram
X Y
1 a

2 b

3 c

xX×Y(x,y)= 1 (x,y)X×Y
0

(x,y)X×Y
Example 3.2

A ={0, 1}
B={ a, b, c }
Find the various Cartesian products of these two sets.
Answer
A×B={(0,a),(0,b),(0,c),(1,a),(1,b),(1,c)}
B×A={(a,0),(a,1),(b,0),(b,1),(c,0),(c,1)}
A×A=A2={(0,0),(0,1),(1,0),(1,1)}
B×B=B2={(a,a), (a,b), (a,c), (b,a), (b,b), (b,c), (c,a), (c,b),
(c,c)}
Example 3.3
Relations can also be defined for continuous universes. The continuous relation is
defined by
R={(x,y)/ y≥2x, xX, y Y}
Give the function-theoretic form using the characteristics function.

Answer
Using the characteristics function as
1, y  2x
X R ( x  y)  
0, y  2x

Graphically, the relation is equivalent to the shaded region shown in the


y
following figure.

0 x
Cardinality of Crisp Relations
 Suppose n elements of the universe X are related to m
elements of the universe of Y.
 IF the cardinality of X is nX and the cardinality of Y is
nY,
R  n X Yofthe
the cardinality n X relation
nY

( n X nY )
 P( X  Y of
The cardinality )  the Y )  2 set
nP ( Xpower
Operation on Crisp Relations

 Defining R and S as two separate relations on the


Cartesian universe XY,
 Null Relation, O
 Complete Relation, E

0 0 0 0 1 1 1 1
0 0 1
0 0 1 1 1
 E
0 0 0 0 1 1 1 1
   
0 0 0 0 1 1 1 1
Function-theoretic Operations

 Union R  S   R S ( x, y ) :  R S ( x, y )  max R ( x, y ),  S ( x, y )

 Intersection R  S   RS ( x, y ) :  RS ( x, y )  min R ( x, y ),  S ( x, y )


 Complement R   R ( x, y ) :  R ( x, y )  1   R ( x, y )

 Containment R  S   R ( x, y ) :  R ( x, y )   S ( x, y )

 Identity   O and X  E
Properties of Crisp Relations
 Commutativity, associativity, distributivity, involution,
idempotency
 Composition
Let R be a relation from universe X to universe Y and
S be a relation from universe Y to universe Z
 Find the relation T from universe X to universe Z

T  RS
1. Max-min Composition
 T ( x, z )    R ( x, y )   S ( y, z ) 
yY

2. Max-product Composition
T  RS
T ( x, z )    R ( x, y )   S ( y, z ) 
yY
For the Sagittal diagram shown in the following figure, the
relation R and S is define as
R  ( X 1 , Y1 ), ( X 1 , Y3 ), ( X 2 , Y4 )
S  (Y1 , Z 2 ), (Y3 , Z 2 )
Find the relation T that relates elements from universe X to
universe Z.
X Y Z
X1 Y1 Z1

X2 Y2 Z2

X3 Y3

Y4

Answer
The relation T  ( X 1 , Z 2 )
Max-min composition operator
 A system comprising several chains placed together in a parallel fashion.
 Each chain comprises a number of chain links.
 If this system is placed in a tensile test machine and a large tensile force
is exerted, the chain would break at its weakest link.
 The minimum () strength of all links in the chain governs the strength
of the overall chain.
 Weaker chains would break with an increasing load until the strongest
chain was left alone.
 The maximum () strength of all the chains in the chain system would
govern the overall strength of the chain system.
 Each chain in the system is analogous to the min operation in the max-
min composition, and the overall chain system strength is analogous to
the max operation in the max-min composition.

Tensile Force Tensile Force

Chain strength analogy for max-min composition


Example 3.4
The matrix expression for the crisp relations shown in
the following figure can be found using the max-min X Y
X1 Z
composition operation. Find the relation matrices for Y1
Z1
X2 Y2
R and S. Determine the resulting relation T by using
Y3 Z2
max-min composition and max-product composition. X3

y1 y2 y3 y4 z1 z2 Y4
y1 0 1
x1 1 0 1 0 y
R  x2 0 0 0 1  S  2 0 0
y3  0 1
x3 0 0 0 0 y3 0 0

Using max-min composition


T  RS
 T ( x, z )    R ( x, y )   S ( y, z ) 
yY

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

Using max-product composition


T ( x1 , z1 )  max[(1  0), (0  0), (1  0), (0  0)]  0
T ( x1 , z 2 )  max[(1  1), (0  0), (1  1), (0  0)]  1
FUZZY RELATIONS
 Fuzzy relations map elements of one universe, X to
those of another universe Y.
 The strength of relation is measured with a membership
function expressing various degrees pf strength of the
relation on the unit interval [0,1]
 The strength of mapping is expressed by the
membership function of the relation for ordered pairs
 R ( x, y ) or
from the two universes,
 Since the cardinality of fuzzy sets on any universe is
infinity, the cardinality of fuzzy relation between two
or more universe is also infinity.
Operations on Fuzzy Relations

Let R and S be fuzzy relations on the Cartesian space XY.

 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 )

 Containment R  S   R ( x, y )   S ( x, y )
Properties of Fuzzy Relations
 Commutativity, associativity, distributivity, involution, idempotency
 De Morgan’s laws
 Excluded middle Laws do not hold

R R  E
R R  

where
 = the null relation
E = the complete relation
Fuzzy Cartesian Product and Composition

Let A be a fuzzy set on universe X and B be a fuzzy set on universe Y.

 The Cartesian Product between fuzzy sets A and B in a relation R


A B  R  X Y
 R ( x, y )   AB ( x, y )  min( A ( x),  B ( y ))
in the same fashion as the cross product of two vectors
 Each of the fuzzy sets could be thought of as a vector of
membership values
 For example, a fuzzy set A has four elements, hence a column
vector size 41, and a fuzzy set B has five elements, hence a
row vector size of 15. The resulting fuzzy relation R will be
represented by a matrix of size 45.
Example 3.5
Consider two fuzzy sets, A defined on a universes of three discrete temperatures,
X={x1, x2, x3} and B defined on a universe of two discrete pressures Y={y1, y2}.
Find the fuzzy Cartesian product between them. Fuzzy set A could represent the
ambient temperature and fuzzy set B the near optimum pressure for a certain heat
exchanger and they are defined as
0.2 0.5 1 0.3 0.9
A   and B 
x1 x2 x3 y1 y2
Answer
x1 0.2 y1 y2
A  x2 0.5 B  0.3 0.9
x3  1 
y1 y2
x1 0.2 0.2
A  B  R  x2 0.3 0.5
x3 0.3 0.9
Fuzzy max-min Composition

 Suppose R is a fuzzy relation in the Cartesian space XY


and S is a fuzzy relation in the Cartesian space YZ.
 The fuzzy relation T ( in the Cartesian space XZ) is
defined in terms of
1. Fuzzy max-min composition T  RS
T ( x, z )    R ( x, y )   S ( y, z ) 
yY

2. Fuzzy max-product composition T  R  S


T ( x, z )    R ( x, y )   S ( y, z ) 
yY
 Neither crisp nor fuzzy compositions have converse in
general
RS  S R
Example 3.6
In the Sagittal diagram shown in the following figure, the fuzzy relationships
for XY (denoted by the fuzzy relation R) and YZ (denoted by the fuzzy
relation S) are included. These two relations are defined as:
y1 y2 z1 z2 z3
x y
R  1 0.7 0.5 and S  1 0.9 0.6 0.2
x2 0.8 0.4 y2  0.1 0.7 0.5
How to relate elements of universe X to the elements of universe Z by max-
min composition and max-product composition.
Answer
Max-min composition
T ( x1 , z1 )  maxmin(0.7,0.9), min(0.5,0.1)  0.7
z1 z2 z3
x1 0.7 0.6 0.5
T 
x2 0.8 0.6 0.4
Max-product composition
T ( x2 , z 2 )  max(0.8  0.6), (0.4  0.7)  max0.48, 0.28  0.48
z1 z2 z3
x1 0.63 0.42 0.25
T 
x2 0.72 0.48 0.20
Non-interactive Fuzzy Sets
 Thought of as being analogous to independent events in
probability theory.
 For a fuzzy set A on the Cartesian space X=X1X2,
 The set A is separable into two non-interactive fuzzy sets if and only if
A  PrX 1 ( A)  PrX 2 ( A)
where
 Pr X1 ( A )
( x1 )  max  A ( x1 , x2 ) x1  X 1
x2  X 2

 Pr X 2 ( A)
( x2 )  max max  A ( x1 , x2 ) x2  X 2
x1 X 1

x2
 x2  A1A2

1
1

x1 x1
Interactive Fuzzy set Non-interactive Fuzzy set
Example 3.7
In the armature control of the DC shunt motor, flux is maintained at some constant
value: the motor speed N is proportional to the back electromagnetic force E b. If Rse
is decreased, the armature current I a increases. On the other hand, as I a is increased
the motor speed N increases. Suppose the membership functions for series
resistance, armature current and motor speed are given in terms of % of their
respective rated values and in rpm, i.e.
0.3 0.7 1.0 0.2
 R (% se)    
se
30 60 100 120
0.2 0.4 0.6 0.8 1.0 0.1
 I a (%a)      
20 40 60 80 100 120
0.33 0.67 1.0 0.15
 N (rpm)    
500 1000 1500 1800
If fuzzy relation R relates series resistance to armature current and S is used to
relate armature current to motor speed, find these relations. Using the operation
of composition, compute the relation T to be used to relate series resistance to
motor speed.
Answer
The operations needed to develop these relations are ( two cross products and
one composition) as follows.
R  Rse  I a
S  Ia  N
T  RS
Using Cartesian product, 500 1000 1500 1800
20 40 60 80 100 120 20  0.2 0.2 0.2 0.15
40 0.33 0.4 0.4 0.15
30 0.2 0.3 0.3 0.3 0.3 0.1
S  60 0.33 0.6 0.6 0.15
R  60 0.2 0.4 0.6 0.7 0.7 0.1 80 0.33 0.67 0.8 0.15
100 0.2 0.4 0.6 0.8 1.0 0.1 100 0.33 0.67 1.0 0.15
120 0.2 0.2 0.2 0.2 0.2 0.1 120  0.1 0.1 0.1 0.1 

500 1000 1500 1800


30  0.3 0.3 0.3 0.15
T  R  S  60 0.33 0.67 0.7 0.15
100 0.33 0.67 1.0 0.15
120  0.2 0.2 0.2 0.15
Example 3.8
In computer engineering, different logic families are often compared on the basis of
their power-delay product. Consider the fuzzy set F of logic families (F={N,C,T,E,J}),
the fuzzy set D of delay times (D={0.1,1,10,100} in ns), and the fuzzy set P of power
dissipations (P={0.01,0.1,1,10,100} in mW). Suppose various value assignments from
data allow us to develop the relation R 1 (between delay times and logic families) and R 2
(between logic families and power dissipation). Obtain the relation between delay times
and power dissipation by using max-min composition.
N C T E J 0.01 0.1 1 10 100
0.1  0 0 0 0.6 1 N 0 0 .4 1 0 .3 0
C  0 .2 1 0 0 0
R1  1  0 0.1 0.5 1 0
R2  T  0 0 0 .7 1 0
10 0.4 1 1 0 0
100  1 0.2 0 0 0 E 0 0 0 1 0 .5 
J  1 1 0 0 0 
Answer
Computing R3  R1  R2
0.01 0.1 1 10 100
0.1  1 0.1 0 0.6 0.5
R3  1  0.1 0.1 0.5 1 0.5
10 0.2 1 0.7 1 0
100 0.2 0.4 1 0.3 0 
Example 3.9
In the area of compensation for professional engineers many issues are
important. One important consideration in the endeavor is the correlation of
performance, perceptions by management, and rewards. Suppose behavior is
compressed into three attributes as B and assume that the management
perceptions are reduces to two attributes. Moreover the reward structure will
be composed of two elements. If these fuzzy relations are defined as follow,
find the relation RR,B that relate and using max-min composition.

HW GM HP NHA MLG

RP , B  NHA 0.2 0.8 0.7  RR , P  PC 0.5 0.9


MLG 0.4 0.5 0.8 GR 0.7 0.8

Answer
Using max-min composition,
HW GM HP
RR , B  PC 0.4 0.5 0.5
GR 0.4 0.5 0.8
TOLERANCE AND EQUIVALENT
RELATIONS
 Relations can be used in graph theory.
 The useful properties are
1. Reflexivity : Every vertex in the graph originates a single loop.
2. Symmetry : For every edge pointing from vertex i to vertex j, there are an
edge pointing in the opposite direction.
3. Transitivity : For every pair of edges, one pointing from vertex i to
vertex j and the other from vertex j to vertex k, there is a edge
pointing from vertex i directly to vertex k.

1
1 1

2 3 2 3
2 3

Reflexivity Symmetry Transitivity


Crisp Equivalent Relation
 The relation R is an equivalent relation if it has the following three
properties.
1. Reflexivity : ( xi , xi )  R or  R ( xi , xi )  1

( xi , x j )  R  ( x j , xi )  R
2. Symmetry :
or  R ( xi , x j )   R ( x j , xi )

3. Transitivity : ( xi , x j )  R and ( x j , xi )  R  ( xi , xk )  R
or  R ( xi , x j ) and  R ( x j , xk )  1   R ( xi , xk )  1

Crisp Tolerance Relation


 The tolerance relation R on a universe X is a relation that exhibits
only the properties of reflexivity and symmetry.
 The relation R can be reformed into an equivalent relation by at
most (n-1) compositions with itself.
Example 3.10
An airline transportation system has a universe composed of five elements: the cities
Omaha, Chicago, Rom, London, and Detroit. These cities can be enumerated as the
elements of a set, i.e.,
X  x1 , x2, x3 , x4 , x5  {Omaha, Chicago, Rome, London, Detroit }
If tolerance relation R expresses relationships 1 1 0 0 0
1 1 0 0 1
among these cities as follow, draw the graph of R1  0 0 1 0 0
this tolerance relation. By repetitive composition, 0 0 0 1 0
can this relation become an equivalent relation. 0 1 0 0 1

Answer

1
This relation is reflexive and symmetric. R1
4 5 dose not have properties of transitivity because

2 3 ( x1 , x2 )  R1 ( x2 , x5 )  R1 but ( x1 , x5 )  R1
Answer (continuous)

1 1 0 0 1
1 1 0 0 1
R1  R1  0 0 1 0 0  R
0 0 0 1 0
1 1 0 0 1

R1 can become an equivalent relation after applying two compositions.

4 5

2 3

Five-vertex graph of equivalent relation ( reflexive, symmetric,


transitive)
FUZZY TOLERANCE AND
EQUIVALENT RELATIONS
 A fuzzy relation R is a fuzzy equivalence relation ↔
1. Reflexivity :  R ( xi , xi )  1

2. Symmetry :  R ( xi , x j )   R ( x j , xi )
 R ( xi , x j )  1 and  R ( x j , xk )  2   R ( xi , xk )  
3. Transitivity :
where   min1 , 2 
 Any fuzzy relation, R1, that has properties of reflexivity and
symmetry can be reformed into a fuzzy equivalence relation by
at most (n-1) compositions. That is
R1n 1  R1  R1  ....... R1  R
Example 3.11
Suppose, in a biotechnology experiment, five potentially new
strains of bacteria have been detected in the area around an
anaerobic corrosion pit on a new aluminum-lithium alloy. To
eliminate the biocorrosion caused by the bacteria, the five strains
must be categorized. In a pair wise comparison, the following
similarity relation R1 is developed. Is this relation be transitive.
How to composite this relation to get equivalent relation?
1 0.8 0 0 .1 0 .2 
 0.8 1 0.4 0 0 .9 
R1   0 0.4 1 0 0
 0 .1 0 0 1 0 .5 
0.2 0.9 0 0.5 1 
Answer
This relation is reflexive and symmetric. However it is not
transitive because
 R ( x1 , x2 )  0.8  R ( x2 , x5 )  0.9  0.8
but  R ( x1 , x5 )  0.2  min(0.8,0.9)
After one composition is completed,
1 0.8 0.4 0.2 0.8
0.8 1 0.4 0.5 0.9
R1  R1  R1  0.4
2
0.4 1 0 0.4
0.2 0.5 0 1 0.5
0.8 0.9 0.4 0.5 1 
where transitivity still does not result,
 R ( x1 , x2 )  0.8  0.5 and  R ( x2 , x4 )  0.5 but  R ( x1 , x4 )  0.2  min( 0.8,0.5)
2 2 2

After two more composition, transitivity results,


1 0.8 0.4 0.5 0.8
0.8 1 0.4 0.5 0.9
R1  R1  R1  0.4
3 4
0.4 1 0.4 0.4
0.2 0.5 0.4 1 0.5
0.8 0.9 0.4 0.5 1 
R13 ( x1 , x2 )  0.8  0.5
R13 ( x2 , x4 )  0.5  0.5
R13 ( x1 , x4 )  0.5  0.5
So this relation gets fuzzy equivalent relation.
VALUE ASSIGNMENTS
 There are al least six different way to develop the numerical
values that characterize a relation:
1. Cartesian product : to calculate relations from the Cartesian product of
two or more fuzzy set.

2. Closed-form expression : to express the relation as a closed-form


algorithm of the form Y=f(X)

3. Lookup table : the use of lookup table

4. Linguistic rules of knowledge : to express as if-then rules (Ch 7,8,9)

5. Classification : to develop relations in classification (Ch 11)

6. Similarity methods in data manipulation


Cosine Amplitude
 The similarity metric makes use of a collection of data
samples, n data samples in a particular. re are al least six
different way to develop the numerical values that
characterize a relation:

1
X  xto, xcollected
Data samples form
, x ,.....x a data array X,
2 3 n 
 Each of the elements, ,xi is a vector of length m,
xi  xi1 , xi 2 , xi 3 ,.....xim 
 The strength of relationship between data sample xi and
the data sample xj
 x x
m
k 1 ik jk
ri , j  where i, j  1,2,3,...., n
 x 
m
k 1
2
ik
m
k 1
x 2
jk 
Example 3.12
Four separate regions have suffered damage from a recent earthquake.
These five regions must be classified as to their damage levels. After
surveying, all of the buildings are described as being one of three
damage states: no damage, medium damage, and serious damage. The
following table summarizes the findings of the survey team. Express
these data as a fuzzy relation by using the cosine amplitude.
Regions x1 x2 x3 x4 x5
xi1- Ratio with no damage 0.3 0.2 0.1 0.7 0.4
xi2- Ratio with medium damage 0.6 0.4 0.6 0.2 0.6
xi3- Ratio with serious damage 0.1 0.4 0.3 0.1 0

Answer
Taking the cosine amplitude
k 1 xik x jk
m

ri , j  where i, j  1,2,3,...., n
 m
x2
k 1 ik
 m
k 1
x 2
jk 
Answer
For i=1 and j=2,
0.3  0.2  0.6  0.4  0.1 0.4 0.34
ri , j    0.836
0.3 2

 0.6 2  0.12 0.2 2  0.4 2  0.4 2  0.46  0.36

After computing other elements, the tolerance relation


 1 
0.836 1 sym 
R1  0.914 0.934 1 
 
0.682 0 .6 0.441 1 
0.982 0.74 0.818 0.774 1

After two compositions,


 1 
0.914 1 sym 
R  R1  0.914
2
0.934 1 
 
0.774 0.774 0.774 1 
0.982 0.914 0.914 0.774 1
R is the equivalence relation.
Max-min Method
 Simple min and max operations on pairs of the data points, x ij is
given by
 min xik x jk 
m

ri , j  k 1
where i, j  1,2,3,...., n
 max xik x jk 
m
k 1

Example 3.13
Recalculate example 3.12 by using max-min method.
 min(0.3,0.2), min(0.6,0.4), min(0.1,0.4)   0.2  0.4  0.1  0.538
3

ri , j  k 1

 max(0.3,0.2), max(0.6,0.4), max(0.1,0.4)  0.3  0.6  0.4


3
k 1

After computing the other elements of the relation,


 1 
0.538 1 sym 
R1  0.667 0.667 1 
 
0.429 0.333 0.250 1 
0.818 0.429 0.538 0.429 1
Other Similar Methods
 Absolute Exponential
 Exponential Similarity Coefficient
 Geometric Average Minimum
 Scalar Product
 Correlation Coefficient
 Arithmetic Average-minimum
 Absolute Reciprocal
 Absolute Subtrahend
 Nonparametric
ANY Questions ?

Problems: All problems

You might also like