0% found this document useful (0 votes)
16 views32 pages

02 - Relations - Part 1 - Updated - 2025

The document discusses relations in discrete mathematics, including their definitions, properties, and examples. It covers types of relations such as binary, reflexive, symmetric, antisymmetric, and transitive, along with methods for representing relations using digraphs and matrices. The document concludes with examples illustrating how to determine the properties of various relations.
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)
16 views32 pages

02 - Relations - Part 1 - Updated - 2025

The document discusses relations in discrete mathematics, including their definitions, properties, and examples. It covers types of relations such as binary, reflexive, symmetric, antisymmetric, and transitive, along with methods for representing relations using digraphs and matrices. The document concludes with examples illustrating how to determine the properties of various relations.
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/ 32

Discrete

Mathematics
Relations – Part 1
Outline

Relations and
Representing Equivalence Partial
Relations Their
Relations Relations Orderings
Properties

Symmetric and
Reflexive Transitive
Antisymmetric
Relations Relations
Relations
Relations and
Their Properties
Whenever sets are being discussed, the relationship
between the elements of the sets is the next thing that
comes up.
Relations may exist between objects of the same set or
between objects of two or more sets.
Relations is used to describe relationships among objects

Relations
Example:
 M = {(x,y)| x is married to y}
It is a relation on the set of people
Example:
A = {Dingdong, Mateo, Dennis, Daniel }
B = {Sarah, Jenilyn, Marian, Kathryn }
M = { (Dingdong, Marian), (Mateo, Sarah), (Dennis, Jenilyn) }

Relations
Example:
 R = {(x,y) | language x is available on computer y}
It is a relation between the set of language and the set of
computers
 G = {(x,y) | x <y}
 H = {(x,y) | y = x3}
 I = {(x,y) | x+y = 7}

Relations
Binary Relations

Definition: A binary relation R from set A to set B is a subset


R ⊆ A × B.
A binary relation from A to B is a set R of ordered pairs where the
first element of each ordered pair comes from A and the second
element comes from B.

Example:
 Let A = {0,1,2} and B = {a,b}
R = {(0, a), (0, b), (1,a) , (2, b)} is a relation from A to B.
Binary Relations
 Notation:
aRb  (a, b)  R
aRb  (a, b)  R

R = {(0, a), (0, b), (1,a) , (2, b)}


(0, a )  R
(1, b)  R
Binary Relations

 Domain - set of all first entries (first


coordinates) which occur in the relation
 Range - set of all second coordinates

Example :
A = {1,2,3} B = {1,2,3,4}
G = {(a,b)| a < b}
G = {(1,2), (1,3),(1,4),(2,3),(2,4),(3,4)}
Dom(G) = {1,2,3}
Range(G) = {2,3,4}
Binary Relation on a Set

Definition: A binary relation R on a set A is a subset of A × A or


a relation from A to A.
Examples:
 Suppose that A = {a,b,c}. Then R = {(a,a),(a,b), (a,c)} is a
relation on A.

 Let A = {1, 2, 3, 4}.


