You are on page 1of 14

DISCRETE

MATHEMATICS
OPERATIONS ON
BITS Pilani
RELATIONS
Hyderabad Campus Michael Alphonse
The topic to be covered

1. OPERATIONS ON RELATIONS

BITS Pilani, Hyderabad Campus


OPERATIONS ON RELATIONS

If R ⊆ A1 x A2 x … X An is a relation then
R = (A1 x A2 x … X An ) – R is a relation.
If R1 ⊆ A1 x A2 x … x An and R2 ⊆ A1 x A2 x … x An are relations
then R1 U R2 and R1 ⋂ R2 are relations.

Example 1. : If R is the relation ≤ defined on integers then R is the


union of two relations R1 : < and R2 : =.
Example 2: Let R ⊆ A1 x A2 x … X An be a relation. The
projection of R of the component position (1, 2, …j-1,j+1, …
n) is an operation on R which is given by if (a 1, a2, …an) ∈ R
then its projection is given by (a1, a2, … aj-1,aj+1, …an)

BITS Pilani, Hyderabad Campus


Where are these operations on
Relations applied ?
ID Name Age Salary

1 Adam 34 13000
2 Alex 28 15000
3 Stuart 20 18000
4 Ross 42 19020

1. How do you visualize the above table a relation ?


2. What are possible operations you can define on tables ?

BITS Pilani, Hyderabad Campus


Join operation

BITS Pilani, Hyderabad Campus


Practical Application of Join
Operation
Id No
First Name
Last Name
Date of Birth
Highest Qualification
Address

BITS Pilani, Hyderabad Campus


Inverse Operation

Def : Suppose R ⊆ A x B, the inverse of R denoted by R-1 is the


relation {(y, x): (x, y) ∈ R}.
If R = {(y,x), (z,y), (y,z), (x, z)} what is R-1 ?
If R is the relation ≤ on Z, What is R-1 ?
If R is the relation = on Z, What is R-1 ?
The following digraph shows R and R-1.

BITS Pilani, Hyderabad Campus


Composition Operation

BITS Pilani, Hyderabad Campus


BITS Pilani, Hyderabad Campus
Transitive Closure

Suppose R ⊆ AxA. The transitive closure of R denotes by R+ is R U R2 U


R3 U … =
The transitive reflexive closure of R denotes by R* is
R+ U {(a, a): a∈A}
If R is the relation “is a parent of” what is the composition and transitive
closure?

R+ is the smallest relation containing R that is transitive.


First we prove R+ is transitive.
Second we prove R⊆Q and Q is transitive, then R+ ⊆ Q.

Similarly R* is the smallest relation containing R that is transitive and


reflexive.

BITS Pilani, Hyderabad Campus


BITS Pilani, Hyderabad Campus
Symmetric Closure

The Symmetric closure of a relation R is the set RUR-1 .


RUR-1 is the smallest symmetric relation that contains R.
Find symmetric closures for the following relations:

BITS Pilani, Hyderabad Campus


Problems

BITS Pilani, Hyderabad Campus


Problems

BITS Pilani, Hyderabad Campus

You might also like