Unit-3 Relations, Partial Ordering and Recursion
Unit-3 Relations, Partial Ordering and Recursion
PART-I RELATIONS
INTRODUCTION
Much of mathematics is about finding a pattern – a recognizable link between quantities
that change. In our daily life, we come across many patterns that characterize relations
such as brother and sister, father and son, teacher and student.
In mathematics, also we come across many relations such as number m is less than number
n, line l is parallel to line m, set A is a subset of set B. In all these, we notice that a relation
involves pairs of objects in certain order.
In this chapter, we will learn how to link pairs of objects from two sets and then introduce
relations between the two objects in the pair.
RELATION
Let A and B be non-empty sets. A binary relation or simply relation from A to B is a subset
of A × B.
Suppose that R is a relation from A to B. Then, R is a set of ordered pairs where each first
element comes from A and each second element comes from B. That is, for each pair, x ∈
A and y ∈ B, exactly one of the following is true.
DOMAIN
Let R be a binary relation from A to B. Then, the domain is denoted and defined as,
DR = {x ∈ A ∶ (x, y) ∈ R}
RANGE
Let R be a binary relation from A to B. Then, the range is denoted and defined as,
R R = {y ∈ B ∶ (x, y) ∈ R}
Examples
A familiar example is relation “greater than” for real numbers. This relation is denoted
by “ > ”. In fact, ” > ” should be considered as the name of a set whose elements are
ordered pairs.
The definition of relation permits any set of ordered pairs to define a relation like
UNIVERSAL RELATION
Let A and B be two non-empty sets. Then, A × B , subset of itself, is called universal relation
from A to B.
VOID RELATION
Let A and B be two non-empty sets. Then, the empty set {ϕ} ⊂ A × B is called void (null)
relation from A to B.
Example: Let A = {1,2} and B = {x, y}. Then, the relation presented by the set {∅} is called
void (null) relation.
R∩S=∅
For complement, let A = {a, b} and B = {1,2}, then A × B = {{a, 1}, {b, 1}, {a, 2}, {b, 2}}. Also,
let R = {{a, 1}, {a, 2}, {b, 2}}.
(x, x) ∈ R
Irreflexive
(x, x) ∉ R
Symmetric
Antisymmetric
Transitive
Notes
If relations R and S both are reflexive, then R ∪ S and R ∩ S are also reflexive.
If relations R and S are symmetric and transitive, then R ∩ S is also symmetric and
transitive.
C 𝟑 What are the ranges of the relations S = {(x, x 2 ) ∶ x ∈ N} and T = {(x, 2x) ∶ x ∈ N}
,where N = {0,1,2,3, … }? Also, find S ∩ T and S ∪ T.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐑(𝐒) = {𝐱 𝟐 ∶ 𝐱 ∈ 𝐍}, 𝐑(𝐓) = {𝟐𝐱 ∶ 𝐱 ∈ 𝐍}, 𝐒 ∩ 𝐓 = {(𝟎, 𝟎), (𝟐, 𝟒)},
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐒 ∪ 𝐓 = {(𝟎, 𝟎), (𝟏, 𝟏), (𝟏, 𝟐), (𝟐, 𝟒), (𝟑, 𝟗), (𝟑, 𝟔), (𝟒, 𝟏𝟔), (𝟒, 𝟖), … … }
C 𝟒 Let L denotes the relation “less than or equal to” and D denotes the relation
“divides”, where x D y means “x divides y”, defined on a set {1,2,3,6}. Write L and
D as a sets, and find L ∩ D.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐃 = {(𝟏, 𝟏), (𝟏, 𝟐), (𝟏, 𝟑), (𝟏, 𝟔), (𝟐, 𝟐), (𝟐, 𝟔), (𝟑, 𝟑), (𝟑, 𝟔), (𝟔, 𝟔)}
𝐋 = {(𝟏, 𝟏), (𝟏, 𝟐), (𝟏, 𝟑), (𝟏, 𝟔), (𝟐, 𝟐), (𝟐, 𝟑), (𝟐, 𝟔), (𝟑, 𝟑), (𝟑, 𝟔), (𝟔, 𝟔)}
𝐋 ∩ 𝐃 = {(𝟏, 𝟏), (𝟏, 𝟐), (𝟏, 𝟑), (𝟏, 𝟔), (𝟐, 𝟐), (𝟐, 𝟔), (𝟑, 𝟑), (𝟑, 𝟔), (𝟔, 𝟔)}
C 𝟕 Let L denotes the relation “less than or equal to” and D denotes the relation
“divides”, where x D y means “x divides y”, defined on a set {1,2,3,6}. Show that
both L and D are reflexive, antisymmetric and transitive.
RELATION MATRIX
A relation R from a set A to a set B can be represented by a matrix called relation matrix of
R.
The relation matrix of R can be represented by constructing a table whose columns are
successive elements of B & rows are successive elements of A. i.e. if (xi , yj ) ∈ R, then we
enter 1 in ith row and jth column. Similarly, if (xi , yj ) ∉ R, then we enter 0 in ith row and jth
column.
Let A = {x1 , x2 , x3 } and B = {y1 , y2 }. Also, let R = {(x1 , y1 ), (x2 , y1 ), (x3 , y2 ), (x2 , y2 )}. Then,
the table representation looks like,
y1 y2
x1 1 0
x2 1 1
x3 0 1
1 0
Hence, the relation matrix is MR = [ 1 1 ].
0 1
GRAPH OF A RELATION
A relation can also be represented pictorially by drawing its graph.
Now, if (xi , xj ) ∈ R, then we connect nodes xi and xj by an arc and put an arrow on the arc
in the direction from xi to xj . Thus, when all the nodes corresponding to the ordered pairs
in R are connected by arcs with proper arrows, we get a graph of the relation R.
If (xi , xj ) ∈ R and (xj , xi ) ∈ R, then we draw two arcs between xi and xj , which is called a
loop.
𝐲 𝐲
𝐲
𝐱
𝐱 𝐱 𝐱 𝐳
C 𝟏 Let X = {1,2,3,4} and R = {(x, y) ∶ x > y}. Draw the graph of R and give its matrix.
𝟎 𝟎 𝟎 𝟎 𝟏 𝟒
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐌𝐑 = [ 𝟏 𝟎 𝟎 𝟎]
𝟏 𝟏 𝟎 𝟎
𝟏 𝟏 𝟏 𝟎 𝟐 𝟑
H 𝟑 Let X = {1, 2, 3, 4} and R = {(1,1), (1,4), (4,1), (4,4), (2,2), (2,3), (3,2), (3,3)}.
Write matrix of R and sketch its graph.
𝟏 𝟎 𝟎 𝟏
𝟎 𝟏 𝟏 𝟎 𝟏 𝟒
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐌𝐑 = [ ]
𝟎 𝟏 𝟏 𝟎
𝟏 𝟎 𝟎 𝟏 𝟑
𝟐
C 𝟒 Determine the properties of the relations given by the graphs as given below.
Also, write corresponding relation matrices.
(a) 𝐱𝟏 (b)
𝐱𝟑 𝐱𝟏 𝐱𝟐
𝐱𝟐
𝐱𝟑
𝐱𝟒 𝐱𝟓
(c) (d)
𝐱𝟏 𝐱𝟏 𝐱𝟐
𝐱𝟐
𝐱𝟒
𝐱𝟒 𝐱𝟑
𝐱𝟑
⋃ Ai = S
i=1
then, the set A is called a covering of S and the sets A1 , A2 , … , Am are said to be covers of S.
Also, if the elements of A, which are subsets of S, are mutually disjoint, then A is called a
partition of S and sets A1 , A2 , . . , Am are called the blocks of the partition.
EQUIVALENCE RELATION
A relation R on A is called an equivalence relation if it is reflexive, symmetric and transitive.
EQUIVALENCE CLASS
Let R be an equivalence relation on a set A. For any x ∈ A, the set [x]R ⊆ A given by
[x]R = {y ∶ y ∈ A and x R y}
If (x, y) ∉ R, then,[x]R ≠ [y]R . Because, if [x]R = [y]R , then there exist at least one z ∈ [x]R
and z ∈ [y]R , that gives x R z and y R z , i.e. x R y, which contradicts to (x, y) ∉ R.
COMPATIBILITY RELATION
A relation R in A is said to be compatibility relation if it is reflexive and symmetric.
Note: Every equivalence relation is a compatibility relation. But, reverse may not be true.
𝐗𝟐
𝐗𝟏
𝐗𝟐
𝐗𝟏
𝐗𝟓
𝐗𝟑 𝐗𝟑
𝐗𝟓
𝐗𝟒
𝐗𝟒
Since, relation is compatibility relation, it is not necessary to draw loops at each element
nor it is necessary to draw both x R y and y R x. So, we can simplify graph as shown in figure
(2).
The relation matrix here is symmetric and has its diagonal elements unity. Therefore, it is
sufficient to give only the elements of the lower triangular part only as shown as below.
x2 1
x3 0 1
x4 1 1 0
x5 0 1 1 1
x1 x2 x3 x4
It is clear that the subsets {x1 , x2 , x4 }, {x2 , x3 , x5 }, {x2 , x4 , x5 } are maximal compatibility
blocks.
Example: The maximal compatibility blocks of a compatibility relation R with simple graph
as given below are {1,3,4}, {2,3}, {4,5}, {2,5}. 2
1
3
5
4
2 0
3 1 1
4 1 0 1
5 0 1 0 1
1 2 3 4
COMPOSITE RELATION
Let R be a relation from A to B and S be a relation from B to C. Then, a relation written as
R ∘ S is called a composite relation of R and S, defined by
R ∘ S = {(x, z) ∶ for x ∈ A and z ∈ C there exist y ∈ B such that (x, y) ∈ R and (y, z) ∈ S}
CONVERSE OF A RELATION
̃ from B to A is called the converse of R, where
Given a relation R from A to B, a relation R
̃ are obtained by interchanging the members in each of the ordered
the ordered pairs of R
̃ x.
pairs of R. This means, for x ∈ A and y ∈ B, x R y ⟺ y R
H 𝟒 Let Z = A1 ∪ A2 ∪ A3 .
Where A1 = {… , 1, 4, 7, … }, A2 = {… , 2, 5, 8, … } and A3 = {… , 3, 6, 9, … }.
Then, define equivalence relation whose equivalence classes are A1 , A2 , A3 .
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐑 = {(𝐱, 𝐲) ∶ 𝐱 − 𝐲 𝐢𝐬 𝐝𝐞𝐯𝐢𝐬𝐢𝐛𝐥𝐞 𝐛𝐲 𝟑} 𝐨𝐯𝐞𝐫 𝐭𝐡𝐞 𝐬𝐞𝐭 𝐨𝐟 𝐢𝐧𝐭𝐞𝐠𝐞𝐫𝐬
C 𝟓 Let 𝕫 be the set of integers and R be the relation called “congruence modulo 3”
defined by R = {(x, y) ∶ x − y is divisible by 3}. Determine equivalence classes
generated by the elements of 𝕫.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝕫/𝐑 = {[𝟎]𝐑 , [𝟏]𝐑 , [𝟐]𝐑 }
H 𝟕 Let S be the set of all statement functions in n variables and let R be the relation
given by R = {(x, y) ; x ⇔ y}. Discuss the equivalence classes generated by the
elements of S.
𝐧
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐭𝐡𝐞𝐫𝐞 𝐚𝐫𝐞 𝟐𝟐 𝐑-𝐞𝐪𝐮𝐢𝐯𝐚𝐥𝐞𝐧𝐜𝐞 𝐜𝐥𝐚𝐬𝐬𝐞𝐬
H 𝟖 Let X = {a, b, c, d, e} and let C = {{a, b}, {c}, {d, e}}. Show that the partition C
defines an equivalence relation on X.
C 𝟗 Let R denote a relation on the set of ordered pairs of positive integers such that
(x, y) R (u, v) iff xv = yu. Show that R is an equivalence relation.
x2 1
x3 1 1
x4 0 0 1
x5 0 0 1 1
x6 1 0 1 0 1
x1 x2 x3 x4 x5
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ {𝐱 𝟏 , 𝐱 𝟐 , 𝐱 𝟑 }, {𝐱 𝟏 , 𝐱 𝟑 , 𝐱 𝟔 }, 𝐱𝟐
𝐱𝟏 𝐱𝟑
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ {𝐱 𝟑 , 𝐱 𝟒 , 𝐱 𝟓 }, {𝐱 𝟑 , 𝐱 𝟓 , 𝐱 𝟔 }
𝐱𝟒 𝐱𝟔
𝐱𝟓
H 𝟏𝟐 Let R = {(1,2), (3,4), (2,2)} and S = {(4,2), (2,5), (3,1), (1,3)}. Find R ∘ S, S ∘ R,
R ∘ (S ∘ R), (R ∘ S) ∘ R, R ∘ R, S ∘ S, and R ∘ R ∘ R.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐑 ∘ 𝐒 = {(𝟏, 𝟓), (𝟑, 𝟐), (𝟐, 𝟓)}, 𝐒 ∘ 𝐑 = {(𝟒, 𝟐), (𝟑, 𝟐), (𝟏, 𝟒)}
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐑 ∘ 𝐑 = {(𝟏, 𝟐), (𝟐, 𝟐)}, 𝐒 ∘ 𝐒 = {(𝟒, 𝟓), (𝟑, 𝟑), (𝟏, 𝟏)}
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐑 ∘ 𝐑 ∘ 𝐑 = {(𝟏, 𝟐), (𝟐, 𝟐)}, 𝐑 ∘ (𝐒 ∘ 𝐑) = (𝐑 ∘ 𝐒) ∘ 𝐑 = {(𝟑, 𝟐)}
C 𝟏𝟒 Let R = {(1,2), (3,4), (2,2)} and S = {(4,2), (2,5), (3,1), (1,3)} be relations on a
set A = {1, 2, 3, 4, 5}. Obtain relation matrices for R ∘ S and S ∘ R.
𝟎 𝟎 𝟎 𝟎 𝟏 𝟎 𝟎 𝟎 𝟏 𝟎
𝟎 𝟎 𝟎 𝟎 𝟏 𝟎 𝟎 𝟎 𝟎 𝟎
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐌𝐑∘𝐒 = 𝟎 𝟏 𝟎 𝟎 𝟎 , 𝐌𝐒∘𝐑 = 𝟎 𝟏 𝟎 𝟎 𝟎
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟏 𝟎 𝟎 𝟎
[𝟎 𝟎 𝟎 𝟎 𝟎 ] [ 𝟎 𝟎 𝟎 𝟎 𝟎]
H 𝟏𝟓 1 0 1
Given the relation matrix MR = [ 1 1 0 ] of a relation R on a set {a, b, c}, find
1 1 1
̃, R2 = R ∘ R, R3
the relation matrices of R ̃.
= R ∘ R ∘ R, and R ∘ R
𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐌𝐑̃ = [ 𝟎 𝟏 𝟏 ] , 𝐌𝐑𝟐 = 𝐌𝐑𝟑 = 𝐌𝐑∘𝐑̃ = [ 𝟏 𝟏 𝟏]
𝟏 𝟎 𝟏 𝟏 𝟏 𝟏
C 𝟏𝟔 Given the relation matrices MR and MS , find MR∘S , MR̃ , MS̃ , MR ̃∘ S , and show that
MR ̃∘ S = MS̃∘R̃ .
1 0 1 1 0 0 1 0
MR = [ 1 1 0 ] MS = [ 1 0 1 0 1]
1 1 1 0 1 0 1 0
𝟏 𝟏 𝟎
𝟏 𝟏 𝟎 𝟏 𝟎 𝟏 𝟏 𝟏 𝟎 𝟎 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐌𝐑∘𝐒 = [𝟏 𝟎 𝟏 𝟏 𝟏 ] , 𝐌𝐑̃ = [ 𝟎 𝟏 𝟏 ] , 𝐌𝐒̃ = 𝟎 𝟏 𝟎 ,
𝟏 𝟏 𝟏 𝟏 𝟏 𝟏 𝟎 𝟏 𝟏 𝟎 𝟏
[𝟎 𝟏 𝟎]
𝟏 𝟏 𝟏
𝟏 𝟎 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐌R ̃∘ S = 𝟎 𝟏 𝟏
𝟏 𝟏 𝟏
[𝟎 𝟏 𝟏]
PARTIAL ORDERING
A binary relation R in a set P is called a partial order relation or partial ordering in P iff R
is reflexive, antisymmetric, and transitive. Also, it is denoted by ≤ and the ordered pair
(P, ≤) is called a partially ordered set or a poset.
Examples
Let P be the set of real numbers. The relation ≤ (less than or equal to) is a partial
ordering on P.
The relation inclusion ⊆ on P = {ϕ, {a}, {b}, {c}, {a, b}, {b, c}, {a, c}, {a, b, c}} is a partial
ordering.
Example: Set In = {1,2,3 … , n} with natural ordering “less than or equal to”.
COVER
In a poset (P, ≤) an element y ∈ P is said to cover an element x ∈ P if x ≤ y and if there does
not exist an element z ∈ P such that x ≤ z and z ≤ y.
HASSE DIAGRAM
A poset (P, ≤) can be represented by means of a diagram known as a Hasse diagram or
partial ordered set diagram. In such a diagram, each element is represented by a small
circle or a dot.
The circle for x ∈ P drawn below the circle for y ∈ P if x ≤ y, and a line is drawn between x
and y.
If x ≤ y, but y does not cover x, then x and y are not connected directly by a single line.
However, they are connected through one or more elements of P.
1
LEAST AND GREATEST MEMBER
Let (P, ≤) be a poset. If there exist an element y ∈ P such that y ≤ x for all x ∈ P, then y is
called the least member in P relative to the partial ordering ≤ . Similarly, if there exists an
element y ∈ P such that x ≤ y for all x ∈ P, then y is called greatest member in P relative to
≤.
Note: For any poset least and greatest member, if exists, are unique. It may happen that the
least or the greatest member does not exist.
Example: Let P = {2, 3, 6, 12, 24, 36} and the relation ≤ be for divide.
24 36
2 12
32 and 3.
Here, there are two minimal members
2 3
UPPER BOUND AND LOWER BOUND
Let (P, ≤) be a poset and let A ⊆ P. Any element x ∈ P is an upper bound for A if for all a ∈
A, a ≤ x. Similarly, any element x ∈ P is a lower bound for A if for all a ∈ A, x ≤ a.
Least upper bound is denoted by “LUB” or “SUP”, and greatest lower bound is denoted by
“GLB” or “INF”.
Example: Let P = {2, 3, 6, 12, 24, 36} and the relation ≤ be for divide. Also, let A = {6, 12}.
Here, lower bounds are 2, 3 and 6. But, the greatest lower bound is 6.
Similarly, upper bounds are 12, 24 and 36. But, the least upper bound is 12.
WELL-ORDERED SET
A partially ordered set is called well-ordered if every non-empty subset of it has a least
member.
Example: A simplest well-ordered set is In = {1, 2, … , n} with natural ordering “less than or
equal to”.
C 𝟐 Show that the relation ⊆(inclusion) on a set P(A), i. e. power set of A = {a, b, c}, is
a partial ordering.
C 𝟒 Let A = {2, 3, 6, 12, 24, 36} and the relation ≤ be such that x ≤ y if x divides y.
Draw the Hasse diagram of (A, ≤).
𝐀𝐧𝐬𝐰𝐞𝐫 ∶
24 36
12
2 3
H 𝟓 Let ⊆ be a relation on a set P(A), i. e. power set of A. Then, draw Hasse diagram
for (1) A = {a}, (2) A = {a, b} and (3) A = {a, b, c}. 𝐀
𝐀𝐧𝐬𝐰𝐞𝐫 ∶
A
{𝐚, 𝐛} {𝐚, 𝐜} {𝐛, 𝐜}
A
{𝐚} {𝐛} {𝐚} {𝐜}
{𝐛}
∅ ∅ ∅
(𝟏) (𝟐) (𝟑)
C 𝟕 Draw the Hasse diagram of the following sets under the partial order relation
“divides” and indicate those which are totally ordered sets.
(a) {2, 6, 24}, (b) {3, 5, 15}, (c) {1, 2, 3, 6, 12} and (d) {3, 9, 27, 54}
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐬𝐞𝐭𝐬 (𝐚) 𝐚𝐧𝐝 (𝐝) 𝐚𝐫𝐞 𝐭𝐨𝐭𝐚𝐥𝐥𝐲 𝐨𝐫𝐝𝐞𝐫𝐞𝐝 𝐬𝐞𝐭𝐬.
12
24 54
15
6
27
6
2 3
9
3 5
2
1 3
H 𝟖 Give a relation which is both a partial order relation and an equivalence relation
on a set.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐑 = {(𝐱, 𝐲) ∶ 𝐱 = 𝐲}
C 𝟏𝟎 For above poset given in example 9. Find least and greatest member in P if exists.
Also, find minimal and maximal elements. Find upper and lower bounds. Find
LUB and GLB if exists.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐥𝐞𝐚𝐬𝐭 𝐦𝐞𝐦𝐛𝐞𝐫 𝐝𝐨𝐞𝐬 𝐧𝐨𝐭 𝐞𝐱𝐢𝐬𝐭, 𝐠𝐫𝐞𝐚𝐭𝐞𝐬𝐭 𝐦𝐞𝐦𝐛𝐞𝐫 𝐢𝐬 𝐱 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐦𝐢𝐧𝐢𝐦𝐚𝐥 𝐞𝐥𝐞𝐦𝐞𝐧𝐭𝐬 𝐚𝐫𝐞 𝐱𝟒 & 𝐱 𝟓 , 𝐦𝐚𝐱𝐢𝐦𝐚𝐥 𝐞𝐥𝐞𝐦𝐞𝐧𝐭 𝐢𝐬 𝐱 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐥𝐨𝐰𝐞𝐫 𝐛𝐨𝐮𝐧𝐝 𝐝𝐨𝐞𝐬 𝐧𝐨𝐭 𝐞𝐱𝐢𝐬𝐭, 𝐮𝐩𝐩𝐞𝐫 𝐛𝐨𝐮𝐧𝐝 & 𝐋𝐔𝐁 𝐢𝐬 𝐱 𝟏
C 𝟏𝟏 Let P = {2, 3, 6, 12, 24, 36} and the relation ≤ be such that x ≤ y if x divides y.
Then, find least and greatest member in P if exists. Also, find minimal and
maximal elements. Find upper bounds, lower bounds, LUB and GLB if exists for
sets (a) {2, 3, 6}, (b) {2, 3}, (c) {12, 6}, (d) {24, 36} and (e) {3, 12, 24}.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐥𝐞𝐚𝐬𝐭 𝐚𝐧𝐝 𝐠𝐫𝐞𝐚𝐭𝐞𝐬𝐭 𝐦𝐞𝐦𝐛𝐞𝐫 𝐝𝐨𝐞𝐬 𝐧𝐨𝐭 𝐞𝐱𝐢𝐬𝐭𝐬
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐦𝐢𝐧𝐢𝐦𝐚𝐥 𝐞𝐥𝐞𝐦𝐞𝐧𝐭𝐬 𝐚𝐫𝐞 𝟐 & 𝟑, 𝐦𝐚𝐱𝐢𝐦𝐚𝐥 𝐞𝐥𝐞𝐦𝐞𝐧𝐭𝐬 𝐚𝐫𝐞 𝟐𝟒 𝐚𝐧𝐝 𝟑𝟔
Upper Lower
LUB GLB
bounds bounds
(a) 6,12, Not Not
6
24,36 exist exist
(b) 6,12, Not Not
6
24,36 exist exist
(c) 12,24, 2,3,
12 6
36 6
(d) Not 2,3, Not
12
exist 6,12 exist
(e) 24 3 24 3
LATTICE
A lattice is a poset (L, ≤) in which every pair of elements a, b ∈ L has a greatest lower bound
and a least upper bound.
The greatest lower bound of a subset {a, b} ⊆ L is called meet and denoted by
GLB {a, b} or a ∗ b or a ∧ b or a ⋅ b. The least upper bound is called join and denoted by
LUB {a, b} or a⨁b or a ∨ b or a + b.
Example: Let S be any set and P(S) be its power set. The partially ordered set (P(S), ⊆) is a
lattice in which the meet and join are the same as the operations ∩ and ∪ respectively.
PROPERTIES OF LATTICES
Let (L, ≤) be a lattice and ∗ and ⨁ be two binary operations meet and join. Then, for
a, b, c ∈ L
a ∗ a = a and a ⊕ a = a (Idempotent)
COMPLETE LATTICE
A lattice is called complete if each of its non-empty subsets has a least upper bound and a
greatest lower bound.
Example: Let S be any set and P(S) be its power set. The partially ordered set (P(S), ⊆) is a
lattice in which the meet and join are the same as the operations ∩ and ∪ respectively.
DISTRIBUTIVE LATTICE
A lattice (L,∗, ⨁) is called a distributive lattice if for any a, b, c ∈ L,
a ∗ (b⨁c) = (a ∗ b)⨁(a ∗ c)
Example: Let S be any set and P(S) be its power set. The partially ordered set (P(S), ⊆) is a
lattice in which the meet and join are the same as the operations ∩ and ∪ respectively.
MODULAR LATTICE
A lattice (L,∗, ⨁) is said to be modular if a ≤ c ⇒ a⨁(b ∗ c) = (a⨁b) ∗ c.
Example: Let S be any set and P(S) be its power set. The partially ordered set (P(S), ⊆) is a
lattice in which the meet and join are the same as the operations ∩ and ∪ respectively.
BOUNDED LATTICE
A lattice is said to be bounded if it has both least and greatest elements, i.e. 0 and 1.
Example: Let S be any set and P(S) be its power set. The partially ordered set (P(S), ⊆) is a
lattice in which the meet and join are the same as the operations ∩ and ∪ respectively, and
least element is ϕ and greatest element is S.
COMPLEMENT
In a bounded Lattice (L,∗, ⨁, 0, 1) an element b ∈ L is called a complement of an element
a ∈ L if a ∗ b = 0 and a⨁b = 1.
COMPLEMENTED LATTICE
A lattice (L,∗, ⨁, 0, 1) is said to be a complemented lattice if every element of L has at least
one complement.
Example: Let S be any set and P(S) be its power set. The partially ordered set (P(S), ⊆) is a
lattice in which the meet and join are the same as the operations ∩ and ∪ respectively, and
least element is ϕ and greatest element is S.
BOOLEAN LATTICE
A Boolean lattice (Boolean algebra) is a complemented, distributive lattice.
Example: Let S be any set and P(S) be its power set. The partially ordered set (P(S), ⊆) is a
lattice in which the meet and join are the same as the operations ∩ and ∪ respectively, and
least element is ϕ and greatest element is S.
Example: Let S be any set and P(S) be its power set. The partially ordered set (P(S), ⊆) is a
lattice in which the meet and join are the same as the operations ∩ and ∪ respectively, and
least element is ϕ and greatest element is S.
C 𝟐 Let A = {a, b, c}. Then, show that the poset (p(A), ⊆) is a lattice.
C 𝟔 Check whether ([0,1], ≤) is a lattice. If yes, what are meet and join?
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐲𝐞𝐬, ([𝟎, 𝟏], ≤) 𝐢𝐬 𝐚 𝐥𝐚𝐭𝐭𝐢𝐜𝐞 𝐰𝐢𝐭𝐡 𝐦𝐞𝐞𝐭 {𝐚, 𝐛} = 𝐦𝐢𝐧 {𝐚, 𝐛}
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧𝐝 𝐣𝐨𝐢𝐧 {𝐚, 𝐛} = 𝐦𝐚𝐱 {𝐚, 𝐛}
PART-III RECURSION
RECURSION
Suppose that n is a natural number. We often defines n! as n! = n × (n − 1) × … × 2 × 1.
Sometimes, it is difficult to define a computation explicitly and it is easy to define it in terms
of itself, that is, recursively.
Recursion is an elegant and powerful problem solving technique, used extensively in both
discrete mathematics and computer science. We can use recursion to define sequence,
functions, sets, algorithms and many more.
RECURRENCE RELATION
A recurrence relation for the sequence {an } is an equation that expresses an in terms of one
or more preceding terms of the sequence like a0 , a1 , … , an−1.
Start with 1.
Given a term of sequence, get the next term by adding two to it.
1, 3, 5, 7, …
Generating function
Undetermined coefficients
an z n − 3an−1 z n = 2z n
∑ an z − 3 ∑ an−1 z = 2 ∑ z n
n n
…… (1)
n=1 n=1 n=1
Let A(z) = a0 + a1 z + a2 z 2 + a3 z 3 + ⋯
∞
∑ an z n = a1 z + a2 z 2 + a3 z 3 + ⋯ = A(z) − a0
n=1
∞ ∞
n=1 n=1
∞
z
∑ zn = z + z2 + z3 + ⋯ =
1−z
n=1
1+z
⟹ A(z) =
(1 − z)(1 − 3z)
2 1
⟹ A(z) = −
(1 − 3z) (1 − z)
∞ ∞
⟹ A(z) = 2 ∑(3) z − ∑ z n
n n
n=0 n=0
⟹ an = 2(3)n − 1 ; n ≥ 0
(h)
Part-I (how to find an )
⟹λ=3
(h)
⟹ an = C1 (3)n
(h)
an according to λ
(h)
λ an
λ1 = λ2 = λ3 (C1 + C2 n + C3 n2 )(λ1 )n
(P)
Part-II (how to find an )
Here, fn = 2.
⟹ an−1 = P0
P0 − 3P0 = 2
⟹ −2P0 = 2
⟹ P0 = −1
(P)
So, an = P0 = −1.
(h) (P)
Hence, required solution is an = an + an
an = C1 (3)n − 1
(P)
an according to fn
(P)
fn an
constant P0
a + bn + cn2 + dn3 + ⋯ P0 + P1 n + P2 n2 + P3 n3 + ⋯
abn
P0 bn
(b ≠ λ)
abn
P0 nm bn
(b = λ with multiplicity m)
So, an = C1 (3)n − 1
⟹ a0 = C1 (3)0 − 1
⟹ 1 = C1 − 1
⟹ C1 = 2
C 𝟖 Solve the recurrence relation an + 5an−1 + 6an−2 = 3n2 using the method of
undetermined coefficients.
𝟏𝟏𝟓 𝟏𝟕 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = 𝐂𝟏 (−𝟐)𝐧 + 𝐂𝟐 (−𝟑)𝐧 + + 𝐧 + 𝐧𝟐
𝟐𝟐𝟖 𝟐𝟒 𝟒
⋆ ⋆ ⋆ ⋆ ⋆ ⋆ ⋆ ⋆ ⋆