DM20

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

BITS Pilani

Pilani Campus

MATH F213
Relations and Digraphs
Learning Objectives

• To understand an important structure of a relation on a set.

• The representation of a relation on a set with directed graphs.

• To study important classes of relation like equivalence relations


and ordering relations defined by their important properties.

BITS Pilani, Pilani Campus


What is a relation?

We recall definition and certain properties of a relation form


Section 1.3 of the text.
Definition : For sets 𝐴, 𝐵, a (binary) relation 𝑅 from 𝐴 to 𝐵 is a
subset of 𝐴 × 𝐵. (Thus its elements are some ordered pairs
𝑎, 𝑏 , 𝑎 ∈ 𝐴, 𝑏 ∈ 𝐵.)
If 𝐵 = 𝐴, then we say 𝑅 is a binary relation on 𝐴.
An 𝑛-ary relation 𝑅 on 𝐴 is a subset of 𝐴𝑛 . If 𝑛 = 1, then 𝑅 is called
a unary relation on 𝐴.
Ex. Let 𝐴 = the set of all real numbers. Then
𝑅 = { 𝑥, 𝑦 : 𝑥, 𝑦 are real numbers with 𝑥 2 + 𝑦 2 < 1}
is a binary relation on 𝐴.

BITS Pilani, Pilani Campus


Definition : For a relation 𝑅 from 𝐴 to 𝐵, the domain of 𝑅 is the set
dom 𝑅 = {𝑥 ∈ 𝐴 ∶ (𝑥, 𝑦) ∈ 𝑅 for some 𝑦 ∈ 𝐵}.
The range of 𝑅 is the set
ran 𝑅 = {𝑦 ∈ 𝐵: ∶ (𝑥, 𝑦) ∈ 𝑅 for some 𝑥 ∈ 𝐴}.
Definition : Let 𝑅 be a relation from 𝐴 to 𝐵. For any 𝑎 ∈ 𝐴, how to
define 𝑅 𝑎
𝑅 𝑎 = 𝑏 ∈ 𝐵: 𝑎, 𝑏 ∈ 𝑅 .
• The relation 𝑅−1 from 𝐵 to 𝐴 is defined by
𝑅−1 = { 𝑏, 𝑎 : (𝑎, 𝑏) ∈ 𝑅}.
Note : As a consequence, for any b ∈ 𝐵,
𝑅−1 𝑏 = 𝑎 ∈ 𝐴 ∶ 𝑎, 𝑏 ∈ 𝑅 .

BITS Pilani, Pilani Campus


Another notation : If 𝑎, 𝑏 ∈ 𝑅, we write 𝑎𝑅𝑏.

Ex : For the relation on the set A of real numbers,


