Fuzzy Relations Hand Out
Transcript of Fuzzy Relations Hand Out
-
7/26/2019 Fuzzy Relations Hand Out
1/23
1
Fuzzy RelationsFuzzy Relations
Adriano Joaquim de O Cruz
2009
@2009 Adriano Cruz NCE e IM - UFRJ Relations 2
Summary
Introduction
Crisp Relations
Operations with Crisp Relations
Fuzzy Relations
Operations with Fuzzy Relations
@2009 Adriano Cruz NCE e IM - UFRJ Relations 3
Introduction
Relations are associations betweenelements of two or more sets.
If the degree of association is one orzero there is a crisp association.
Degrees of association can be between0 and 1 in a fuzzy relation
For example the relation x is greaterthan y.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 4
Functions and Relations
Functions and Relations are mappings.
Functions are many to one mappings.
Relations can map many to many.
-
7/26/2019 Fuzzy Relations Hand Out
2/23
2
@2009 Adriano Cruz NCE e IM - UFRJ Relations 5
Functions
XXYYf(X)f(X)
@2009 Adriano Cruz NCE e IM - UFRJ Relations 6
Relations
XXYYf(X)f(X)
@2009 Adriano Cruz NCE e IM - UFRJ Relations 7
Cartesian Product
The Cartesian product of two crisp setsXand Yis defined as
For nsets (Xi) the Cartesian product isdefined as
}|),{( YyeXxyxYX =
}..1,|),,,{( 2121 niXxxxxXXX iinn == KL
@2009 Adriano Cruz NCE e IM - UFRJ Relations 8
Crisp Relations
An relation is a subset of the Cartesianproduct
The Cartesian product can be considered arelation without restrictions.
A relation is also a set, therefore the basicset concepts such as union, intersection,complement, can be applied.
nn XXXXXXR KK 2121 ),,,(
-
7/26/2019 Fuzzy Relations Hand Out
3/23
3
Crisp Relations
@2009 Adriano Cruz NCE e IM - UFRJ Relations 10
Characteristic Function
Shows the strength of the relationbetween the pairs.
Every tuple that belongs to the relation
receives a value 1 and 0 otherwise.
=
Ryx
RyxyxR
),(0
),(1),(
@2009 Adriano Cruz NCE e IM - UFRJ Relations 11
Binary Relations
A relation between two sets Xand Yis
called a binary relation (R(X,Y)).
Binary relations can be defined on a
single set (R(X,X)).
These relations are often referred as
directed graphs or digraphs
@2009 Adriano Cruz NCE e IM - UFRJ Relations 12
Representing Relations
Sets of ordered tuples.
Consider a family and the relation is cousin of
XXR
RMarcoDboraClaraBeatrizX
=
ofcousin},,,{
)},(),,(),,(
),,(),,(),,(
),,(),,{(
ClaraMarcoBeatrizMarcoClaraDbora
BeatrizDboraMarcoClaraDboraClara
MarcoBeatrizDboraBeatrizR =
-
7/26/2019 Fuzzy Relations Hand Out
4/23
4
@2009 Adriano Cruz NCE e IM - UFRJ Relations 13
Representing Relations
N-dimensional membership matrices
0011
0011
1100
1100
Cousin
Marco
Dbora
Clara
Beatriz
MarcoDboraClaraBeatriz
@2009 Adriano Cruz NCE e IM - UFRJ Relations 14
Representing Relations
Diagrams that display elements as pointsand the relations as arrows betweenpoints (Sagittal diagrams).
Beatriz
Clara
Dbora
Marco
Beatriz
Clara
Dbora
Marco
@2009 Adriano Cruz NCE e IM - UFRJ Relations 15
Representing Relations
Simple Diagrams.
Beatriz
Clara
Dbora
Marco
@2009 Adriano Cruz NCE e IM - UFRJ Relations 16
Representing Relations
Equations
yRxXyx ,
-
7/26/2019 Fuzzy Relations Hand Out
5/23
5
@2009 Adriano Cruz NCE e IM - UFRJ Relations 17
Special Relations
Consider a set A={0,1,2} and the
relations shown below on A A
Identity Relation I = {0,0),(1,1),(2,2)}
Universal Relation
U={(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0)
,(2,1),(2,2)}
@2009 Adriano Cruz NCE e IM - UFRJ Relations 18
Relations - Continuous Universes
xy 2=
y
@2009 Adriano Cruz NCE e IM - UFRJ Relations 23
Properties of Crisp Relations
Symmetric: Ris symmetric if and only if(x,y)R e (y,x)R for all element xX e yY.
Asymmetric: R isasymmetric if there is noelements xX and yY such as (x,y)Rand(y,x)R.
Antisymmetric: R is antisymmetric if for all
xX and yY, whenever (x,y)R and (y,x)Rthen x=y.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 24
Examples of Symmetric Relations
Is odd and is odd too Is married to Is equal to
325
4
313
2
211
54321
x
y
x is odd and y is odd too
-
7/26/2019 Fuzzy Relations Hand Out
7/23
7
@2009 Adriano Cruz NCE e IM - UFRJ Relations 25
Properties of Crisp Relations
Transitive: R is transitive if for all x,y,z X, if (x,y)R and (y,z) R then (x,z)R.
Antitransitive: R is antitransitive if (x,z) R, whenever (x,y)R and (y,z) R.
Connected: R isconnected if for all x,y
X, if xythen (x,y)R or (y,x)R.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 26
Examples of Transitive Relations
Is greater than Is subset of Divisibility Implies
x
y
x is divisible by y 8
7
6
5
4
3
2
1
87654321
@2009 Adriano Cruz NCE e IM - UFRJ Relations 27
Transitive Relations
The converse of a transitive relation is alwaystransitive: if is a subset of is transitive and is asuperset of is its converse then is a superset of istransitive.
The intersection of two transitive relations is alwaystransitive: if "was born before" and "has the samefirst name as" are transitive then "was born beforeand has the same first name as" is transitive.
The union of two transitive relations is not alwaystransitive. For instance "was born before or has thesame first name as" is not generally a transitiverelation.
The complement of a transitive relation is not alwaystransitive.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 28
Properties of Crisp Relations
Left Unique: R is left unique when for allx,y,zX, if (x,z)R and (y,z)Rthen x=y.
Right Unique: Ris unique when for allx,y,zX, if (x,y)Rand (x,z)Rthen y=z.
Biunique: a relation Rwhich is both leftunique and right unique is called biunique.
-
7/26/2019 Fuzzy Relations Hand Out
8/23
8
@2009 Adriano Cruz NCE e IM - UFRJ Relations 29
Example Relation = cousin of
The relation is not reflexive because no one iscousin of himself, therefore it is antireflexiveand irreflexive.
The relation is symmetric because if Beatriz iscousin of Dbora then Dbora is cousin of
Beatriz.Therefore cousin ofis not asymmetric.
Beatriz
Clara
Dbora
Marco
@2009 Adriano Cruz NCE e IM - UFRJ Relations 30
Example Relation = cousin of
The relation is also not antisymmetricbecause it is not reflexive norasymmetric.
Beatriz
Clara
Dbora
Marco
@2009 Adriano Cruz NCE e IM - UFRJ Relations 31
Example Relation = cousin of
The relation is not transitive becauseDbora is Claras cousin and Clara isMarcos cousin, but Dbora is not acousin of Marco.
Beatriz
Clara
Dbora
Marco
@2009 Adriano Cruz NCE e IM - UFRJ Relations 32
Example Relation = cousin of
The relation is not connected becausethere are pairs of different elements towhich the relation is not applicable. Forexample Marco is no cousin of Dbora.
Beatriz
Clara
Dbora
Marco
-
7/26/2019 Fuzzy Relations Hand Out
9/23
9
@2009 Adriano Cruz NCE e IM - UFRJ Relations 33
Example Relation = cousin of
The relation is not left unique becauseBeatriz and Clara are different persons andboth are Dboras cousin.
Beatriz
Clara
Dbora
Marco
@2009 Adriano Cruz NCE e IM - UFRJ Relations 34
Example Relation = cousin of
The relation is not right unique becauseBeatriz is a cousin of Dbora and Marcowhich are different persons.
The relation is neither left unique nor right
unique therefore it is not biunique.
Beatriz
Clara
Dbora
Marco
@2009 Adriano Cruz NCE e IM - UFRJ Relations 35
Crisp Equivalence Relations
A crisp binary relation R(X,X) that is reflexive,symmetric and transitive is called anequivalence relation.
The similarity of triangles is an equivalence
relation.
Work at the same building is an equivalence
relation.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 36
Crisp Equivalence Relations
For each element xX, there is a crisp setAx, which contains all elements of Xthat arerelated to xby the equivalence relation R.
Ax= { y| (x,y) R(x,y) } xR due to reflexivity of R. Each member of Ax is related to all the other
members of Axbecause Ris transitive andsymmetric.
No element of Ax is related to any element ofXnot included in Ax
-
7/26/2019 Fuzzy Relations Hand Out
10/23
10
@2009 Adriano Cruz NCE e IM - UFRJ Relations 37
Crisp Equivalence Relations Ex
Let X= {1,2,3,,10}
Let R(X,X) = {(x,y) | x% 3 y% 3}, % isremainder when divided by 3
This relation is reflexive, symmetric andtransitive therefore is an equivalence relationon X.
The three equivalence classes are:
A1 = A4 = A7 = A10 = {1,4,7,10}
A2= A5 = A8 = {2,5,8} A3= A6 = A9 = {3,6,9}
@2009 Adriano Cruz NCE e IM - UFRJ Relations 38
Crisp Tolerance Relations
Relations that are reflexive and symmetric arecalled a compatibility relations or tolerancerelations.
The relation city xis close to city y is atolerance relation.
Lisbon is obviously close to itself (reflexive).
If Lisbon is close to Paris then Paris is close toLisbon (symmetric).
It is not certain that if Lisbon is close to Paris
and Paris is close to Berlin then Lisbon is closeto Berlin (not transitive).
@2009 Adriano Cruz NCE e IM - UFRJ Relations 39
Partial Order
A Relation that is reflexive, antisymmetric andtransitive is called a partial order relations ( ou).
The relation A is a subet of B (A B) is a partial
order. A A (reflexive) If A B and B C then A C (transitive) If A B and B A then A = B
(antisymetric) A Partial Order does not guarantee that all
pairs are comparable
@2009 Adriano Cruz NCE e IM - UFRJ Relations 40
Strict Order
A Relation that is antireflexive,antisymmetric and transitive is called astrict order relation (< ou >).
-
7/26/2019 Fuzzy Relations Hand Out
11/23
11
@2009 Adriano Cruz NCE e IM - UFRJ Relations 41
Types of Binary Relations
Reflexive Antireflex Symmet Antisymm Transitive
Equiv X X X
QuasiEquiv
X X
Tolerance X X
PartialOrder
X X X
StrictOrder
X X X
@2009 Adriano Cruz NCE e IM - UFRJ Relations 42
Operations with Crisp Relations
Let Rand Sbe two relations on the
Cartesian product XY.
Let Oand Ibe
=
000
000
000
L
MOMM
L
L
O
=
111
111
111
L
MOMM
L
L
E
Operations with Crisp Relations
@2009 Adriano Cruz NCE e IM - UFRJ Relations 44
Operations
Crisp Relations are basically setsdefined over higher-dimensionaluniverses, that is Cartesian products
Usual operations such as union,intersection and so on are alsoapplicable.
-
7/26/2019 Fuzzy Relations Hand Out
12/23
12
@2009 Adriano Cruz NCE e IM - UFRJ Relations 45
Operations with Crisp Relations
Let Rand Sbe two relations on the
Cartesian product XY.
Let Oand Ebe
=
000
000
000
L
MOMM
L
L
O
=
111
111
111
L
MOMM
L
L
E
@2009 Adriano Cruz NCE e IM - UFRJ Relations 46
Properties of Crisp Operations
),(1),(
:
)],(),,(min[),(
:
)],(),,(max[),(
:
yxyx
oComplement
yxyxyxSR
Interseo
yxyxyxSR
Unio
RR
SRSR
SRSR
=
=
=
@2009 Adriano Cruz NCE e IM - UFRJ Relations 47
Properties of Crisp Operations
)()()(
)()()(
)()(
)()(
CABACBA
CABACBAvityDistributi
CBACBACBACBAityAssociativ
ABBA
ABBAtyComutativi
=
=
=
=
=
=
@2009 Adriano Cruz NCE e IM - UFRJ Relations 48
Properties of Crisp Operations
AXA
XXA
AAAIdentity
AAA
AAAyIdempotenc
=
=
=
=
=
=
-
7/26/2019 Fuzzy Relations Hand Out
13/23
13
@2009 Adriano Cruz NCE e IM - UFRJ Relations 49
Properties of Crisp Operations
=
=
AAmiddletheof
EAAExclusion
BABA
BABAMorganDe
=
=
@2009 Adriano Cruz NCE e IM - UFRJ Relations 50
Composition of Crisp Relations
X Y Z
R S
T=RS
@2009 Adriano Cruz NCE e IM - UFRJ Relations 51
Composition of Crisp Relations
=YX
SRy
yxyxSR )],(),([ o
productor ==
=
min
max
The operation is similar to amatrix multiplication.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 52
Example of Composition
x1
x2
x3
x4
y1
y2
y3
z1
z2
z3
ZYS
YXR
=
=
-
7/26/2019 Fuzzy Relations Hand Out
14/23
14
@2009 Adriano Cruz NCE e IM - UFRJ Relations 53
Example of Composition
=
100
100
010
011
R
=
001
100
001
S
=
001001
100
101
SR o
@2009 Adriano Cruz NCE e IM - UFRJ Relations 54
Example of Composition
x1
x2
x3
x4
z1
z2
z3
=
001
001
100
101
SR o
Fuzzy Relations
@2009 Adriano Cruz NCE e IM - UFRJ Relations 56
Fuzzy Relations
Fuzzy relations (R) map elements froma set (X) into a set (Y).
The strength of the relations is given bymembership functions that can varybetween 0 and 1.
R:XY[0:1]
-
7/26/2019 Fuzzy Relations Hand Out
15/23
15
@2009 Adriano Cruz NCE e IM - UFRJ Relations 57
Fuzzy Relations
Let Aibe fuzzy sets.
A fuzzy relation is a subset of the Cartesianproduct
The Cartesian product can be considered anrelation without restrictions.
nn AAAAAAR KK 2121 ),,,(
@2009 Adriano Cruz NCE e IM - UFRJ Relations 58
Properties of Fuzzy Relations
Let Xand Ytwo fuzzy subsets defined on anUniverse U.
Let the elements x Xand y Ywithmembership degrees X(x) e Y(y).
Let Sbe the Cartesian product X Y.
Let Rbe a fuzzy relation on S.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 59
Properties of Fuzzy Relations
Properties with similar definitions to crisprelations:
Reflexive - R(x,x) = 1
Irreflexive - R(x,x) 1 for some x
Antireflexive - R(x,x) 1 for all x
-Reflexive - R(x,x) >=
@2009 Adriano Cruz NCE e IM - UFRJ Relations 60
Properties of Fuzzy Relations
Properties with similar definitions to crisprelations:
Symmetric - R(x,y) = R(y,x)
Assymetric - R(x,y) R(y,x) for some x,yX
Antisymetric when R(x,y) > 0 and
R(y,x)>0 implies that x= yfor all x,y X
-
7/26/2019 Fuzzy Relations Hand Out
16/23
16
@2009 Adriano Cruz NCE e IM - UFRJ Relations 61
Properties of Fuzzy Relations
Properties with similar definitions to crisprelations:
Connected
Left unique, right unique, biunique
@2009 Adriano Cruz NCE e IM - UFRJ Relations 62
Properties of Fuzzy Relations
Transitive: Ris transitive if for all x,y,zwe
have that if (x,y)R and (y,z) R then(x,z)R.
),min(),(then
),(and),(If
21
21
==
kiR
kjRjiR
xx
xxxx
@2009 Adriano Cruz NCE e IM - UFRJ Relations 63
Fuzzy Similarity Relations
A fuzzy binary relation that is reflexive,symmetric and transitive is known as asimilarity relation.
An equivalence relation groupselements that are equivalent.
The similarity can be viewed from twodifferent points of view.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 64
Fuzzy Similarity Relations
The similarity can be considered togroup elements into crisp sets whosemembers are similar to each other tosome degree.
When the degree is equal to one thegrouping is an equivalence class.
-
7/26/2019 Fuzzy Relations Hand Out
17/23
17
@2009 Adriano Cruz NCE e IM - UFRJ Relations 65
Fuzzy Similarity Relations
The similarity can also consider thedegree of similarity that the elements ofXhave to some specific element xX.
Then for each Xa similarity class canbe defined.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 66
Fuzzy Similarity Relations Ex
1.5.50.500g
.51.90.900f
.5.910100e
00010.4.4d
.5.910100c
000.401.8b
000.40.81a
gfedcba
@2009 Adriano Cruz NCE e IM - UFRJ Relations 67
Fuzzy Similarity Relations Ex
X = {a, b, c, d, e, f, g}
Level set = { 0, .4, .5, .8, .9, 1}
Five nested partitions
@2009 Adriano Cruz NCE e IM - UFRJ Relations 68
Fuzzy Similarity Relations Ex
a b d c e f g=.4
a b d c e f g=.5
a b d c e f g=.8
a b d c e f g=.9
a b d c e f g=1
-
7/26/2019 Fuzzy Relations Hand Out
18/23
18
@2009 Adriano Cruz NCE e IM - UFRJ Relations 69
Fuzzy Tolerance Relations
Relations that are reflexive and symmetricare called tolerance relations.
The fuzzy relation The city xis close tothe city y is a tolerance relation.
Orderings
@2009 Adriano Cruz NCE e IM - UFRJ Relations 71
Ordering Characteristics
Similarity and tolerance arecharacterized by symmetry.
Ordering relations require asymmetry(or antisymmetry) and transitivity.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 72
Partial Ordering
A crisp binary relation R(X,X) that is reflexive,antisymmetric and transitive is called a partialordering.
The symbol is suggestive of the propertiesof this relation
x ydenotes (x,y) Rand xprecedes y
A partial ordering does not guarantee(antisymmetric x y, but ymay not x) thatall pairs of elements x, y in X are comparable(x yor y x)
-
7/26/2019 Fuzzy Relations Hand Out
19/23
19
@2009 Adriano Cruz NCE e IM - UFRJ Relations 73
Strict Ordering
A crisp binary relation R(X,X) that isantireflexive, antisymmetric andtransitive is called a strict ordering.
Therefore (x,x) R,
Operations with Fuzzy Relations
@2009 Adriano Cruz NCE e IM - UFRJ Relations 75
Operations with Fuzzy Relations
Let Rand Sbe two fuzzy relations on
the Cartesian Product XY.
Let the relations
=
000
000
000
L
MOMM
L
L
O
=
111
111
111
L
MOMM
L
L
E
@2009 Adriano Cruz NCE e IM - UFRJ Relations 76
Operations with Fuzzy Relations
),(1),(
:
)],(),,(min[),(
:
)],(),,(max[),(
:
yxyx
Complement
yxyxyxSR
onIntersecti
yxyxyxSR
Union
RR
SRSR
SRSR
=
=
=
-
7/26/2019 Fuzzy Relations Hand Out
20/23
20
@2009 Adriano Cruz NCE e IM - UFRJ Relations 77
Properties of Operations
)()()(
)()()(
)()(
)()(
CABACBA
CABACBAvityDistributi
CBACBA
CBACBAityAssociativ
ABBA
ABBAtyComutativi
=
=
=
=
=
=
@2009 Adriano Cruz NCE e IM - UFRJ Relations 78
Properties of Operations
AXA
XXA
A
AAIdentity
AAA
AAAeIdempotenc
=
=
=
=
=
=
@2009 Adriano Cruz NCE e IM - UFRJ Relations 79
Properties of Operations
AAMiddleof
EAAExclusion
BABA
BABAMorganDe
=
=
@2009 Adriano Cruz NCE e IM - UFRJ Relations 80
Composition of Fuzzy Relations
X Y Z
R S
T=RS
-
7/26/2019 Fuzzy Relations Hand Out
21/23
21
@2009 Adriano Cruz NCE e IM - UFRJ Relations 81
Composition of Fuzzy Relations
=YX
SRy
yxyxSR )],(),([ o
productor ==
=
min
max
The operation is similar to a
matrix multiplication.
@2009 Adriano Cruz NCE e IM - UFRJ Relations 82
Example of Fuzzy Composition
x1
x2
x3
x4
y1
y2
y3
z1
z2
z3
ZYS
YXR
o
o
=
=
1.0
0.8
0.9
0.8
1.0
0.9
0.8
0.7
@2009 Adriano Cruz NCE e IM - UFRJ Relations 83
Example of Fuzzy Composition
=
0.100
8.000
09.00
08.01
R
=
007.0
8.000
009.0
S
=
0000007.000
0000007.000
08.00000000
08.00000009.0
SR o
)]7.00()08.0()9.01[(),( 11 =zxR
@2009 Adriano Cruz NCE e IM - UFRJ Relations 84
Example of Fuzzy Composition
x1
x2
x3
x4
z1
z2
z3
=
007.0
007.0
8.000
8.009.0
SR o
0.9
0.8
0.80.7
0.7
-
7/26/2019 Fuzzy Relations Hand Out
22/23
22
Relation Example
@2009 Adriano Cruz NCE e IM - UFRJ Relations 86
Relation Definition
Consider a relation that express therelation petite in terms of height andweight of a female
Consider the range of these variablesas
Height = [1.51, 1.54, 1.57, , 1.69]
Weight = [40.8, 43.1, 45.4, 47.6, 49.9,52.2, 54.4, 56.7]
@2009 Adriano Cruz NCE e IM - UFRJ Relations 87
Relation Matrix
000000001.69
000000.40.40.61.66
00000.20.40.60.81.63
000.30.511111.60
00.10.7111111.57
0.10.30.9111111.54
0.20.51111111.51
56.754.452.249.947.645.443.140.8
@2009 Adriano Cruz NCE e IM - UFRJ Relations 88
Questions?
What is the degreethat a female with aspecific height and a specific weight isconsidered to be petit?
Relation is equivalent to the membership functionof a multidimensional fuzzy set.
What is the possibilitythat a petit person hasa specific of height and weight measures?
Relation is the possibility distribution assigned toa petit person whose height and weight areunknown.
-
7/26/2019 Fuzzy Relations Hand Out
23/23
@2009 Adriano Cruz NCE e IM - UFRJ Relations 89
Other question?
Given a two-dimensional relation andthe possible values of one variable,infer the possible values of the othervariable.
What is the possible weightof a personwho is about 1.63?
Is it possible to this person to weigh49.9?
@2009 Adriano Cruz NCE e IM - UFRJ Relations 90
Answering the question
What is the possibility that the person is 1.51given that she is about 1.63?
What is the possibility that the person is 1.51and weighs 49.9?
If both answers are positive then 49.9 is a
possible weigh.
Continue and ask: what is the possibility thatthe person is 1.54?
What is the possibility that she weighs 49.9?
@2009 Adriano Cruz NCE e IM - UFRJ Relations 91
Rule of inference
(Possible-height(1.51) Petite (1.51,40.8))
(Possible-height(1.54) Petite (1.54,40.8))
(Possible-height(1.69) Petite (1.69,40.8)) Possible-weight(40.8)
(Possible-height(1.51) Petite (1.51,43.1))
@2009 Adriano Cruz NCE e IM - UFRJ Relations 92
Rule of inference
= Petite jixHeight ixweight hj whhw i),()()(
)()(
Composition max-min Composition max-prod