FUZZY SETS AND FUZZY LOGIC PART 5 Fuzzy Relations Theory and Applications 1. Crisp and fuzzy relations 2. Projections/Cylindric Ext. 3. Binary fuzzy relations 4. Relations on a single set 5. Equivalence relations FUZZY SETS AND FUZZY LOGIC Theory and Applications 6. Compatibility relations 7. Ordering relations 8. Fuzzy morphisms 9. Sup-i compositions 10. Inf-ωi compositions Crisp/fuzzy relations • Crisp Relation A crisp relation represents the presence or absence of association, interaction or interconnectedness between the elements of two or more sets. A relation among crisp sets X1, X2, ..., Xn is a subset of the Cartesian product X i . It is iN denoted by R(X1, X2, ..., Xn). n R ( X 1 , X 2 , , X n ) X 1 X 2 X n R( X i | i N n ) X i iN n (abbreviated form) 3 Crisp/fuzzy relations Using a characteristic function defines the crisp relation R : 1 if x1 , x2 , , xn R, R( x1 , x2 , , xn ) 0 otherwise A relation can be written as a set of ordered tuples. Another convenient way of representing a relation R(X1, X2, ..., Xn) involves an n-dimensional membership array: R [ri1 , i2 , , in ]. ri1 , i2 , , in 1 iff x1 , x2 , , xn R, 0 otherwise 4 Crisp/fuzzy relations • Fuzzy relation A fuzzy relation is a fuzzy set defined on the Cartesian product of crisp sets X1, X2, ..., Xn where tuples 〈x1, x2, ..., xn〉 may have varying degrees of membership within the relation. The membership grade indicates the strength of the relation present between the elements of the tuple. 5 Projections/Cylindric Ext. • Projection Given a relation R(X1, X2, ..., Xn), let [R↓Y] denote the projection of R on Y that disregards all sets in X except those in the family Y X j| j J Nn (X X i|i Nn , | J | r, r n). Then, [R↓Y] is a fuzzy relation whose membership function is defined on the Cartesian product of sets in Y by the equation [ R Y ]( y) max R( x). x y 6 Projections/Cylindric Ext. 7 Projections/Cylindric Ext. • Cylindric Extension This operation on relations in some sense is an inverse to the projection. Let R be a relation defined on the Cartesian product of sets in Y, and let [ R↑ X - Y ] denote the cylindric extension of R into X i (i Nn ) that are in X but are not in Y. Then, [ R↑ X - Y ](x) = R(y) for each x such that x y. 8 Projections/Cylindric Ext. • Cylindric closure The resulting relation of a relation which be exactly reconstructed from several of its projections by taking the set intersection of their cylindric extensions. When projections are determined by the max operator, the min operator is normally used for the set intersection. 9 Projections/Cylindric Ext. Given a set of projections {Pi | i I } of a relation on X, the cylindric closure, cyl{ Pi }, base on these projections is defined by the equation cyl{Pi }( x) min[ Pi X Yi ]( x) iI for each x X where Yi denotes the family of sets on Pi is defined. 10 Projections/Cylindric Ext. 11 Binary fuzzy relations • • • • Domain : dom R( x) max R( x, y ) yY Range : ran R ( y ) max R ( x, y ) x X Height : h R( y ) max max R( x, y ) yY xX Membership matrices : R [rxy ], whererxy R( x, y). 12 Binary fuzzy relations • Sagittal diagram 13 Binary fuzzy relations • Inverse relation: The inverse of R(X, Y) is denoted R-1(Y, X). R 1 ( y, x) R( x, y) by a membership matrix R1 [ryx1 ], (R-1 )-1 R. • Max-min composition R( x, z ) [ P Q]( x, z ) max min[ P( x, y ), Q( y, z )] • Relational join yY R( x, y, z) [ P Q](x, y, z) min[P( x, y), Q( y, z)] 14 Binary fuzzy relations 15 Relations on a single set • For crisp relations • R(X, X) is reflexive iff <x, x> R for each x X. Otherwise, R(X, X) is called irreflexive. If <x, x> R, R(X, X) is called antireflexive. • R(X, X) is symmetric iff <x, y>, <y, x> R for each x, y X. Otherwise, R(X, X) is called asymmetric. If <x, y> and <y, x>R implies x=y, then R(X, X) is called antisymmetric. (strictly antisymmetric: If <x, y> or <y, x> R implies x y ) 16 Relations on a single set • R(X, X) is transitive iff <x, z> R whenever both <x, y>, <y, z> R for at least y X. Otherwise, R(X, X) is called nontransitive. If <x, z> R whenever both <x, y>, <y, z> R, R(X, X) is called antitransitive. 17 Relations on a single set • For fuzzy relations 18 Relations on a single set • For fuzzy relations 19 Relations on a single set For fuzzy relation R(X, X) • Reflexive: R( x, x) 1, for all x X . irreflexive: if not for some x X. antireflexive: R( x, x) 0, for all x X . ε-reflexive: R( x, x) , where 0 1. • Symmetric: R( x, y) R( y, x), for all x, y X . asymmetric: if not for some x, y X. antisymmetric: when R( x, y ) 0 and R( y, x) 0 imples that x y for all x, y X . 20 Relations on a single set • Transitive (or, more specifically max-min transitive): R( x, z ) max min[R( x, y), R( y, z )] yY for each pair x, z X . 2 nontransitive: if not for some members of X. antitransitive: R( x, z ) max min[R( x, y), R( y, z )] yY for all x, z X 2 . 21 Relations on a single set • Transitive closure - RT(X, X) – For crisp relations: RT(X, X) is defined as the relation that is transitive, contains R(X, X), and has the fewest possible members. – For fuzzy relations: the elements of the transitive closure have the smallest possible membership grades that still allow the first two requirements to be met. 22 Relations on a single set • Algorithm of finding transitive closure 1. R' R ( R R). 2. If R' R, make R R' and go to step1. 3. Stop : R' RT . 23 Relations on a single set Example 5.8 • Determine max-min closure RT(X, X) for a fuzzy relation R (X, X) .7 .5 0 0 R 0 .4 0 0 0 0 0 .8 0 1 0 0 24 Relations on a single set Step 1. .7 .5 0 .5 .7 .5 0 .5 0 0 .8 0 0 0 .8 1 R (R R) R '. RR 0 0 0 .4 0 .4 0 .4 0 . 4 0 0 0 . 4 . 8 0 Since R ' R , R R ' go back tostep1. .7 .5 .5 .5 .7 0 .4 .8 .4 0 R (R R) RR 0 .4 .4 .4 0 0 . 4 . 4 . 4 0 Since R ' R , R R ' go back tostep1. .7 0 0 0 .5 .5 .5 .4 .8 1 R' R T . .4 .4 .4 .4 .8 .4 .5 .5 .5 .4 .8 1 R '. .4 .4 .4 .4 .8 .4 Stop. 25 Equivalence relations • Equivalence relation: A crisp binary relation R(X, X) that is reflexive, symmetric, and transitive. • Equivalence class: Ax is a crisp subset of X, where R(X, X) is a equivalence relation. Ax is referred to as a equivalence class of R(X, X) with respect to x. 26 Equivalence relations • Similarity relation: A fuzzy binary relation R(X, X) that is reflexive, symmetric, and transitive. • Similarity class : A fuzzy set in which the membership grade of any particular element represents the similarity of that element to the element x. 27 Equivalence relations Example 5.10 • Let X = {1, 2 , . . . , 10}. The Cartesian product X X ×Y contains 100 members: 〈1, 1〉,〈1, 2〉, 〈1, 3〉,… ,〈10, 10〉. Let R(X, X) = {〈x, y〉|x and y have the same remainder when divided by 3 }. The relation is easily shown to be reflexive, symmetric, and transitive and is therefore an equivalence relation on X. The three equivalence classes denned by this relation are: 28 Equivalence relations A1 = A4 = A7 = A10 = {1, 4, 7, 10 }, A2 = A5 = A8 = {2, 5, 8 }, A3 = A6 = A9 = {3, 6, 9}. Hence, in this example, X / R = { {1, 4, 7,10 }, {2, 5, 8 }, {3, 6, 9 } }. 29 Equivalence relations • Example 5.10 • The fuzzy relation R(X, X) represented by the membership matrix is a similarity relation on X =(a, b, c, d, e, f, g). 30 Equivalence relations • To verify that R is reflexive and symmetric is trivial. To verify its transitivity, we may employ the algorithm for calculating transitive closures introduced in Sec. 5.4. • If the algorithm is applied to R and terminates after the first iteration, then, clearly, R is transitive. The level set of R is ΛR = {0, .4, .5, .8, .9,1}. Therefore, R is associated with a sequence of five nested partitions π (αR), for α Λ R and α > 0. Their refinement relationship can be conveniently diagrammed by a partition tree, as 31 shown in Fig. 5.7. Equivalence relations 32 Compatibility relations R(X, X) is a reflexive and symmetric fuzzy relation, it is sometimes called a proximity relation. • Compatibility class : Given a crisp compatibility relation R(X, X), a compatibility class is a subset A of X such that〈 x, y 〉 R for all x, y A. • Maximal compatibility class : a compatibility class that is not properly contained within any other compatibility class. 33 Compatibility relations • Complete cover : The family consisting of all the maximal compatibles induced by R on X is called a complete cover of X with respect to R. • α-compatibility class : A subset A of X such that R(x, y) ≧α for all x, y A. 34 Compatibility relations Example 5.11 • Consider a fuzzy relation R(X, X) defined on X = N9 by the following membership matrix: 35 Compatibility relations • Since the matrix is symmetric and all entries on the main diagonal are equal to 1, the relation represented is reflexive and symmetric; therefore, it is a compatibility relation. • The graph of the relation is shown in Fig. 5.8; its complete α-covers for α > 0 and α Λ R = {0, .4, .5, .7, .8,1} are depicted in Fig. 5.9. 36 Compatibility relations 37 Compatibility relations 38 Ordering relations • Partial ordering : A crisp binary relation R(X, X) that is reflexive, antisymmetric, and transitive is called a partial ordering. • Minimum, maximum, minimal, maximal 39 Ordering relations • Lower bound, greatest lower bound: Let X be a set on which a partial ordering is defined, and let A be a subset of X(A X). If x X and x y for every y A, then x is called a lower bound of A on X with respect to the partial ordering. If a particular lower bound succeeds every other lower bound of A, then it is called the greatest lower bound, or infimum, of A. 40 Ordering relations • Upper bound, least upper bound: If x X and y x for every y A, then x is called an upper bound of A on X with respect to the relation. If a particular upper bound precedes every other upper bound of A, then it is called the least upper bound, or supremum, of A. • Lattice: A partial ordering on a set X that contains a greatest lower bound and a least upper bound for every subset of two elements of X is called a lattice. 41 Ordering relations • Hasse diagram: Each element of X is expressed by a single node that is connected only to the nodes representing its immediate predecessors and immediate successors. The connections are directed in order to distinguish predecessors from successors; the arrow ← indicates the inequality ≦ . Diagrams of this sort are called Hasse diagrams. 42 Ordering relations Example 5.12 • Three crisp partial orderings P, Q, and R on the set X = {a, b, c, d, e} are defined by their membership matrices (crisp) and their Hasse diagrams in Fig. 5.10. The underlined entries in each matrix indicate the relationship of the immediate predecessor and successor employed in the corresponding Hasse diagram. P has no special properties, Q is a lattice, and R is an example of a lattice that represents a linear ordering. 43 Ordering relations 44 Ordering relations • Fuzzy partial ordering : A fuzzy binary relation R on a set X is a fuzzy partial ordering iff it is reflexive, antisymmetric, and transitive under some form of fuzzy transitivity. • Dominating class: R[ x] ( y) R( x, y) where y X . • Dominated class: R[ x] ( y) R( y, x) where y X . 45 Ordering relations • Undominated: An elementx X is undominated iff R( x, y ) 0. for all y X and x y. • Undominating: An elementx X is undominating iff R( y, x) 0. for all y X and y x. 46 Ordering relations • Fuzzy upper bound : For a crisp subset A of a set X on whicha fuzzy partialorderingR is defined, the fuzzy upper bound for A is thefuzzy set denotedby U ( R, A) and defined by U ( R, A) R[ x ] , xA where denotesan appropriate fuzzy intersection. 47 Ordering relations • Least upper bound : If a least upper boundof theset A exists,it is the unique elementx in U ( R, A) such that U ( R, A)(x) 0 and R( x, y ) 0 for all elementsy in thesupportof U ( R, A). 48 Ordering relations Example 5.13 • The following membership matrix defines a fuzzy partial ordering R on the set X = {a, b, c, d, e}: • The columns of the matrix give the dominated class for each element. Under this ordering, the element d is undominated, and the element c is undominadng. 49 Ordering relations • For the subset A ={a, b}, the upper bound is the fuzzy set produced by the intersection of the dominating classes for a and b. Employing the min operator for fuzzy intersection, we obtain • The unique least upper bound for the set A is the element b. All distinct crisp orderings captured by the given fuzzy partial ordering R are shown in Fig. 5.11. We can see that the orderings became weaker with the increasing value of α. 50 Ordering relations 51 Fuzzy morphisms • Homomorphism : If two crisp binary relations R(X, X) and Q(Y, Y) are defined on sets X and Y, respectively, then a function h : X → Y is said to be a homomorphism from〈X, R〉to 〈Y, Q〉if x1, x2 R implies h( x1 ), h( x2 ) Q, for all x1, x2 X. 52 Fuzzy morphisms • Strong homomorphism: x1 , x2 R implies h( x1 ), h( x2 ) Q for all x1 , x2 X , and y1 , y2 Q implies x1 , x2 R for all y1 , y2 Y , where x1 h 1 ( y1 ) and x2 h 1 ( y2 ) . 53 Fuzzy morphisms 54 Fuzzy morphisms 55 Fuzzy morphisms • Isomorphism : If h : X → Y is a homomorphism from 〈X, R〉 to 〈Y, Q〉, and if h is completely specified, one-to-one, and onto, then it is called an isomorphism. 56 Sup-i compositions • Sup-i composition : Given a particular t-norm i and two fuzzy relations P(X, Y) and Q(Y, Z), the sup- i composition of P and Q is a fuzzy relation on X x Z denned by i [ P Q](x, z ) sup i[ P( x, y), Q( y, z )] yY for all x X , z Z . 57 Sup-i compositions • Basic properties 58 Sup-i compositions 59 Sup-i compositions • i-transitive: We say that relation R on X2 is i-transitive iff R( x, z) i[ R( x, y), R( y, z)] for all x, y, z X. • i-transitive closure: When a relation R is not i-transitive, we define its i-transitive closure as a relation RT(i) that is the smallest i-transitive relation containing R. 60 Sup-i compositions • Theorem 5.1 For any fuzzy relation R on X2, the fuzzy relation RT (i ) R (n) n 1 is the i-transitive closure of R. • Theorem 5.2 Let R be a reflexive fuzzy relation on X2, where |X| = n ≧ 2. Then, RT(i)=R(n-1). 61 Inf-ωi compositions • Operation ωi : Given a continuous t-norm i, let i (a, b) sup{x [0, 1] | i(a, x) b} for every a, b [0, 1]. 62 Inf-ωi compositions • Inf- ωi composition Given a t - normi and theassociatedoperationi , theinf - i i composition, P Q, of fuzzy relationP( X, Y) and Q(Y, Z) is defined by theequation i ( P Q)(x, z ) inf i [ P( x, y), Q( y, z)] yY for all x X , z Z . 63 Inf-ωi compositions • Theorem 5.3 For any a, aj, b, d [0, 1], where j takes values from an Index set J, operation ωi has the following properties: 64 Inf-ωi compositions 65 Inf-ωi compositions • Theorem 5.4 Let P(X, Y), Q(Y, Z), R(X, Z), and S(Z, V) be fuzzy relations. Then: 66 Inf-ωi compositions • Theorem 5.5 Let P(X, Y), Pj(X, Y), Q(Y, Z), and Qj(Y, Z) be fuzzy relations, where j takes values in an index set J. Then, 67 Inf-ωi compositions • Theorem 5.6 Let P(X, Y), Q1(Y, Z), Q2(Y, Z), and R(Z, V) be fuzzy relations. If Q1 Q2, then 68 Inf-ωi compositions • Theorem 5.7 Let P(X, Y), Q(Y, Z), and R(X, Z) be fuzzy relations. Then, 69 Exercise 5 • • • • • • 5.1 5.4 5.6 5.11 5.19 5.20 70