𝑅 = { 𝑥, 𝑦 : 𝑥, 𝑦 are real numbers with 𝑥 2 + 𝑦 2 < 1}
1
Find dom 𝑅 , Ran 𝑅 , 𝑅−1 , 𝑅 ,𝑅 0 ,𝑅 1 .
2
dom 𝑅 = {𝑥 ∈ 𝐴 ∶ (𝑥, 𝑦) ∈ 𝑅 for some 𝑦 ∈ 𝐵}.
dom 𝑅 = 𝑥 ∈ 𝐴 ∶ −1 < 𝑥 < 1 = Ran 𝑅.
𝑅−1 = R.
1 3 3
𝑅 = 𝑥∈𝐴∶− <𝑥< .
2 2 2
𝑅 0 = −1,1
𝑅 1 = ∅.
BITS Pilani, Pilani Campus
Functions
Definition : A relation 𝑅 from 𝐴 to 𝐵 is called a function (or a
map) from A to B if
(i) dom 𝑅 = 𝐴 (for each a ∈A, (a,b) ∈ R for some b ∈R), and (ii) If
𝑥, 𝑦 , (𝑥, 𝑧) ∈ 𝑅 then 𝑦 = 𝑧 (𝑅 is single valued).
Equivalently a relation 𝑅 from 𝐴 to 𝐵 is a function from A to B iff
for every 𝑥 ∈ 𝐴 there exists a unique 𝑦 ∈ 𝐵 such that 𝑥𝑅𝑦.
This happens if and only if 𝑅 𝑎 = 1 for all 𝑎 ∈ 𝐴 (𝑅 𝑎 =
𝑏 ∈ 𝐵: 𝑎, 𝑏 ∈ 𝑅 )
The function 𝑅 is called one-to-one (or injective) if 𝑥, 𝑧 , 𝑦, 𝑧 ∈
𝑅 𝑖𝑚𝑝𝑙𝑖𝑒𝑠 𝑥 = 𝑦. Thus 𝑅 is one-to-one if and only if for all
𝑏 ∈ Ran 𝑅, |𝑅−1 𝑏 | = 1.
𝑅 is called onto if ran 𝑅 = 𝐵.
𝑅 is called a one-to-one correspondence from A to B if 𝑅 is one-
to-one as well as onto. BITS Pilani, Pilani Campus
BITS Pilani, Pilani Campus
Note : If 𝑅 is a one-to-one correspondence from 𝐴 to 𝐵 then 𝑅−1 is
a one-to-one correspondence form 𝐵 to 𝐴, in particular, 𝑅−1 is a
function from 𝐵 to 𝐴.
Definition : If 𝑅 is a relation from 𝐴 to 𝐵 and 𝑆 is a relation from 𝐵
to 𝐶, then the composition of R and S is defined by a relation
𝑅 ∙ 𝑆 (𝑜𝑟 𝑅𝑆) from 𝐴 to 𝐶 such that
𝑓𝑜𝑟 𝑥 ∈ 𝐴, 𝑦 ∈ 𝐶, 𝑥, 𝑦 ∈ 𝑅𝑆 if and only if there exists 𝑧 ∈ 𝐵 such
that 𝑥, 𝑧 ∈ 𝑅, 𝑧, 𝑦 ∈ 𝑆.
Ex. : Let 𝐴 = 1,2,3 , 𝐵 = 4,5 , 𝐶 = 𝑎, 𝑏, 𝑐 , 𝑅 =
1,4 , 1,5 , 2,5 , 𝑆 = 4, 𝑎 , 5, 𝑐 . Then find RS.
𝑅𝑆 = 1, 𝑎 , 1, 𝑐 , 2, 𝑐 .

BITS Pilani, Pilani Campus


Notes :
• If 𝑅 is a one-to-one correspondence from 𝐴 to 𝐵 then
𝑅𝑅−1 = 𝑎, 𝑎 : 𝑎 ∈ 𝐴 , 𝑅−1 𝑅 = 𝑏, 𝑏 : 𝑏 ∈ 𝐵 , the diagonals
of 𝐴 and 𝐵 respectively.
• If 𝐴 = 1,2 , 𝐵 = {𝑎, 𝑏} then 𝑅 = 𝐴 × 𝐵 is a relation from 𝐴
to 𝐵 but 𝑅𝑅−1 = 𝐴 × 𝐴.

BITS Pilani, Pilani Campus


Relations and digraphs

We define a new concept called a directed graph (or digraph) and


show its connection with a binary relation on a finite set V.
We will show that these two concepts are different ways of
viewing the same object, each having its own advantages.

BITS Pilani, Pilani Campus


Digraphs
A pair of sets 𝐺 = (𝑉, 𝐸) is called a directed graph ( or digraph) if
𝐸 ⊆ 𝑉 × 𝑉. 𝑉 is a finite set whose elements are called the
vertices of 𝐺 and elements of 𝐸 are called the edges of 𝐺.
A digraph can be drawn geometrically as :
Any vertex is represented by a point. An edge from 𝑥 to 𝑦 is
represented by an arrow from the point representing (a,a)𝑥 to the
point representing 𝑦.
a
Ex : Let 𝐺 = (𝑉, 𝐸) be a digraph with (c,a) (a,m) (m,m)
(c,m)
c m
V = {a,c,m,w} (c,w)
(m,w)
E= { (a,a),(m,m) (w,w), (c,a), w
(c,w),(c,m), (a,m), (m,w) }
(w,w)
BITS Pilani, Pilani Campus
Digraphs
Definition : A pair of sets 𝐺 = (𝑉, 𝐸) is called a directed graph ( or
digraph) if 𝐸 ⊆ 𝑉 × 𝑉. 𝑉 is a finite set whose elements are called
the vertices of 𝐺 and elements of 𝐸 are called the edges of 𝐺.
Thus if 𝐺 = (𝑉, 𝐸) is a digraph then 𝐸 is a relation on 𝑉. On the
other hand if R is a relation on A then 𝐺 = (𝐴, 𝑅) is a digraph.
An edge e = (𝑥, 𝑦) of G is said to be incident from 𝑥 and incident
to 𝑦. We also say 𝑒 is incident on both 𝑥 and 𝑦.
If (𝑥, 𝑦) ∈ 𝐸 then we say 𝑥 is adjacent to 𝑦.
An edge of 𝐺 from a vertex to itself is called a loop (or a self-loop)
of 𝐺.
A digraph G is called simple if it has no loops.

