You are on page 1of 5

1

FUZZY RELATIONS
and
COMPOSITION OF
FUZZY RELATIONS
Fuzzy Relations
Fuzzy relation generalizes classical
relation into one that allows partial
membership and describes a
relationship that holds between two or
more objects.
Example: a fuzzy relation Friend describe the
degree of friendship between two persons
(in contrast to either being friend or not being
friend in classical relation!)
Fuzzy Logic:Intelligence, Control, and Information, J. Yen and R. Langari, PrenticeHall
Beware of the math!
Fuzzy Advice
Crisp Cartesian product
Lets consider properties of crisp relations first
and then extend the mechanism to fuzzy
sets.
Definition of (crisp) Product set: Let A and B be two
non-empty sets, the product set or Cartesian product
A B is defined as follows,
A B = {(a, b) | a A, b B }
(a set of ordered pairs a,b)
Crisp Cartesian product
http://if.kaist.ac.kr/lecture/cs670/textbook/
Crisp Binary Relation
Cartesian product of n sets
Definition of Binary Relation
If A and B are two sets and there is a specific property
between elements x of A and y of B, this property can
be described using the ordered pair (x, y). A set of
such (x, y) pairs, x A and y B, is called a relation R.
R = { (x,y) | x A, y B }

=
= =
n
i
n n n i n
A a A a a a A A A A
1
1 1 1 2 1
} ,..., ) ,..., {( ...

=
= =
n
i
n n n i n
A a A a a a A A A A
1
1 1 1 2 1
} ,..., ) ,..., {( ...
http://if.kaist.ac.kr/lecture/cs670/textbook/
2
Crisp Binary Relation
Examples of Binary relations:
http://if.kaist.ac.kr/lecture/cs670/textbook/
Crisp n-ary Relation
Definition of n-ary relation
For sets A
1
, A
2
, A
3
, ..., A
n
, the relation among elements
x
1
A
1
, x
2
A
2
, x
3
A
3
, ..., x
n
A
n
can be described
by n-tuple (x
1
, x
2
, ..., x
n
). A collection of such n-tuples
(x
1
, x
2
, x
3
, ..., x
n
) is a relation R among A
1
, A
2
, A
3
, ...,
A
n
.
(x
1
, x
2
, x
3
, , x
n
) R ,
R A
1
A
2
A
3
A
n
http://if.kaist.ac.kr/lecture/cs670/textbook/
Fuzzy Cartesian Product
Let
Then the Cartesian product (the probability for n-tuple
(x
1
,x
2
,,x
n
) to be involved in fuzzy set A
1
A
2
A
n
is,
), (
1
x
A
), (
2
x
A
, ) (x
n
A
be membership functions of A1, A2,, An
for ,
1 1
A x ,
2 2
A x
n n
A x , .
), (
1
x
A
), (
2
x
A
, ) (x
n
A
be membership functions of A1, A2,, An
for ,
1 1
A x ,
2 2
A x
n n
A x , .
)] ( , ), ( [ min ) , , , (
1 2 1
1 2 1
n A A n A A A
x x x x x
n n

=

)] ( , ), ( [ min ) , , , (
1 2 1
1 2 1
n A A n A A A
x x x x x
n n

=

http://if.kaist.ac.kr/lecture/cs670/textbook/
Fuzzy Cartesian Product: Example
Let A be a fuzzy set defined on a universe of three discrete
temperatures, X = {x
1
,x
2
,x
3
}, and B be a fuzzy set defined
on a universe of two discrete pressures, Y = {y
1
,y
2
}
Fuzzy set A represents the ambient temperature and
fuzzy set B the near optimum pressure for a certain heat
exchanger, and the Cartesian product might represent the
conditions (temperature-pressure pairs) of the exchanger
that are associated with efficient operations. For
example, let
Fuzzy Logic with Engineering Applications: Timothy J. Ross, McGraw-Hill
(
(
(

= =

+ =
+ + =
9 . 0 3 . 0
5 . 0 3 . 0
2 . 0 2 . 0

9 . 0 3 . 0
1 5 . 0 2 . 0

3
2
1
2 1
3 2 1
2 1
x
x
x
R B A
y y
B
x x x
A
y y
(
(
(

= =

+ =
+ + =
9 . 0 3 . 0
5 . 0 3 . 0
2 . 0 2 . 0

9 . 0 3 . 0
1 5 . 0 2 . 0

3
2
1
2 1
3 2 1
2 1
x
x
x
R B A
y y
B
x x x
A
y y
Fuzzy Relation
A fuzzy relation R is a mapping from the Cartesian
space X x Y to the interval [0,1], where the
strength of the mapping is expressed by the
membership function of the relation
R
(x,y)

R
: A B [0, 1]
R = {((x, y),
R
(x, y))|
R
(x, y) 0 , x A, y B}
Fuzzy Relation
http://if.kaist.ac.kr/lecture/cs670/textbook/
3
Fuzzy Relation
http://if.kaist.ac.kr/lecture/cs670/textbook/
Crisp relation vs. Fuzzy relation
Corresponding fuzzy
relation matrix
Composition of Fuzzy Relations
Two fuzzy relations R and S are defined on sets A,
B and C. That is, R A B, S B C. The
composition SR = SR of two relations R and S is
expressed by the relation from A to C:
For (x, y) A B, (y, z) B C,

SR
(x, z) = max [min (
R
(x, y),
S
(y, z))]
y
= [
R
(x, y)
S
(y, z)]
y
M
S R
= M
R
M
S
(matrix notation)
(max-min composition)
http://if.kaist.ac.kr/lecture/cs670/textbook/
Composition of Fuzzy Relations
http://if.kaist.ac.kr/lecture/cs670/textbook/
Fuzzy Logic with Engineering Applications: Timothy J. Ross, McGraw-Hill
}, , { }, , {
2 1 2 1
y y Y x x X = = }, , { }, , {
2 1 2 1
y y Y x x X = =
7 . 0
)] 1 . 0 , 5 . 0 min( ), 9 . 0 , 7 . 0 max[min(
)) , ( ) , ( ( ) , (
1
~
1
~
1 1
~
=
=
=

z y y x z x
S R
Y y
T

7 . 0
)] 1 . 0 , 5 . 0 min( ), 9 . 0 , 7 . 0 max[min(
)) , ( ) , ( ( ) , (
1
~
1
~
1 1
~
=
=
=

z y y x z x
S R
Y y
T

and Z = {z
1
, z
2
, z
3
} Z = {z
1
, z
2
, z
3
}
Consider the following fuzzy relations:
2 1
2
1
4 . 0 8 . 0
5 . 0 7 . 0 ~
y y
x
x
R
(

=
2 1
2
1
4 . 0 8 . 0
5 . 0 7 . 0 ~
y y
x
x
R
(

= and

S =
y
1
y
2
0.9 0.6 0.5
0.1 0.7 0.5



(

(
z
1
z
2
z
3

S =
y
1
y
2
0.9 0.6 0.5
0.1 0.7 0.5



(

(
z
1
z
2
z
3
Using max-min composition,
}
3 2 1
2
1
4 . 0 6 . 0 8 . 0
5 . 0 6 . 0 7 . 0 ~
z z z
x
x
T
(

=
3 2 1
2
1
4 . 0 6 . 0 8 . 0
5 . 0 6 . 0 7 . 0 ~
z z z
x
x
T
(

=
Composition of Fuzzy Relations
Example:
Composition of Fuzzy Relations
Two fuzzy relations R and S are defined on sets A,
B and C. That is, R A B, S B C. The
composition SR = SR of two relations R and S is
expressed by the relation from A to C:
For (x, y) A B, (y, z) B C,

SR
(x, z) = max [
R
(x, y)
S
(y, z)]
y
= [
R
(x, y)
S
(y, z)]
y
M
S R
= M
R
M
S
(matrix notation)
(max-product composition)
Fuzzy Logic with Engineering Applications: Timothy J. Ross, McGraw-Hill
}, , { }, , {
2 1 2 1
y y Y x x X = = }, , { }, , {
2 1 2 1
y y Y x x X = =

T
(x
2
, z
2
) =
yY
(
R
(x
2
, y)
S
(y, z
2
))
= max[(0.8, 0.6), (0.4, 0.7)]
= 0.48

T
(x
2
, z
2
) =
yY
(
R
(x
2
, y)
S
(y, z
2
))
= max[(0.8, 0.6), (0.4, 0.7)]
= 0.48
and
Z = {z
1
, z
2
, z
3
} Z = {z
1
, z
2
, z
3
}
Consider the following fuzzy relations:

R =
x
1
x
2
0.7 0.5
0.8 0.4



(

(
y
1
y
2

R =
x
1
x
2
0.7 0.5
0.8 0.4



(

(
y
1
y
2
and

S =
y
1
y
2
0.9 0.6 0.5
0.1 0.7 0.5



(

(
z
1
z
2
z
3

S =
y
1
y
2
0.9 0.6 0.5
0.1 0.7 0.5



(

(
z
1
z
2
z
3
Using max-product composition,
}

T =
x
1
x
2
.63 .42 .25
.72 .48 .20



(

(
z
1
z
2
z
3

T =
x
1
x
2
.63 .42 .25
.72 .48 .20



(

(
z
1
z
2
z
3
Composition of Fuzzy Relations
Max-product example:
4
Application: Computer Engineering
Fuzzy Logic with Engineering Applications: Timothy J. Ross, McGraw-Hill
Problem: 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, the fuzzy set D of delay times (ns), and
the fuzzy set P of power dissipations (mw).
If F = {NMOS,CMOS,TTL,ECL,JJ}, D = {0.1,1,10,100},
P = {0.01,0.1,1,10,100}
Suppose R
1
= D x F and R
2
= F x P
J E T C N
R
(
(
(
(

=
0 0 0 2 . 1
0 0 1 1 4 .
0 1 5 . 1 . 0
1 6 . 0 0 0
100
10
1
1 . 0
~
1
J E T C N
R
(
(
(
(

=
0 0 0 2 . 1
0 0 1 1 4 .
0 1 5 . 1 . 0
1 6 . 0 0 0
100
10
1
1 . 0
~
1
and

R
2
=
N
C
T
E
J
0 .4 1 .3 0
.2 1 0 0 0
0 0 .7 1 0
0 0 0 1 .5
1 .1 0 0 0






(

(
(
(
(
.01 .1 1 10 100

R
2
=
N
C
T
E
J
0 .4 1 .3 0
.2 1 0 0 0
0 0 .7 1 0
0 0 0 1 .5
1 .1 0 0 0






(

(
(
(
(
.01 .1 1 10 100
Application: Computer Engineering (Cont)
Fuzzy Logic with Engineering Applications: Timothy J. Ross, McGraw-Hill
We can use max-min composition to obtain a
relation between delay times and power dissipation:
i.e., we can compute or
2 1 3
R R R = 2 1 3
R R R = ) (
2 1 3 R R R
= ) (
2 1 3 R R R
=
100 10 1 1 . 01 .
0 3 . 1 4 . 2 .
0 1 7 . 1 2 .
5 . 1 5 . 1 . 1 .
5 . 6 . 0 1 . 1
100
10
1
1 . 0
3
(
(
(
(
(
(
(

= R
100 10 1 1 . 01 .
0 3 . 1 4 . 2 .
0 1 7 . 1 2 .
5 . 1 5 . 1 . 1 .
5 . 6 . 0 1 . 1
100
10
1
1 . 0
3
(
(
(
(
(
(
(

= R
Application: Fuzzy Relation Petite
Fuzzy Logic:Intelligence, Control, and Information, J. Yen and R. Langari, PrenticeHall
Fuzzy Relation Petite defines the
degree by which a person with a
specific height and weight is
considered petite. Suppose the
range of the height and the
weight of interest to us are {5,
51, 52, 53, 54,55,56},
and {90, 95,100, 105, 110, 115,
120, 125} (in lb). We can
express the fuzzy relation in a
matrix form as shown below:
125 120 115 110 105 100 95 90
0 0 0 0 0 0 0 0
0 0 0 0 0 2 . 4 . 6 .
0 0 0 0 2 . 4 . 6 . 8 .
0 0 3 . 5 . 1 1 1 1
0 1 . 7 . 1 1 1 1 1
1 . 3 . 9 . 1 1 1 1 1
2 . 5 . 1 1 1 1 1 1
" 6 ' 5
" 5 ' 5
" 4 ' 5
" 3 ' 5
" 2 ' 5
" 1 ' 5
' 5
(
(
(
(
(
(
(
(
(

= P
125 120 115 110 105 100 95 90
0 0 0 0 0 0 0 0
0 0 0 0 0 2 . 4 . 6 .
0 0 0 0 2 . 4 . 6 . 8 .
0 0 3 . 5 . 1 1 1 1
0 1 . 7 . 1 1 1 1 1
1 . 3 . 9 . 1 1 1 1 1
2 . 5 . 1 1 1 1 1 1
" 6 ' 5
" 5 ' 5
" 4 ' 5
" 3 ' 5
" 2 ' 5
" 1 ' 5
' 5
(
(
(
(
(
(
(
(
(

= P
Application: Fuzzy Relation Petite
Fuzzy Logic:Intelligence, Control, and Information, J. Yen and R. Langari, PrenticeHall
125 120 115 110 105 100 95 90
0 0 0 0 0 0 0 0
0 0 0 0 0 2 . 4 . 6 .
0 0 0 0 2 . 4 . 6 . 8 .
0 0 3 . 5 . 1 1 1 1
0 1 . 7 . 1 1 1 1 1
1 . 3 . 9 . 1 1 1 1 1
2 . 5 . 1 1 1 1 1 1
" 6 ' 5
" 5 ' 5
" 4 ' 5
" 3 ' 5
" 2 ' 5
" 1 ' 5
' 5
(
(
(
(
(
(
(
(
(

= P
125 120 115 110 105 100 95 90
0 0 0 0 0 0 0 0
0 0 0 0 0 2 . 4 . 6 .
0 0 0 0 2 . 4 . 6 . 8 .
0 0 3 . 5 . 1 1 1 1
0 1 . 7 . 1 1 1 1 1
1 . 3 . 9 . 1 1 1 1 1
2 . 5 . 1 1 1 1 1 1
" 6 ' 5
" 5 ' 5
" 4 ' 5
" 3 ' 5
" 2 ' 5
" 1 ' 5
' 5
(
(
(
(
(
(
(
(
(

= P
Once we define the petite fuzzy
relation, we can answer two kinds of
questions:
What is the degree that a female with
a specific height and a specific
weight is considered to be petite?
What is the possibility that a petite
person has a specific pair of height
and weight measures?
Application: Fuzzy Relation Petite
Fuzzy Logic:Intelligence, Control, and Information, J. Yen and R. Langari, PrenticeHall
Given a two-dimensional fuzzy relation and the possible values of
one variable, infer the possible values of the other variable using
similar fuzzy composition as described earlier.
Definition: Let X and Y be the universes of discourse for variables
x and y, respectively, and x
i
and y
j
be elements of X and Y. Let R
be a fuzzy relation that maps XY to [0,1] and the possibility
distribution of X is known to be P
x
(x
i
). The compositional rule of
inference infers the possibility distribution of Y as follows:
max-min composition:
max-product composition:
))) , ( ), ( (min( max ) (
j i R i X
x
j Y
y x x y
i
= ))) , ( ), ( (min( max ) (
j i R i X
x
j Y
y x x y
i
=

Y
(y
j
) = max
x i
(
X
(x
i
)
R
( x
i
, y
j
))
Y
(y
j
) = max
x i
(
X
(x
i
)
R
( x
i
, y
j
))
Application: Fuzzy Relation Petite
Fuzzy Logic:Intelligence, Control, and Information, J. Yen and R. Langari, PrenticeHall
Problem: We may wish to know the possible weight of a petite
female who is about 54.
Assume About 54 is defined as
About-54 = {0/5, 0/51, 0.4/52, 0.8/53, 1/54, 0.8/55, 0.4/56}
Using max-min compositional, we can find the weight
possibility distribution of a petite person about 54 tall:

weight
(90) = (0 1) (0 1) (.4 1) (.8 1) (1 .8) (.8 .6) (.4 0)
= 0.8

weight
(90) = (0 1) (0 1) (.4 1) (.8 1) (1 .8) (.8 .6) (.4 0)
= 0.8

P =
5'
5' 1"
5' 2"
5' 3"
5' 4"
5' 5"
5' 6"
1 1 1 1 1 1 .5 .2
1 1 1 1 1 .9 .3 .1
1 1 1 1 1 .7 .1 0
1 1 1 1 .5 .3 0 0
.8 .6 .4 .2 0 0 0 0
.6 .4 .2 0 0 0 0 0
0 0 0 0 0 0 0 0

(
(
(
(
(
(
90 95 100 105 110 115 120 125

P =
5'
5' 1"
5' 2"
5' 3"
5' 4"
5' 5"
5' 6"
1 1 1 1 1 1 .5 .2
1 1 1 1 1 .9 .3 .1
1 1 1 1 1 .7 .1 0
1 1 1 1 .5 .3 0 0
.8 .6 .4 .2 0 0 0 0
.6 .4 .2 0 0 0 0 0
0 0 0 0 0 0 0 0

(
(
(
(
(
(
90 95 100 105 110 115 120 125
Similarly, we can compute the possibility
degree for other weights. The final result is

weight
= {0.8 / 90, 0.8 / 95, 0.8 /100, 0.8/ 105, 0.5 /110, 0.4 /115, 0.1/ 120, 0 /125}
weight
= {0.8 / 90, 0.8 / 95, 0.8 /100, 0.8/ 105, 0.5 /110, 0.4 /115, 0.1/ 120, 0 /125}
5
Fuzzy Graphs
Fuzzy Logic:Intelligence, Control, and Information, J. Yen and R. Langari, PrenticeHall
A fuzzy relation may not have a meaningful linguistic label.
Most fuzzy relations used in real-world applications do not represent a
concept, rather they represent a functional mapping from a set of input
variables to one or more output variables.
Fuzzy rules can be used to describe a fuzzy relation from the observed
state variables to a control decision (using fuzzy graphs)
A fuzzy graph describes a functional mapping between a set of input
linguistic variables and an output linguistic variable.

You might also like