0% found this document useful (0 votes)
19 views44 pages

RELATIONS

The document provides definitions and examples of binary relations, including properties such as reflexive, symmetric, antisymmetric, and transitive relations. It explains how to combine relations using union, intersection, and difference, as well as how to compose relations. Additionally, it discusses the number of possible relations on a set with n elements.

Uploaded by

janssenmarana18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views44 pages

RELATIONS

The document provides definitions and examples of binary relations, including properties such as reflexive, symmetric, antisymmetric, and transitive relations. It explains how to combine relations using union, intersection, and difference, as well as how to compose relations. Additionally, it discusses the number of possible relations on a set with n elements.

Uploaded by

janssenmarana18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

RELATION AND

PARTIAL ORDERS
RELATION
Definition: Let A and b be two sets. A binary relation r from
A and B is a subset of 𝐴𝑥𝐵 or 𝑅 ⊆ 𝐴𝑥𝐵
𝐴𝑥𝐵 = 𝑎, 𝑏 | 𝑎 ∈ 𝐴 𝑎𝑛𝑑 𝑏 ∈ 𝐵
aRb to denote (a, b) ∈ R
a b to denote (a, b) ∉ R
Example
𝐴 = 1, 2, 3 𝑎𝑛𝑑 𝐵 = 0, 1, 2, 4

1, 0 , 1, 1 , 1, 2 , 1, 4 , 2, 0 , 2, 1 ,
𝐴𝑥𝐵 =
2, 2 , 2, 4 , 3, 0 , 3, 1 , 3, 2 , (3, 4)
Let say R is the relation where (a, b) ∈ R if and only if a = b then
𝑅 = 1, 1 , (2, 2) and R ⊆ 𝐴𝑥𝐵
Example
𝐴 = 0, 1, 2 𝑎𝑛𝑑 𝐵 = 𝑎, 𝑏

Then 0, 𝑎 , 0, 𝑏 , 1, 𝑎 , (2, 𝑏) is a relation from AxB

R a b
0 a 0 x x
1 b 1 x
2 2
Relation on a Set
Definition: A relation on a set A is relation from A to A.

𝐴 = 1, 2, 3, 4 Which ordered pairs are in the relation


𝑅 = 𝑎, 𝑏 | 𝑎 𝑑𝑖𝑣𝑖𝑑𝑒𝑠 𝑏 ?

1 1 R 1 2 3 4
1 x x x x
2 2 2 x x
3 3 3 x
4 4 4 x
Example
Consider these relations on the set integers:
𝑅1 = 𝑎, 𝑏 |𝑎 ≤ 𝑏 (1, 1), (1, 2), (2, 2)
𝑅2 = 𝑎, 𝑏 |𝑎 > 𝑏 (1, -1), (2, 1)
𝑅3 = 𝑎, 𝑏 |𝑎 = 𝑏 𝑜𝑟 𝑎 = −𝑏 (1, 1), (1, -1), (2,2)
𝑅4 = 𝑎, 𝑏 |𝑎 = 𝑏 (1, 1), (2,2)
𝑅5 = 𝑎, 𝑏 |𝑎 = 𝑏 + 1 (2, 1)
Which of there relations contain each pairs (1,1), (1, 2), (2, 1), (1, -1)
and (2, 2)
How many relations are there on a set with n
elements?

𝑛 2
|𝑃 𝐴𝑥𝐴 | = 2
A relation on a set A is a subset of AxA. Set A contains n
elements and AxA contains 𝑛2 elements
PROPERTIES OF RELATION

Definition: A relation is called Reflexive if (𝑎, 𝑎) ∈ 𝑅