The ordered pairs in the relation R = {(a,b) | a divides b} are
R = {(1,1), (1, 2), (1,3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}
Example : Consider the following relations on Z.
R1 = { (a, b) | a  b }
R2 = { (a, b) | a > b } Which of these relations
R3 = { (a, b) | a = b or a = −b } contain each of the pairs
(1,1), (1,2), (2,1), (1,−1),
R4 = { (a, b) | a = b } and (2,2)?
R5 = { (a, b) | a = b+1 }
R6 = { (a, b) | a + b  3 }
Solution :
(1,1) (1,2) (2,1) (1,−1) (2,2)
R1 ● ● ●

R2 ● ●

R3 ● ● ●

R4 ● ●

R5 ●

R6 ● ● ● ●
Relations
List the ordered pairs in the relation R from
A = {0, 1, 2, 3, 4} to B = {0, 1, 2, 3}, where (a, b) ∈ R if and only if
______ of these sets.
1. a = b
2. a + b = 4
3. a > b

Answers:
1. R1 = {(0,0),(1,1), (2,2), (3,3)}
2. R2 = {(1,3),(2,2), ( 3,1),(4,0)}
3. R3 = {(1,0),(2,0),(2,1),(3,0),(3,1),(3,2), (4,0),(4,1), (4,2),(4,3)}
Reflexive

Symmetric
Properties
of
Relations Antisymetric

Transitive
Reflexive Relations
Definition: R is reflexive iff (a,a) ∊ R for every element
a ∊ A. Written symbolically, R is reflexive if and only if
∀x[x∊A ⟶ (x,x) ∊ R]

Example:
R = {(1,1),(2,2), (3,3), (4,4) }
S= {(Java, Java), (Pascal, Pascal), (C#,C#)}
Reflexive Relations

Example
Consider the following relations on {1, 2, 3, 4} :
R2 = { (1,1), (1,2), (2,1) }
R3 = { (1,1), (1,2), (1,4), (2,1), (2,2), (3,3),
(4,1), (4,4) }
R4 = { (2,1), (3,1), (3,2), (4,1), (4,2), (4,3) }
which of them are reflexive ?

Answer:
R3
Symmetric Relations

Definition: R is symmetric iff (b,a) ∊ R whenever (a,b) ∊ R


for all (a,b) ∊ A. Written symbolically, R is symmetric if and
only if
∀x∀y [(x,y) ∊R ⟶ (y,x) ∊ R]

Example:
R = {(1,2), (2,1), (3,4), (4,3), (4,4)}
S = {printer, ribbon), (ribbon, printer), (pen, paper), (paper, pen)}
Antisymmetric Relations
Definition:A relation R on a set A such that for all
a,b ∊ A if (a,b) ∊ R and (b,a) ∊ R, then a = b is called
antisymmetric. Written symbolically, R is
antisymmetric if and only if

∀x∀y [(x,y) ∊R ∧ (y,x) ∊ R ⟶ x = y]

For all a,b if (a,b)  R and a ≠ b, then (b,a)  R

Example:
R = {(1,2),(5,6),(3,7),(4,9),(2,2)}
Example :
Which of the relations are symmetric or
antisymmetric ?
R2 = { (1,1), (1,2), (2,1) }
R3 = { (1,1), (1,2), (1,4), (2,1), (2,2), (3,3), (4,1), (4,4) }
R4 = { (1,1), (2,1), (3,1), (3,2), (4,1), (4,2), (4,3) }

Answer:
R2, R3 are symmetric
R4 is antisymmetric.
Transitive Relations

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


whenever (a,b) ∊ R and (b,c) ∊ R, then (a,c) ∊ R, for all
a,b,c ∊ A. Written symbolically, R is transitive if and
only if
∀x∀y ∀z[(x,y) ∊R ∧ (y,z) ∊ R ⟶ (x,z) ∊ R ]

 Example:
R = {(1,2), (2,3),(1,3), (3,4), (2,4), (1,4) }
Properties of Relations

 Given a relation on the set {1, 2, 3, 4}, decide whether it is


reflexive, whether it is symmetric, whether it is antisymmetric,
and whether it is transitive.
1. {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}

Answer:
Reflexive because (a, a) is in the relation for all a = 1, 2, 3, 4.
Symmetric because for every (a, b), there is (b, a)
Not antisymmetric because there is (1, 2) and (2, 1)
Transitive because while there are (1, 2) and (2, 1), there is also (1, 1)
or (2, 2) in the relation.
Properties of Relations

 For each of these relations on the set {1, 2, 3, 4}, decide


whether it is reflexive, whether it is symmetric, whether it
is antisymmetric, and whether it is transitive.
1. {(2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4)}
2. { (2, 4), (4, 2)}
3. {(1, 2), (2,2), (2, 3), (3, 4)}
4. {(1, 1), (2, 2), (2,4), (3,1), (3, 3), (4, 4)}
Combining Relations
 Given two relations R1 and R2, we can combine them
using basic set operations to form new relations such
as R1 ∪ R2, R1 ∩ R2, R1 − R2, and R2 − R1.

 Example: Let A = {1,2,3} and B = {1,2,3,4}. The


relations R1 = {(1,1),(2,2),(3,3)} and
R2 = {(1,1),(1,2),(1,3),(1,4)} can be combined using
basic set operations to form new relations:

R1 ∪ R2 ={(1,1),(1,2),(1,3),(1,4),(2,2),(3,3)}
R1 ∩ R2 ={(1,1)} R1 − R2 ={(2,2),(3,3)}
R2 − R1 ={(1,2),(1,3),(1,4)}
Composition of a Relation
Definition: Let R be a relation from set A to set B and S a
relation from B to set C. The composite of R and S is the
relation consisting of ordered pairs (a, c), where a ∈ A, c ∈ C,
and for which there exists an element b ∈ B such that
(a, b) ∈ R and (b, c) ∈ S . We denote the composite of R and S by
S ◦ R.

Note : Computing the composite of two relations requires that we


find elements that are the second element of ordered pairs in the
first relation and the first element of ordered pairs in the second
relation
Composition of a Relation

Example:
What is the composite of the relations R and S, where R is the
relation from {1, 2, 3} to {1, 2, 3, 4} with
R = {(1, 1), (1, 4), (2, 3), (3, 1), (3, 4)} and S is the relation from
{1, 2, 3, 4} to {0, 1, 2} with
S = {(1, 0), (2, 0), (3, 1), (3, 2), (4, 1)}?

Answer:
S ○ R = { (1,0), (1,1 ), (2,1), (2,2) , (3,0), (3,1)}
Representing
Relations
Outline

REPRESENTING RELATIONS REPRESENTING RELATIONS


USING DIGRAPHS USING MATRICES
Representing Relations Using
Digraphs
Definition: A directed graph, or digraph, consists 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 the edge (a,b), and the
vertex b is called the terminal vertex of this edge.
 An edge of the form (a,a) is called a loop.

Example 1: Draw the directed graph with vertices a, b, c, and


d, for relation R = {(a, b), (a, d), (b, b), (b, d), (c, a), (c, b),
(d, b)}
Examples of Digraphs
Representing Relations
Example 2: What are the ordered pairs in the relation
represented by this directed graph?

Answer : The ordered pairs in the relation are

R = {(1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (3, 1), (3, 3),
(4, 1), (4, 3) }
Representing Relations Using Matrices

 A relation between finite sets can be represented using a zero-


one matrix.
 Suppose R is a relation from A = {a1, a2, …, am} to
B = {b1, b2, …, bn}.
 The elements of the two sets can be listed in any particular
arbitrary order. When A = B, we use the same ordering.
 The relation R is represented by the m x n matrix
MR = [mij], where

 The matrix representing R has a 1 as its (i,j) entry when ai is


related to bj and a 0 if ai is not related to bj.
Examples of Representing Relations Using
Matrices
Example 1: Suppose that A = {1,2,3} and B = {1,2}. Let R be
the relation from A to B containing (a,b) if a ∈ A, b ∈ B,
and a > b. What is the matrix representing R (assuming the
ordering of elements is the same as the increasing
numerical order)?

Answer: Because R = {(2,1), (3,1),(3,2)}, the matrix is


Examples of Representing
Relations Using Matrices (cont.)
Example 2: Let A = {1, 2, 3,} and B = {1,2,3,4,5}. Which
ordered pairs are in the relation R represented by the
matrix

Answer:
R = { (1,2),(2,1),(2,3),(2,4), (3,1), (3,3), (3,5)}.
This is the end of Part 1, there is still
Part 2 for this chapter. ☺

You might also like