l5 & l6 relations
TRANSCRIPT
EE-646
Lecture-6
Relations Contd.
Representation of Relations
• Relational Matrix
• Coordinate Space
• Sagittal diagram
Consider the following relation on the sets X = {2, 4, 6} & Y = {p, q, r}
R = {(2, p), (2, r), (4, q), (6, q), (6, r)}
16-Oct-12 2 EE-646, Lec-6
Relation Matrix
16-Oct-12 EE-646, Lec-6 3
R p q r
2 1 0 1
4 0 1 0
6 0 1 1
X
Y
Coordinate Space
16-Oct-12 EE-646, Lec-6 4
2 4 6
r
q
p
X
Y
Sagittal Diagram
16-Oct-12 EE-646, Lec-6 5
2
4
6
p
q r
X Y
Universal Relation
Universal relation is unconstrained cartesian product of sets with r = 2 (i.e., for A2).
E.g. universal relation on set X above is
UX = {(2, 2), (2, 4), (2, 6), (4, 2), (4, 4), (4, 6), (6, 2), (6, 4), (6, 6)}
Relation matrix for universal relation will be...
16-Oct-12 EE-646, Lec-6 6
Identity Relation
It is constrained cartesian product of sets with r = 2.
E.g. identity relation on set X above is
IX = {(2, 2), (4, 4), (6, 6)}
Relation matrix for identity relation will be...
16-Oct-12 EE-646, Lec-6 7
Cardinality of Classical Relations
Suppose n elements of the universe X are related (paired) to m elements of the universe Y.
If the cardinality of X is nX and the cardinality of Y is nY, then the cardinality of the relation, R, between these two universes is nX×Y = nX . nY
The cardinality of the power set describing this relation, P(X × Y), is then
16-Oct-12 EE-646, Lec-6 8
.
( ) 2 X Yn n
P X Yn
Relation Example 1
16-Oct-12 EE-646, Lec-6 9
Time
Speed
Distance
sec
metre
rpm
X Y
Relation is: Unit of Physical Quantity
Relation Example 2
16-Oct-12 EE-646, Lec-6 10
Civil Mechanical
Electrical Electronics Autombile
Lathe Wire Transistor Soil Engine
X Y
Relation is: Basic Object that an engg branch deals with
Discussion
Above figures show mapping of an un-constrained relation. A more general crisp relation R exists when mapping between elements are constrained. A characteristic function is used to assign values of relationship in the Cartesian space X × Y to the binary values {0, 1} & is given by:
16-Oct-12 EE-646, Lec-6 11
1,( , )( , )
0, ( , )R
x y X Yx y
x y X Y
Operations on Classical Relations
Let R and S be two separate relations on the Cartesian universe X × Y, then the null and complete relations for 3 × 3 form are defined as:
16-Oct-12 EE-646, Lec-6 12
0 0 0 1 1 1
0 0 0 and 1 1 1
0 0 0 1 1 1
Ο E
Operations on Classical Relations
The function-theoretic operations for the two crisp relations (R, S) can be defined as:
1. Union:
2. Intersection:
3. Complement:
16-Oct-12 EE-646, Lec-6 13
( , ) : ( , ) max[ ( , ), ( , )]R S R S R S
R S x y x y x y x y
( , ) : ( , ) min[ ( , ), ( , )]R S R S R S
R S x y x y x y x y
( , ) : ( , ) 1 ( , )R R R
R x y x y x y
Operations on Classical Relations
4. Containment:
5. Null & Complete Relations Identity:
∅ → O and X → E
16-Oct-12 EE-646, Lec-6 14
( , ) : ( , ) ( , )R R S
R S x y x y x y
Properties of Classical Relations
• The properties of classical set operations such as commutativity, associativity, distributivity, involution and idempotency also hold for crisp relations
• Moreover, De’Morgan’s Laws and the excluded middle axioms also hold for crisp relations just as they do for crisp sets.
• Null relation is analogous to ... set while complete relation is analogous to ... set
16-Oct-12 EE-646, Lec-6 15
Composition of Relations
• The operation executed on two compatible binary relations is called composition
• Let R be a relation that maps elements from universe X to universe Y, and let S be a relation that relates or maps elements from universe Y to universe Z.
• Composition is an operation that relates R with S
16-Oct-12 EE-646, Lec-6 16
Composition...contd
• The two binary relations R & S are compatible if:
• i. e., the second set in R must be the same as the first in S
• Similar to matrix multiplication compatibility, No. of columns in first matrix = No. of rows in second matrix
16-Oct-12 EE-646, Lec-6 17
R X Y
S Y Z
Composition...contd
• On the basis of this explanation, a relation T can be formed that relates the same elements of universe X contained in R with the same elements of universe Z contained in S by composition operation.
• It is denoted by T = R S
• Where, is the composition operator
16-Oct-12 EE-646, Lec-6 18
Composition...contd
Consider the following universal sets:
X = {a1, a2, a3}, Y = {b1, b2, b3} & Z = {c1, c2, c3}
Let R = {(a1, b1), (a1, b2), (a2, b2), (a3, b3)} & S = {(b1, c1), (b2, c3), (b3, c2)}
Then, the composition can be obtained as:
T = R S = {(a1, c1), (a1, c3), (a2, c3), (a3, c2)}
Construct the relation matrices for R, S & T (right now)
16-Oct-12 EE-646, Lec-6 19
Composition Operations
• Two Types:
1. Max-min composition
2. Max-product composition
16-Oct-12 EE-646, Lec-6 20
Composition Operations
• The max-min composition is defined by the function-theoretic expression as:
• The max-min (or max-dot) composition is defined by the function-theoretic expression as:
16-Oct-12 EE-646, Lec-6 21
( , ) ( , ) ( , )T R S
y YT R S x z x y y z
( , ) ( , ) ( , )T R S
y YT R S x z x y y z
Some Properties of ◦ operator
• Associativity: (R◦S)◦M = R◦(S◦M)
• Commutativity: (R◦S) ≠ (S◦R)
• Invertibility: (R◦S)−1 = S−1 ◦R−1
16-Oct-12 EE-646, Lec-6 22