Chapter 5 - Relation

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Chapter 5 : Relation and digraphs

5.1 Cartesian Multiplication on Sets

Consider two sets A and B where A ={1,2}, B={3,4,5}


Set of all ordered pairs of elements of A and B is {(1,3), (1,4), (1,5), (2,3), (2,4), (2,5)}

This set is denoted by A x B and is called the Cartesian multiplication of sets A and B.
i.e: A x B = {(1,3), (1,4), (1,5), (2,3), (2,4), (2,5)}

However, the Cartesian multiplication of B sets and A is denoted by B x A.


So, B x A = {(3,1), (3,2), (4,1), (4,2), (5,1), (5,2)}

Clearly, A x B ≠ B x A

Definition: If A and B are two non-empty sets, we define the multiplication sets or
Cartesian multiplication A x B has the set of all ordered pairs (a,b) with a ∈ A and b ∈ B.
Thus, A x B = {(a,b) | a ∈ A and b ∈ B}

Example 1:
Let A = {a, b, c}, B = {d, e}, C = {a,d}
Find i. AxB ii. BxA

iii. A x (B C) iv. (A C) x B

v. (A B) x C

Faculty Information Science and Engineering (FISE) Page 1


5.2 Relations

Consider the following example:


Given A = {Mohan, Sohan, David, Karim}
B = {Rita, Mary, Fatima}

Suppose Rita has two brothers Mohan and Sohan, Mary has one brother David, and
Fatima has one brother Karim. If we define a relation R ‘is a brother of’ between the
elements of A and B then clearly,

Mohan R Rita, Sohan R Rita, David R Mary, Karim R Fatima.

After omitting R between two names these can be written in the form of ordered pairs as:
(Mohan, Rita), (Sohan, Rita), (David, Mary), (Karim, Fatima)

The above information can also be written in the form of a set R of ordered pairs as:
R = {(Mohan, Rita), (Sohan, Rita), (David, Mary), (Karim, Fatima)}

Clearly R A x B, where R = {(a, b) | a ∈ A, b ∈ B and aRb}

If A and B are two sets, then a relation R from A to B is a subset of A x B.

We can describe a relation R by ordered pairs, an arrow diagram and a graph.

Example 2:
Let set A = {1, 2, 3, 4}, set B = {1, 4, 9, 16, 25} and R is a relation ‘squared is’ between
A and B. Describe the relation by:

1. Ordered pairs

2. An arrow diagram 3. A graph

Faculty Information Science and Engineering (FISE) Page 2


What are a domain, range and co-domain?
Consider a relation R from set A and set B, where
i. Domain = set A
ii. Co-domain = the whole set B
iii. Object = elements in set A
iv. Range = elements in set B that are matched with elements in set A

Example 3:
Use the example 2, find the following
i. Domain

ii. Co-domain

iii. Object

iv. Range

Exercise:

1. Given that A = {2, 4, 5, 6, 7}, B = {2, 3}. R is a relation from A to B defined by:
R = {(a,b) | a ∈ A, b ∈ B and ‘a is divisible by b’}. Find
i. R is ordered pairs
ii. the domain of R
iii. the range of R
iv. Represent R in an arrow diagram

2. If A = {4, 6, 8, 10}, B = {2, 3, 4, 5}. R is a relation defined from A to B where


R = {(a,b) | a ∈ A, b ∈ B and ‘a is multiple of b’}. Find
i. R is ordered pairs
ii. the object of R
iii. the co-domain of R
iv. Represent R in a graph

3. Let X = {1, 2, 3, 4} and Y = {0, 1, 2, 3, 4, 5}. R is a relation ‘x ≥ y’. Find


i. R is ordered pairs
ii. the domain of R
iii. the co-domain of R

Faculty Information Science and Engineering (FISE) Page 3


5.3 Properties of relation

1. Reflexive
A relation R on a set A is called reflexive if (a,a) ∈ R for every element a ∈ A.

Example 4:
Consider the following relations on {1,2,3,4}
R1 = {(1,1), (1,2), (2,1), (2,2), (3,4), (4,1), (4,4)}
R2 = {(1,1), (1,2), (2,1)}
R3 = {(1,1), (1,2), (1,4), (2,1), (2,2), (3,3), (3,4), (4,1), (4,4)}
R4 = {(2,1), (3,1), (3,2), (4,1), (4,2), (4,3)}
R5 = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,3), (2,4), (3,3), (3,4), (4,4)}
R6 = {(3,4)}

Which are these relations reflexive?

2. Symmetric
A relation R on a set A is called symmetric if (b,a) ∈ R whenever (a,b) ∈ R, for all
a, b ∈ A

A relation R on a set A is called antisymmetric if a = b, then either aRb or bRa.

A relation R on a set A is called asymmetric if a ≠ b and whenever aRb then bRa.

Example 5:
Consider the same relations in Example 4. Which are these relations symmetric,
antisymmetric and asymetric?

Faculty Information Science and Engineering (FISE) Page 4


3. Transitive
A relation R on a set A is called transitive if whenever (a,b) ∈ R and (b,a) ∈ R,
then (a,c) ∈ R, for all a, b, c ∈ R.

Example 6:
Consider the same relations in Example 4. Which are these relations transitive?

Exercise:
1. Determine whether the relations represented by the following sets of
ordered pairs are reflexive, symmetric or transitive.
(a) {(1,1), (2,1), (2,2), (3,1), (3,2), (3,3)}
(b) {(1,2), (1,3), (2,3), (2,1), (3,2), (3,1)}
(c) {(1,1), (1,3), (2,2), (3,2), (1,2)}
(d) {(1,1), (2,2), (3,3)}

2. If the relation R = {(a,a), (a,b), (b,a), (b,b), (c,d), (c,c), (b,d), (d,b), (d,c),
(d,d)} on the set {a,b,c,d} need to be write the following properties. List
the ordered pairs which satisfied the following properties:
(a) reflexive
(b) symmetric
(c) transitive
(d) symmetric and transitive

Faculty Information Science and Engineering (FISE) Page 5


5.4 A digraph

Definition: A directed graph or digraph, consists of a set V of vertices (or nodes)


together with a set of E of edges (or arcs).

Given the ordered pair (a,b). The vertex a is called the initial vertex of the edges and the
vertex b is called the terminal vertex of edges.

Example 7:
Given the set V = {a, b, c, d} and the set E ={(a,b),(a,d), (b,b), (b,d), (c,a), (c,b), (d,b)}.
i. Draw a digraph of the above sets.

ii. Find the in-degree and out-degree for each of the vertices.

iii. State the property of R.

Example 5:
Given the following R = {(1,1),(1,2),(1,3),(2,2),(2,1),(2,3),(3,3),(3,1),(3,2)}.

i. Draw a digraph of R.

ii. Find the in-degree and out-degree for each of the vertices.

iii. State the property of R.

Faculty Information Science and Engineering (FISE) Page 6

You might also like