for every element a ∈ 𝑅. In other words,
∀𝑎 ( 𝑎, 𝑎 ∈ 𝑅)
Example: 𝐴 = 1, 2, 3, 4
Consider the following relations:
𝑅1 = 1, 1 , 1, 2 , 2, 1 , 2, 2 , 3, 4 , 4, 1 , (4, 4)
𝑅2 = 1, 1 , 1, 2 , (2, 1)
𝑅3 = 1, 1 , 1, 2 , 1, 4 , 2, 1 , 2, 2 , 3, 3 , 4, 1 , (4, 4)
𝑅4 = 2, 1 , 3, 1 , 3, 2 , 4, 1 , 4, 2 , (4, 3)
𝑅5 = 1, 1 , 1, 2 , 1, 3 , 1, 4 , 2, 2 , 2, 3 , 2, 4 , 3, 3 , 3, 4 , (4, 4)
Which of these relation are reflexive?
Example
Consider these relations on the set integers:
(1,1), (1, 2), (2, 1), (1, -1) and (2, 2)
𝑅1 = 𝑎, 𝑏 |𝑎 ≤ 𝑏 (1, 1), (1, 2), (2, 2)
𝑅2 = 𝑎, 𝑏 |𝑎 > 𝑏 (1, -1), (2, 1)
𝑅3 = 𝑎, 𝑏 |𝑎 = 𝑏 𝑜𝑟 𝑎 = −𝑏 (1, 1), (1, -1), (2,2)
𝑅4 = 𝑎, 𝑏 |𝑎 = 𝑏 (1, 1), (2,2)
𝑅5 = 𝑎, 𝑏 |𝑎 = 𝑏 + 1 (2, 1)
Which of there relations are reflexive?
PROPERTIES OF RELATION
Definition: A relation R on a set A is called Symmetric if
(𝑏, 𝑎) ∈ 𝑅 whenever (𝑎, 𝑏) ∈ 𝑅, for all a, b ∈ 𝐴. In other
words, ∀𝒂∀𝒃 𝒂, 𝒃 ∈ 𝑹 → 𝒃, 𝒂 ∈ 𝑹.
A relation R on set A such that for all a, b ∈ 𝑅 and 𝑏, 𝑎 ∈ 𝑅
then 𝑎 = 𝑏 is called antisymmetric. In other words,
∀𝒂∀𝒃 𝒂, 𝒃 ∈ 𝑹 ∧ 𝒃, 𝒂 ∈ 𝑹
Example: 𝐴 = 1, 2, 3, 4
Consider the following relations:
𝑅1 = 1, 1 , 1, 2 , 2, 1 , 2, 2 , 3, 4 , 4, 1 , (4, 4)
𝑅2 = 1, 1 , 1, 2 , (2, 1)
𝑅3 = 1, 1 , 1, 2 , 1, 4 , 2, 1 , 2, 2 , 3, 3 , 4, 1 , (4, 4)
𝑅4 = 2, 1 , 3, 1 , 3, 2 , 4, 1 , 4, 2 , (4, 3)
𝑅5 = 1, 1 , 1, 2 , 1, 3 , 1, 4 , 2, 2 , 2, 3 , 2, 4 , 3, 3 , 3, 4 , (4, 4)
Which of these relation are symmetric?
Example: 𝐴 = 1, 2, 3, 4
Consider the following relations:
𝑅1 = 1, 1 , 1, 2 , 2, 1 , 2, 2 , 3, 4 , 4, 1 , (4, 4)
𝑅2 = 1, 1 , 1, 2 , (2, 1)
𝑅3 = 1, 1 , 1, 2 , 1, 4 , 2, 1 , 2, 2 , 3, 3 , 4, 1 , (4, 4)
𝑅4 = 2, 1 , 3, 1 , 3, 2 , 4, 1 , 4, 2 , (4, 3)
𝑅5 = 1, 1 , 1, 2 , 1, 3 , 1, 4 , 2, 2 , 2, 3 , 2, 4 , 3, 3 , 3, 4 , (4, 4)
Which of these relation are antisymmetric?
PROPERTIES OF RELATION

Definition: A relation R on a set A is called Transitive if


