l5 & l6 relations

22
EE-646 Lecture-6 Relations Contd.

Upload: mohammad-rehman

Post on 13-Aug-2015

80 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: L5 & l6 relations

EE-646

Lecture-6

Relations Contd.

Page 2: L5 & l6 relations

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

Page 3: L5 & l6 relations

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

Page 4: L5 & l6 relations

Coordinate Space

16-Oct-12 EE-646, Lec-6 4

2 4 6

r

q

p

X

Y

Page 5: L5 & l6 relations

Sagittal Diagram

16-Oct-12 EE-646, Lec-6 5

2

4

6

p

q r

X Y

Page 6: L5 & l6 relations

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

Page 7: L5 & l6 relations

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

Page 8: L5 & l6 relations

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

Page 9: L5 & l6 relations

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

Page 10: L5 & l6 relations

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

Page 11: L5 & l6 relations

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

Page 12: L5 & l6 relations

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

Page 13: L5 & l6 relations

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

Page 14: L5 & l6 relations

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

Page 15: L5 & l6 relations

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

Page 16: L5 & l6 relations

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

Page 17: L5 & l6 relations

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

Page 18: L5 & l6 relations

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

Page 19: L5 & l6 relations

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

Page 20: L5 & l6 relations

Composition Operations

• Two Types:

1. Max-min composition

2. Max-product composition

16-Oct-12 EE-646, Lec-6 20

Page 21: L5 & l6 relations

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

Page 22: L5 & l6 relations

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