DISCRETE MATHEMATICS AND
GRAPH THEORY
MODULE-II
Sets,
Relations,
Types of relations,
Partial Order Relations,
Equivalence Relations,
POSET,
Hasse Diagram.
Relations and functions:
Relations and functions define a mapping between two sets (Inputs and
Outputs) such that they have ordered pairs of the form (Input, Output).
Relations :
A relation R from a set A to a non-empty set B is a subset of the cartesian product A × B.
The subset is derived by describing a relationship between the first element and the
second element of the ordered pairs in A × B.
Functions:
A relation f from a set A to a set B is said to be a function if every element of set A has
one and only one image in set B. In other words, no two distinct elements of B have
the same pre-image.
Relation Function
A function is a relation in math
A relation in math is a set of
such that each element of the
ordered pairs defining the
domain is related to a single
relation between two sets.
element in the codomain.
A relation may or may not be a
All functions are relations.
function.
Example : Example :
{(1, x), (1, y), (4, z)} {(1, x), (6, y), (4, z)}
Types of Relations
Empty Relation:
A relation is an empty relation if it has no elements, that is, no element of set A is
mapped or linked to any element of A. It is denoted by R = ∅ .
Universal Relation:
A relation R in a set A is a universal relation if each element of A is related to every
element of A, i.e., R = A × A. It is called the full relation.
Identity Relation:
A relation R on A is said to be an identity relation if each element of A is related to
itself, that is, R = {(a, a) : for all a ∈ A}
Inverse Relation:
Define R to be a relation from set P to set Q i.e., R ∈ P × Q. The relation R-1 is said
to be an Inverse relation if R-1 from set Q to P is denoted by R-1 = {(q, p): (p, q) ∈ R}.
Reflexive Relation:
A binary relation R defined on a set A is said to be reflexive if, for every element a ∈ A,
we have aRa, that is, (a, a) ∈ R.
Symmetric Relation:
A binary relation R defined on a set A is said to be symmetric if and only if, for
elements a, b ∈ A, we have aRb, i.e., (a, b) ∈ R, then we must have bRa, i.e., (b, a) ∈
R.
Transitive Relation:
A relation R is transitive if and only if (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R for a, b, c
∈A
Equivalence Relation:
A relation R defined on a set A is said to be an equivalence relation if and only if
it is reflexive, symmetric and transitive.
Antisymmetric:
A relation R on a set A is said to be antisymmetric if there does not exist any pair of
distinct elements of A which are related to each other by R.
For all a, b ∈ A,
If (a,b) ∈ R and (b,a) ∈R, then a=b
Equivalently,
For all a, b ∈ A, If (a,b) ∈ R and a ≠ b, then (b,a) ∈ R must not hold.
Partial order relation:
A relation R on a set A is called a partial ordering or partial order if it is
• reflexive,
• antisymmetric, and
• transitive.
A set A together with a partial order R on that set is called a partially ordered set or poset
and is denoted (A,R). Members of A are called elements of the poset.
Digraph:
Every relation on a single set A can be modeled as a directed graph.
Hasse diagram:
Hasse diagram is a type of mathematical diagram used to represent a finite
partially ordered set
Helmut Hasse was a German mathematician working in algebraic number
theory, known for fundamental contributions to class field theory, the
application of p-adic numbers to local class field theory and diophantine
geometry, and to local zeta functions.
The diagrams are named after Helmut Hasse (1898–1979); according
to Garrett Birkhoff (1948), they are so called because of the effective use
Hasse made of them.
Representation of Hasse diagram:
ØThe vertices in the Hasse diagram are denoted by points rather than by circles.
ØSince a partial order is reflexive, hence each vertex of A must be related to itself, so the
edges from a vertex to itself are deleted in Hasse diagram.
ØSince a partial order is transitive, hence whenever aRb, bRc, we have aRc. Eliminate all
edges that are implied by the transitive property in Hasse diagram,
i.e., Delete edge from a to c but retain the other two edges.
ØIf a vertex 'a' is connected to vertex 'b' by an edge, i.e., aRb, then the vertex 'b' appears
above vertex 'a'. Therefore, the arrow may be omitted from the edges in the Hasse diagram.
The Hasse diagram is much simpler than the directed graph of the partial order.
Example: Consider the set A = {4, 5, 6, 7}. Let R be the relation ≤ on A. Draw the directed graph
and the Hasse diagram of R.
Solution: R = {{4, 5}, {4, 6}, {4, 7}, {5, 6}, {5, 7}, {6, 7}, {4, 4}, {5, 5}, {6, 6}, {7, 7}}
To draw the Hasse diagram of partial order, apply the
The directed graph of the relation R is following points:
Delete all edges implied by reflexive property
i.e. (4, 4), (5, 5), (6, 6), (7, 7)
Delete all edges implied by transitive property
i.e. (4, 7), (5, 7), (4, 6)
Replace the circles representing the vertices by dots.
Omit the arrows.
The Hasse diagram is
Example 2: Draw Hasse diagram for ({1,2,3,5,6,10,15,30},/)
Example 3: Draw Hasse diagram for ({x,y,z}, subset)
Consider the power set of a 4-element set ordered by inclusion .
Below are four different Hasse diagrams for this partial order.
Each subset has a node labelled with a binary encoding that shows
whether a certain element is in the subset (1) or not (0):