whenever 𝑎, 𝑏 ∈ 𝑅 and (𝑏, 𝑐) ∈ 𝑅, then (𝑎, 𝑐) ∈ 𝑅, for
all a, 𝑏, 𝑐 ∈ 𝐴. In other words, ∀𝒂∀𝒃∀𝒄(( 𝒂, 𝒃 ∈ 𝑹 ∧
(𝒃, 𝒄) ∈ 𝑹) → 𝒂, 𝒄 ∈ 𝑹).
Example: 𝐴 = 1, 2, 3, 4
Consider the following relations:
𝑅1 = 1, 1 , 1, 2 , 2, 1 , 2, 2 , 3, 4 , 4, 1 , (4, 4)
𝑅2 = 1, 1 , 1, 2 , (2, 1)
𝑅3 = 1, 1 , 1, 2 , 1, 4 , 2, 1 , 2, 2 , 3, 3 , 4, 1 , (4, 4)
𝑅4 = 2, 1 , 3, 1 , 3, 2 , 4, 1 , 4, 2 , (4, 3)
𝑅5 = 1, 1 , 1, 2 , 1, 3 , 1, 4 , 2, 2 , 2, 3 , 2, 4 , 3, 3 , 3, 4 , (4, 4)
Which of these relation are transitive?
COMBINING RELATION
Let 𝑨 = 𝟏, 𝟐, 𝟑 and 𝑩 = 𝟏, 𝟐, 𝟑, 𝟒
𝑹𝟏 = 𝟏, 𝟏 , 𝟐, 𝟐 , (𝟑, 𝟑)
𝑹𝟐 = 𝟏, 𝟏 , 𝟏, 𝟐 , 𝟏, 𝟑 , (𝟏, 𝟒)
𝑹𝟏 ∪ 𝑹𝟐 = 1, 1 , 1, 2 , 1, 3 , 1, 4 , 2, 2 , (3, 3)
𝑹𝟏 ∩ 𝑹𝟐 = 1, 1
𝑹𝟏 − 𝑹𝟐 = 2, 2), (3, 3
𝑹𝟐 − 𝑹𝟏 = 1, 2 , 1, 3 , (1, 4)
𝑹𝟏 ⨁𝑹𝟐 = (𝑹𝟏 ∪ 𝑹𝟐 ) − (𝑹𝟏 ∩ 𝑹𝟐 )
1, 2 , 1, 3 , 1, 4 , 2, 2 , (3, 3)
COMPOSITION OF RELATION
Definition: Let R be a relation from set A to a Set B and S a
relation form B to a set C. The composite of R and S is the
relation consisting of ordered pairs 𝑎, 𝑐 , where 𝑎 ∈
𝐴, 𝑐 ∈ 𝐶, and for which there exist an element b ∈ 𝐵, such
that 𝑎, 𝑏 ∈ 𝑅 𝑎𝑛𝑑 (𝑏, 𝑐) ∈ 𝑆. We denote the composite
of R and S by 𝑆°𝑅
Example: What is the composite of the relations R and S, where R
is the relation from set 𝑨 = 𝟏, 𝟐, 𝟑 to set 𝑩 = 𝟑, 𝟒, 𝟓 with
𝑹 = 𝟏, 𝟑 , 𝟏, 𝟒 , 𝟏, 𝟓 , 𝟐, 𝟑 , (𝟑, 𝟑) and S is the relation
from set 𝑩 = {𝟑, 𝟒, 𝟓} to set 𝑪 = 𝟏, 𝟐, 𝟑, 𝟒 with
𝑺 = 𝟑, 𝟏 , 𝟑, 𝟐 , 𝟑, 𝟑 , 𝟒, 𝟑 , (𝟒, 𝟒)

1 3 1 𝟏, 𝟏 , 𝟏, 𝟐 , 𝟏, 𝟑 ,
2 4 2 𝟏, 𝟒 , 𝟐, 𝟏 , 𝟐, 𝟐
𝑺∘𝐑=
𝟐, 𝟑 , 𝟑, 𝟏 , 𝟑, 𝟐 ,
3 5 3
(𝟑, 𝟑)
4
𝑺∘𝐑
Example: What is the composite of the relations R and S, where R is the
relation from 𝟏, 𝟐, 𝟑 to 𝟏, 𝟐, 𝟑, 𝟒 with
𝑹 = 𝟏, 𝟏 , 𝟏, 𝟒 , 𝟐, 𝟑 , 𝟑, 𝟏 , (𝟑, 𝟒) and S is the relation from
{𝟏, 𝟐, 𝟑, 𝟒} to 𝟎, 𝟏, 𝟐 with 𝑺 = 𝟏, 𝟎 , 𝟐, 𝟎 , 𝟑, 𝟏 , 𝟑, 𝟐 , (𝟒, 𝟏)

1 1 0
2 2 1 𝑺∘𝐑=
𝟏, 𝟎 , 𝟏, 𝟏 , 𝟐, 𝟏 ,
3 𝟐, 𝟐 , 𝟑, 𝟎 , 𝟑, 𝟏
3 2
4
𝑺∘𝐑
COMPOSING THE PARENT RELATION WITH
ITSELF

Definition: Let R be a relation on the set A. The


power 𝑅 𝑛 , 𝑛 = 1, 2, 3, … , are defined recursively by
𝑹𝟏 = 𝑹 and 𝑹𝒏+𝟏 = 𝑹𝒏 ∘ 𝑹
Example: Let 𝑅 = 1, 1 , 2, 1 , 3, 2 , (4, 3) . Find the powers
𝑅𝑛 , n = 2, 3, 4
1 1
𝟐 1
𝑹 =𝑅∘𝑅 2 2
2
3 3
3
4 4

𝑹𝟐 = 1,1 , 2, 1 , 3, 1 , (4, 2)
Example: Let 𝑅 = 1, 1 , 2, 1 , 3, 2 , (4, 3) . Find the powers
𝑅𝑛 , n = 2, 3, 4
𝟑 2
𝑹 =𝑅 ∘𝑅
𝑹= 1, 1 , 2, 1 , 3, 2 , (4, 3)
𝑹𝟐 = 1,1 , 2, 1 , 3, 1 , (4, 2)
𝑹𝟑 = 1,1 , 2, 1 , 3, 1 , (4, 1)
Example: Let 𝑅 = 1, 1 , 2, 1 , 3, 2 , (4, 3) . Find the powers
𝑅𝑛 , n = 2, 3, 4
𝟒 3
𝑹 =𝑅 ∘𝑅
𝑹𝟑 already contains all
𝑹= 1, 1 , 2, 1 , 3, 2 , (4, 3) possible ordered pairs in AxA,
𝑹𝟑 = 1,1 , 2, 1 , 3, 1 , (4, 1) 𝑹𝟒 will also contain all
possible ordered pairs
𝟒
𝑹 = 1,1 , 2, 1 , 3, 1 , (4, 1) therefore 𝑹𝟒 = 𝑹𝟑
REPRESENTATION OF RELATION

Listing method
Set builder
Table
Matrix
Directed graph
REPRESENTATION OF RELATION
Definition: A directed graph or diagraph, consist of a set
V of vertices (or nodes) together with a set E of ordered
pairs of elements of V called edges (or arcs). The vertex a is
called the initial vertex of edge (a, b), and the vertex b is
called the terminal vertex of this edge
An edge of the form (a,a) is represented using arc from
vertex a back to itself which is called loop
Example: The directed graph with vertices a, b, c, and d and
edges (a, b), (a, d), (b, b), (b, d), (c, a), (c, b), and (d, b)
Example: List the ordered pairs in the relations represented
by the directed graphs

1, 1 , 1, 3 , 2, 1 , (2, 3)
𝑹=
2, 4 , 3, 1 , 3, 2 , (4, 1)
REPRESENTATION OF RELATION
Representing relations using Matrices
A relation between finite sets can be represented using a
zero-one matrix. Suppose R is a relation from 𝐴 =
𝑎1 , 𝑎2 , … , 𝑎𝑚 to B = 𝑏1 , 𝑏2 , … , 𝑏𝑛 . The relation can
be represented by matrix 𝑀𝑅 = 𝑚𝑖𝑗
1 𝑖𝑓 (𝑎𝑖 , 𝑏𝑗 ∈ 𝑅
𝑚𝑖𝑗 = ൝
0 𝑖𝑓 (𝑎𝑖 , 𝑏𝑗 ∉ 𝑅
Example: Suppose 𝐴 = 1, 2, 3 and 𝐵 = 1, 2
Let R be the relation from A to B containing (a, b) if 𝑎 ∈ 𝐴,
𝑏 ∈ 𝐵 and a < b. What is the matrix representation

1 2
1 0 1
2 𝑀𝑅 0 0
3 0 0
CLOSURE OF RELATIONS
Definition: Reflexive Closure of a binary relation R on a
set A is the smallest reflexive relation of the set A that
contains R.
Let say we have a binary relation R.
R = 1,1 , 2, 2 , (2, 3) defined on set 𝐴 = 1, 2, 3
+
𝑅𝑟 = 1,1 , 2, 2 , 𝟑, 𝟑 , (2, 3)
Example: Let R be the relation on the set 0, 1, 2, 3
containing ordered pairs (0, 1), (1, 1), (1, 2), (2, 0), (2,
2), and (3, 0). Find the reflexive closure of R

0, 1 , 1, 1 , 1, 2 , 2, 0 ,
𝑹+
𝒓 =
2, 2 , 3, 0 , 𝟑, 𝟑 , (𝟎, 𝟎)
Example: Consider 𝑅 = 1, 2 , 2, 4 , 3, 3 , (4, 2) on
the set 𝐴 = 1, 2, 3, 4 . Find the reflexive closure of R

𝑹+
𝒓 = 1, 2 , 2, 4 , 3, 3 , 4, 2 𝟏, 𝟏 , 𝟐, 𝟐 , (𝟒, 𝟒)
CLOSURE OF RELATIONS

Definition: Symmetric closure of a binary relation R


on a set A is the smallest symmetric relation on a set A
that contains R. 𝑅𝑠+ = 𝑅 ∪ 𝑏, 𝑎 |(𝑎, 𝑏) ∈ 𝑅
Example: Let R be the relation on the set 0, 1, 2, 3
containing ordered pairs (0, 1), (1, 1), (1, 2), (2, 0), (2,
2), and (3, 0). Find the symmetric closure of R
𝑅 = (0, 1), (1, 1), (1, 2), (2, 0), (2, 2), (3, 0)
𝐴 = 0, 1, 2, 3

0, 1 , 1, 1 , 1, 2 , 2, 0 , 2, 2 ,
𝑹+
𝒔 =
3, 0 , 𝟏, 𝟎 , 𝟐, 𝟏 , 𝟎, 𝟐 , (𝟎, 𝟑)
Example: Consider 𝑅 = 1, 2 , 2, 4 , 3, 3 , (4, 2) on
the set 𝐴 = 1, 2, 3, 4 . Find the symmetric closure of R

𝑹+
𝒔 = 1, 2 , 2, 4 , 3, 3 , 4, 2 , 𝟐, 𝟏
CLOSURE OF RELATIONS

Definition: Transitive closure of a binary relation R


on a set A is the smallest transitive relation on a set A
that contains R.
+
𝑹𝒕 = 𝑹 ∪ 𝒂, 𝒄 |(𝒂, 𝒃) ∈ 𝑹 ∧ |(𝒃, 𝒄) ∈ 𝑹
Example: Let R be the relation on the set 1, 2, 3
containing ordered pairs(1, 1), (2, 3) and (3, 1). Find
the transitive closure of R
𝑅 = 1, 1 , 2, 3 , (3, 1)
𝐴 = 1, 2, 3
+
𝑹𝒕 = 1, 1 , 2, 3 , 3, 1 , (𝟐, 𝟏)
Example: Consider 𝑅 = 1, 2 , 2, 4 , 3, 3 , (4, 2) on
the set 𝐴 = 1, 2, 3, 4 . Find the transitive closure of R

𝑹𝒕+ = 1, 2 , 2, 4 , 3, 3 , 4, 2 , 𝟏, 𝟒 , (𝟐, 𝟐)
CLOSURE OF RELATIONS- Problem
Find the smallest relation containing the relation
1, 2 , 1, 4 , 3, 3 , (4, 1) defined on a set 𝐴 =
1, 2, 3, 4 that is reflexive and transitive.
𝑹+
𝒓 = 1, 2 , 1, 4 , 3, 3 , 4, 1 , 𝟏, 𝟏 , 𝟐, 𝟐 , (𝟒, 𝟒)

𝑹+
𝒕 = 𝟏, 𝟏 , 1, 2 , 1, 4 , 3, 3 , 4, 1
CLOSURE OF RELATIONS- Problem
Find the transitive closure of relation
𝑅 = 𝑎, 𝑐 , 𝑏, 𝑑 , 𝑐, 𝑎 , 𝑑, 𝑏 , (𝑒, 𝑑) defined on a
set 𝐴 = 𝑎, 𝑏, 𝑐, 𝑑, 𝑒
𝑎, 𝑎 , 𝑎, 𝑐 , 𝑏, 𝑏 , 𝑏, 𝑑 , 𝑐, 𝑎 ,
𝑹+
𝒕 =
𝑐, 𝑐 , 𝑑, 𝑏 , 𝑑, 𝑑 , 𝑒, 𝑏 , (𝑒, 𝑑)
EQUIVALENCE RELATION

Definition: A relation R on a set A is an equivalence


relation iff R is reflective, symmetric and transitive.
Example:
𝑅1 = 0, 0 , 1, 1 , (1, 2) 2, 2 , (3, 3)
Not an
𝐴 = 0, 1, 2, 3 equivalence
Is 𝑅1 an equivalence relation? relation

𝑅2 = 0, 0 , 0, 2 , 2, 0 , 2, 2 , 2, 3 , 3, 2 , (3, 3)
Is 𝑅2 an equivalence relation? Not an
equivalence
relation
𝐴 = 0, 1, 2, 3
Equivalence
Example: relation

𝑅3 = 0, 0 , 1, 1 , 1, 2 , 2, 1 , 2, 2 , (3, 3)
Is 𝑅3 an equivalence relation?
0, 0 , 0, 1 , 0, 2 , 1, 0 , 1, 1 , Not an
𝑅4 = equivalence
1, 2 , 2, 0 , 2, 2 , (3, 3) relation
Is 𝑅4 an equivalence relation?
𝐴 = 0, 1, 2, 3
Example: Not an
equivalence
𝑅5 = ∅ relation
Is 𝑅5 an equivalence relation?

𝑅6 = 𝐴𝑥𝐴
Equivalence
Is 𝑅6 an equivalence relation? relation

You might also like