BITS Pilani, Pilani Campus


Relations from 𝐴 to 𝐵

A binary relation 𝑅 from 𝐴 to 𝐵 is a subset of 𝐴 × 𝐵 and it


corresponds to the digraph 𝐺 = 𝐴 ∪ 𝐵 , 𝑅 .

BITS Pilani, Pilani Campus


P 335 #1 (b)

Draw the digraph for the relation ⊂ on all the nonempty subsets of
{0, 1, 2}.
Solution : 𝑉 = {𝑣1 , … , 𝑣7 } where
𝑣1 = 0 , 𝑣2 = 1 , 𝑣3 = 2 , 𝑣4 = 0,1 , 𝑣5 = 0,2 ,
𝑣6 = 1,2 , 𝑣7 = 0, 1, 2 .
The digraph is drawn below.

BITS Pilani, Pilani Campus


in-degree and out-degree

Find in-degree and out-degree of vertices c and m.

in-deg(m) = 3, out-deg(m) = 2, in-deg(c) = 0, out-deg(c) = 3.

c m

BITS Pilani, Pilani Campus


in-degree and out-degree

For a digraph 𝐺 = (𝑉, 𝐸), in-degree of a vertex 𝑣 ∈ 𝑉 is the


number of vertices 𝑤 ∈ 𝑉 incident to 𝑣.
in-deg(𝑣) = 𝑤 ∈ 𝑉 ∶ 𝑤, 𝑣 ∈ 𝐸 .
The out-degree of a vertex 𝑣 ∈ 𝑉 is the number of edges incident
from 𝑣.
out-deg(𝑣) = 𝑤 ∈ 𝑉 ∶ 𝑣, 𝑤 ∈ 𝐸 .

If 𝑅 = 𝐸 is thought as a relation on 𝑉, then


in-deg(𝑣)) = |𝑅−1 𝑣 |, out-deg(𝑣) = |R 𝑣 |.

BITS Pilani, Pilani Campus


Directed multigraph, graph
If more than one edge is allowed to be incident from a vertex 𝑣 to
a vertex 𝑤, we get a directed multigraph.
Directed graph is a special case of a directed multigraph.
If more than one edge occurs from a vertex 𝑣 to a vertex 𝑤, we
say it is a multiple edge.
If we disregard the direction of edges in a digraph(directed
multigraph), we get a non-directed graph(a non-directed
multigraph).

Remark. A term graph can be applied to any of directed or


nondirected graph or multigraph. Results or concepts that hold
for all these cases will be stated for graphs.

BITS Pilani, Pilani Campus


Subgraphs

Definition : A graph 𝐺 1 = 𝑉 1 , 𝐸1 is called a subgraph of a


graph 𝐺 = 𝑉, 𝐸 if 𝑉 1 ⊆ 𝑉 and 𝐸1 ⊆ 𝐸 ∩ 𝑉 1 × 𝑉 1 .
Moreover 𝐺 1 is a proper subgraph of 𝐺 if 𝐺 1 ≠ 𝐺.
Ex. : The digraph on left is a subgraph of the one on right.
(a,a)
a (a,a)
(a,m) (m,m) a
(c,a) (a,m) (m,m)
m (c,m)
c m
(m,w) (c,w)
(m,w)
w
w
(w,w)
(w,w)
BITS Pilani, Pilani Campus

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy