Fuzzy Relations
Review
Fuzzy Relations
Crisp RelationCrisp RelationCrisp RelationCrisp Relation
DefinitionDefinitionDefinitionDefinition (Product(Product(Product(Product set)set)set)set)::::
Let A and B be two nonempty sets, the product set or Cartesian product A × B is defined as follows,
A × B = {(a, b) | a ∈ A, b ∈ B }
Extension to n sets
A1×A2×...×An =
{(a1, ... , an) | a1 ∈ A1, a2 ∈ A2, ... , an ∈ An }
Crisp RelationCrisp RelationCrisp RelationCrisp Relation
Example:Example:Example:Example: A = {a1, a2, a3}, B = {b1, b2}
A × B = {(a1, b1), (a1, b2), (a2, b1), (a2, b2), (a3, b1), (a3, b2)}
(a1, b2) (a2, b2)
(a1, b1)
(a3, b2)
(a2, b1) (a3, b1)
b2
a1
b1
a3a2Product set A × B
Crisp RelationCrisp RelationCrisp RelationCrisp Relation
A × A = {(a1, a1), (a1, a2), (a1, a3), (a2, a1), (a2, a2), (a2, a3), (a3, a1), (a3, a2), (a3, a3)}
(a1, a2) (a2, a2)
(a1, a1)
(a3, a2)
(a2, a1) (a3, a1)
a2
a1
a1
a3a2
(a1, a3) (a2, a3) (a3, a3) a3
Cartesian product A × A
Crisp RelationCrisp RelationCrisp RelationCrisp Relation
Definition� Binary RelationBinary RelationBinary RelationBinary Relation
RRRR ==== {{{{ ((((xxxx,,,,yyyy)))) |||| xxxx ∈∈∈∈ AAAA,,,, yyyy ∈∈∈∈ BBBB }}}} ⊆⊆⊆⊆ AAAA xxxx BBBB
� nnnn----aryaryaryary RelationRelationRelationRelation
((((xxxx1111,,,, xxxx2222,,,, xxxx3333,,,, � ,,,, xxxxnnnn)))) ∈∈∈∈ RRRR ,,,,
RRRR ⊆⊆⊆⊆ AAAA1111 ×××× AAAA2222 ×××× AAAA3333 ×××× � ×××× AAAAnnnn
Crisp RelationCrisp RelationCrisp RelationCrisp Relation
Domain and Range
dom(R) = { x | x ∈ A, (x, y) ∈ R for some y ∈ B }
ran(R) = { y | y ∈ B, (x, y) ∈ R for some x ∈ A }
Rdom(R) ran(R )
A B
fx1
x2
x3
A B
y1
y2
y3
Mapping y = f(x)dom(R) , ran(R)
Crisp Relation
Characteristics of relation
(1) One-to-many∃ x ∈ A, y1, y2 ∈ B (x, y1) ∈ R, (x, y2) ∈ R
(2) Surjection (many-to-one)f(A) = B or ran(R) = B. ∀y ∈ B, ∃ x ∈ A, y = f(x)
Thus, even if x1 ≠ x2, f(x1) = f(x2) can hold.A B
y
1x
y
2
One-to-many relation(not a function)
fx1
x2
A B
y
Surjection
Crisp Relation
(3) Injection (into, one-to-one)for all x1, x2 ∈ A, x1 ≠ x2 , f(x1) ≠ f(x2).
if R is an injection, (x1, y) ∈ R and (x2, y) ∈ R then x1 =x2.
(4) Bijection (one-to-one correspondence)both a surjection and an injection.
fx1
A B
y1x2 y2x3 y3
y4
Injection
fx1
x2
A B
y1
y2
x3 y3
x4 y4
Bijection
Crisp RelationCrisp RelationCrisp RelationCrisp Relation
Representation of Relations(1)Bipartigraph
representing the relation by drawing arcs or edges
(2)Coordinate diagram
plotting members of A on x axis and that of B on
y axis
Relation of x2 + y2 = 4
A B
a1 b1
a2b2
a3
b3a4
Binary relation from A to B
4
-4
-4 4
y
x
Crisp Relation
(3) Matrix
(4) Digraph
R b1 b2 b3
a1 1 0 0
a2 0 1 0
a3 0 1 0
a4 0 0 1
MR = (mij)
∉
∈=
Rba
Rbam
ji
jiij
),(,0
),(,1 i = 1, 2, 3, …, m
j = 1, 2, 3, …, n
2 3
4
1
Matrix Directed graph
Crisp Relation
Operations on relations R, S ⊆ A × B
(1) Union T = R ∪ S
If (x, y) ∈ R or (x, y) ∈ S, then (x, y) ∈ T
(2) Intersection T = R ∩ S
If (x, y) ∈ R and (x, y) ∈ S, then (x, y) ∈ T.
(3) Complement
If (x, y) ∉ R, then (x, y) ∈ RC
(4) Inverse
R-1 = {(y, x) ∈ B × A | (x, y) ∈ R, x ∈ A, y ∈ B}
(5) Composition T
R ⊆ A × B, S ⊆ B × C , T = S • R ⊆ A × C
T = {(x, z) | x ∈ A, y ∈ B, z ∈ C, (x, y) ∈ R, (y, z) ∈ S}
R
Types of Relation on a set
Reflexive relationx ∈ A → (x, x) ∈ R or µR(x, x) = 1, ∀ x ∈ A
� irreflexive
if it is not satisfied for some x ∈ A
� antireflexiveif it is not satisfied for all x ∈ A
Symmetric relation (x, y) ∈ R → (y, x) ∈ R or µR(x, y) = µR(y, x), ∀ x, y ∈ A
� asymmetric or nonsymmetricwhen for some x, y ∈ A, (x, y) ∈ R and (y, x) ∉ R.
� antisymmetric
if for all x, y ∈ A, (x, y) ∈ R and (y, x) ∉ R
Types of Relation on a SetTransitive relationFor all x, y, z ∈ A
(x, y) ∈ R, (y, z) ∈ R→ (x, z) ∈ R
1 3
4
2
(a) R
1
4
2
(b) R∞
Transitive Closure
3
Types of Relation on a Set
Equivalence relation
(1) Reflexive
x ∈ A → (x, x) ∈ R
(2) Symmetric
(x, y) ∈ R → (y, x) ∈ R
(3) Transitive relation
(x, y) ∈ R, (y, z) ∈ R → (x, z) ∈ R
Types of Relation on a Set
Equivalence classes
a partition of A into n disjoint subsets A1, A2, ... , An
(a) Expression by set
b
ad
c
e
(b) Expression by undirected graph
Partition by equivalence relationπ(A/R) = {A1, A2} = {{a, b, c}, {d, e}}
b
a
c
d e
A1 A2
A
Types of Relation on a Set
Compatibility relation (tolerance relation) (1) Reflexive relation (2) Symmetric relation
x ∈ A → (x, x) ∈ R (x, y) ∈ R → (y, x) ∈ R
(a) Expression by set
b
ad
c
e
(b) Expression by undirected graph
Partition by compatibility relation
b
a
c
d e
A1 A2
A
Types of Relation on a Set
PrePrePrePre----order relationorder relationorder relationorder relation(1) Reflexive relation
x ∈ A → (x, x) ∈ R
(2) Transitive relation
(x, y) ∈ R, (y, z) ∈ R → (x, z) ∈ R
h g
fd
b
c
e
a
A
(a) Pre-order relation
a
c
b, d
e
f, h g
(b) Pre-order
Pre-order relation
Types of Relation on a Set
Order relation(1) Reflexive relation
x ∈ A → (x, x) ∈ R
(2) Antisymmetric relation
(x, y) ∈ R → (y, x) ∉ R
(3) Transitive relation
(x, y) ∈ R, (y, z) ∈ R → (x, z) ∈ R
� strict order relation(1’) Antireflexive relationAntireflexive relationAntireflexive relationAntireflexive relation
x ∈ A → (x, x) ∉ R
� total order or linear order relation(4) ∀ x, y ∈ A, (x, y) ∈ R or (y, x) ∈ R
Types of Relations on a Set
Comparison of relations
P ropertyP ropertyP ropertyP roperty
RelationRelationRelationRelationReflexiveReflexiveReflexiveReflexive
AntiAntiAntiAnti
reflexivereflexivereflexivereflexiveSymmetricSymmetricSymmetricSymmetric
AntiAntiAntiAnti
symmetricsymmetricsymmetricsymmetricTransitiveTransitiveTransitiveTransitive
EquivalenceEquivalenceEquivalenceEquivalence � � �
CompatibilityCompatibilityCompatibilityCompatibility � �
P reP reP reP re----orderorderorderorder � �
OrderO rderO rderO rder � � �
S trict orderS trict orderS trict orderS trict order � � �
Fuzzy Relation
Definition of fuzzy relation
� Crisp relation
membership function µR(x, y)
µR : A × B → {0, 1}
� Fuzzy relationFuzzy relationFuzzy relationFuzzy relation
µR : A × B → [0, 1]
R = {((x, y), µR(x, y))| µR(x, y) ≥ 0 , x ∈ A, y ∈ B}
µR (x, y) =1 iff (x, y) ∈ R
0 iff (x, y) ∉ R
Fuzzy Relation
(a1, b1) ...(a1, b2 ) ( a2, b1)
0.5
1
Rµ
BAR ×⊆
BA×
Fuzzy relation as a fuzzy set
Fuzzy Relation
ExampleExampleExampleExampleCrisp relation R
µR(a, c) = 1, µR(b, a) = 1, µR(c, b) = 1 and µR(c, d) = 1.
Fuzzy relation R
µR(a, c) = 0.8, µR(b, a) = 1.0, µR(c, b) = 0.9, µR(c, d) = 1.0
a
b
c
d
a
b
c
d
0.8
1.0
0.9 1.0
(a) Crisp relation (b) Fuzzy relation
crisp and fuzzy relations
A
A a b c d
a 0.0 0.0 0.8 0.0
b 1.0 0.0 0.0 0.0
c 0.0 0.9 0.0 1.0
d 0.0 0.0 0.0 0.0
corresponding matrix
Fuzzy Relation
Operation of Fuzzy Relation 1) Union relation
∀ (x, y) ∈ A × B
µR ∪ S (x, y) = Max [µR (x, y), µS (x, y)] = µR (x, y) ∨ µS (x, y)
2) Intersection relation
µR ∩ S (x) = Min [µR (x, y), µS (x, y)] = µR (x, y) ∧ µS (x, y)
3) Complement relation
∀ (x, y) ∈ A × B
µR (x, y) = 1 - µR (x, y)
4) Inverse relation
For all (x, y) ⊆ A × B, µR-1 (y, x) = µR (x, y)
Fuzzy Relation
Examples
Fuzzy Relation
(Standard) Composition � For (x, y) ∈ A × B, (y, z) ∈ B × C,
µR•S (x, z) = Max [Min (µR (x, y), µS (y, z))]y
= ∨ [µR (x, y) ∧ µS (y, z)] y
MR • S = MR • MS
� Example
=>
Fuzzy Relation
=>
Composition of fuzzy relation
Note: Matrix Multiplication
Fuzzy Relation
α-cut of fuzzy relationRα = {(x, y) | µR(x, y) ≥ α, x ∈ A, y ∈ B} : a crisp relation.
Example
Fuzzy Relation
Decomposition of Fuzzy Relation
� Example
( ) ( )( )]1,0[
R ,),(
x )(for ,,
∈
=
∈•=
αα
αα
α
α
µµ
µαµ
yxyx
BAx,yyxyx
R
RR
U
Fuzzy Relation
Projection
� Example
( ) ( ) A toProjection : , yxMaxx Ry
RAµµ =
( ) ( ) B toProjection : ,
and allFor
yxMaxy
ByAx
Rx
RBµµ =
∈∈
Fuzzy Relation
� Projection in n dimension
� Cylindrical extension
µC(R) (a, b, c) = µR (a, b)
a ∈ A, b ∈ B, c ∈ C
� Example
( ) ( )nR
XXX
ikiiR xxxxxx Maxjmjj
ikXiXiX,,,,,, 21
,,,
21
21
21
KKK
Kµµ =
×××
Types of Fuzzy Relations
Reflexive
� Irreflexive
� Antireflexive
� Epsilon Reflexive
Symmetric
� Asymmetric
� Antisymmetric
XxxxR ∈= allfor 1),(
XxxxR ∈≠ somefor 1),(
XxxxR ∈≠ allfor 1),(
XxxxR ∈≥ allfor ),( ε
XxxyRyxR ∈= allfor ),(),(
XxxyRyxR ∈≠ somefor ),(),(
XyxyxxyRyxR ∈=→>> , allfor 0 ),( and 0),(
Types of Fuzzy Relations
Transitive (max-min transitive)
� Non-transitive: For some (x,z), the above do not satisfy.
� Antitransitive:
Example: X = Set of cities, R=“very far”Reflexive, symmetric, non-transitive
X allfor )],(),,(min[max),( ∈≥∈
x,zzyRyxRzxRYy
X allfor )],(),,(min[max),( ∈<∈
x,zzyRyxRzxRYy
Types of Fuzzy Relations
Transitive Closure
� Crisp: Transitive relation that contains R(X,X) with fewest possible members
� Fuzzy: Transitive relation that contains R(X,X) with smallest possible membership
� Algorithm:
TRR
RRRR
RRRR
=
=≠
∪=
'
''
'
:Stop 3.
1 step togo and make , If .2
).( .1 o
Types of Fuzzy Relations
Fuzzy Equivalence or Similarity Relation
� Reflexive, symmetric, and transitive
� Decomposition:
� Partition Tree
[0,1]}|) ({(R)
:partitions ofSet
relation. eequivalenc crisp a is
]1,0[
∈=
⋅=
∏
∈
απ
α
α
α
α
α
R
R
RR U
Types of Fuzzy Relations
Fuzzy Compatibility or Tolerance Relation� Reflexive and symmetric
� Maximal compatibility class and complete coverCompatibility class
Maximal compatibility class: largest compatibility class
Complete cover: Set of maximal compatibility classes
� Maximal alpha-compatibility class
� Complete alpha-covers
� Note:
Relation from distance metrics forms tolerance relation in clustering.
Ryx,such that of Subset >∈<XA
Fuzzy Morphism
Homomorphism
� Preserve relations by a function
� Example:
Log function preserves the order of real data.
QhhR
YXh
YYYYQXXXXR
>∈→<>∈<
→
×⊆×⊆
)(x),x(x,x
if mhomomorhis be tosaid is :
.),( and ),(Let
2121
))(x),x(()x,x(
if mhomomorhis be tosaid is :
.),( and ),(Let
2121 hhQR
YXh
YYYYQXXXXR
>
→
×⊆×⊆
Other Compositions
Sup-I composition
INF-omega i composition
� Degree of Implication
� i=min: a < b then 1, otherwise b.
� INF-omega i composition
)],(),,([sup),]([ zyQyxPizxQP Yy
i
∈=o
{ }bxaixbai ≤∈= ),(|]1,0[sup),(ω
)],(),,([),)(( inf zyQyxPzxQP iYy
i
ωω
∈
=o
Extension of fuzzy set
Extension by relation
� Extension of fuzzy set
x ∈ A, y ∈ B y = f(x) or x = f -1(y)
for y ∈ B if f -1(y) ≠∅
Example: A = {(a1, 0.4), (a2, 0.5), (a3, 0.9), (a4, 0.6)}, B = {b1, b2, b3}
f -1(b1) = {(a1, 0.4), (a3, 0.9)}, Max [0.4, 0.9] = 0.9
⇒ µB' (b1) = 0.9
f -1(b2) = {(a2, 0.5), (a4, 0.6)}, Max [0.5, 0.6] = 0.6
⇒ µB' (b2) = 0.6
f -1(b3) = {(a4, 0.6)}
⇒ µB' (b3) = 0.6
BBBB '''' ==== {({({({(bbbb1111,,,, 0000....9999),),),), ((((bbbb2222,,,, 0000....6666),),),), ((((bbbb3333,,,, 0000....6666)})})})}
( )( )
( )[ ]xy Ayfx
B Max µµ1−∈
′ =
Extension principle
� Extension principleµA1 × A2 × ... × Ar ( x1 × x2 × ... × xr )
= Min [ µA1 (x1), ... , µAr(xr) ]
f(x1, x2, ... , xr) : X → Y
( )( )
( )( ) ( )( )[ ]
∅=
=
=
−
otherwise , ,,
if , 0
1,,,
1
1
21
rAAxxxfy
B
xxMinMax
yf
y
r
r
µµ
µ
KK
Extension of Fuzzy Set
Extension of Fuzzy Set
Example:
.3/10 ... .5/21/0
)5/(3.)4/(5.)3/(5.)2/(5.),(
),( :
5/3.4/5.3/12/5.)(
2/3.1/5.0/1)1/(5.)(
21
++++
−+−+−+−=
⋅=→×
+++=
+++−=
BAf
xxxxfXXXf
xB
xA
7/3.6/3.5/5.4/5.3/12/5.1/5.),(
),( :21
++++++=
+=→×
BAf
xxxxfXXXf
Extension by fuzzy relation For x ∈ A, y ∈ B, and B′ ⊆ B
µB' (y) = Max [Min (µA (x), µR (x, y))] x ∈ f -1(y)
� Example For b1 Min [µA (a1), µR (a1, b1)] =Min [0.4, 0.8] = 0.4
Min [µA (a3), µR (a3, b1)] =Min [0.9, 0.3] = 0.3
Max [0.4, 0.3] = 0.4 � µB ' (b1) = 0.4
For b2, Min [µA (a2), µR (a2, b2)] =Min [0.5, 0.2] = 0.2
Min [µA (a4), µR (a4, b2)] =Min [0.6, 0.7] = 0.6
Max [0.2, 0.6] = 0.6 �µB ' (b2) = 0.6
For b3, Max Min [µA (a4), µR (a4, b3)] =Max Min [0.6, 0.4] = 0.4
� µB ' (b3) = 0.4
B' ==== {(b1, 0.4), (b2, 0.6), (b3, 0.4)}
Extension of fuzzy set
� ExampleA = {(a1, 0.8), (a2, 0.3)}
B = {b1, b2, b3}
C = {c1, c2, c3}
B' = {(b1, 0.3), (b2, 0.8), (b3, 0)}
C' = {(c1, 0.3), (c2, 0.3), (c3, 0.8)}
Extension of Fuzzy Set
Fuzzy distance between fuzzy sets� Pseudo-metric distance
(1) d(x, x) = 0, ∀ x ∈ X
(2) d(x1, x2) = d(x2, x1), ∀ x1, x2 ∈ X
(3) d(x1, x3) ≤ d(x1, x2) + d(x2, x3), ∀ x1, x2, x3 ∈ X
+ (4) if d(x1, x2)=0, then x1 = x2 � metric distance
� Distance between fuzzy sets
∀ δ ∈ ℜ +, µd(A, B)(δ) =Max [Min (µA(a), µB(b))]
δ = d(a, b)
Extension of fuzzy set
Example
A = {(1, 0.5), (2, 1), (3, 0.3)} B = {(2, 0.4), (3, 0.4), (4, 1)}
Extension of Fuzzy Set