0% found this document useful (0 votes)
222 views28 pages

Unit-3 Relations, Partial Ordering and Recursion

The document discusses relations and related concepts in mathematics. It defines a binary relation as a subset of the Cartesian product of two sets, with examples. It explains key terms like domain, range, universal relation, void relation, and properties of relations such as reflexive, symmetric, transitive. It also discusses representing relations using matrices and graphs. Relations and their properties are fundamental concepts in mathematics that help formalize connections between quantities.

Uploaded by

Priyank Patel
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)
222 views28 pages

Unit-3 Relations, Partial Ordering and Recursion

The document discusses relations and related concepts in mathematics. It defines a binary relation as a subset of the Cartesian product of two sets, with examples. It explains key terms like domain, range, universal relation, void relation, and properties of relations such as reflexive, symmetric, transitive. It also discusses representing relations using matrices and graphs. Relations and their properties are fundamental concepts in mathematics that help formalize connections between quantities.

Uploaded by

Priyank Patel
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/ 28

UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [1]

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.

 (x, y) ∈ R, then we say x is R-related to y, written as x R y.

 (x, y) ∉ R, then we say x is not R-related to y.

 Note: If R is a relation from a set A to itself, that is, if R is a subset of A2 = A × A, then we


say that R is a relation on A.

 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}

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [2]

 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.

>= {(x, y) ∶ x and y are real numbers and x > y}

 The definition of relation permits any set of ordered pairs to define a relation like

S = {(2,4), (1,3), (x, 6), (veer,∗)}

Here, DR = {2,1, x, veer} & R R = {4, 3, 6,∗}

 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.

 Example: Let A = {1,2} and B = {x, y}.

A × B = {{1, x}, {1, y}, {2, x}, {2, y}}

 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.

 UNION, INTERSECTION AND COMPLEMENT OPERATIONS ON RELATIONS


 Let A = {1,2,3,4} and

R = {(x, y) ∶ for x, y ∈ A, x − y is an integral multiple of 2} = {(1,3), (3,1), (2,4), (4,2)}

S = {(x, y) ∶ for x, y ∈ A, x − y is an integral multiple of 3} = {(1,4), (4,1)}

 R ∪ S = {(1,3), (3,1), (2,4), (4,2), (1,4), (4,1)}

 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}}.

 Then, complement relation for R is {{b, 1}}.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [3]

 PROPERTIES OF BINARY RELATIONS IN A SET


 Reflexive

 A binary relation R in a set A is said to be reflexive if, for every x ∈ A,

(x, x) ∈ R

 Irreflexive

 A binary relation R in a set A is said to be irreflexive if, for every x ∈ A,

(x, x) ∉ R

 Symmetric

 A binary relation R in a set A is said to be symmetric if, for every x, y ∈ A,

whenever (x, y) ∈ R, then (y, x) ∈ R

 Antisymmetric

 A binary relation R in a set A is said to be antisymmetric if, for every x, y ∈ A,

whenever (x, y) ∈ R & (y, x) ∈ R, then x = y

 Transitive

 A binary relation R in a set A is said to be transitive if, for every x, y, z ∈ A,

whenever (x, y) ∈ R & (y, z) ∈ R, then (x, z) ∈ R

 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.

METHOD-1: BASIC EXAMPLES ON RELATION

H 𝟏 Define the following terms with example.


Binary relation, Domain, Range, Universal relation, Void relation, Union,
Antisymmetric, Intersection, Complement relation, Reflexive, Irreflexive,
Symmetric, Transitive.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [4]

H 𝟐 Let A = {(1,2), (2,4), (3,3)} and B = {(1,3), (2,4), (4,2)}.


Find A ∪ B, A ∩ B, D(A), D(B), D(A ∪ B), R(A), R(B) and R(A ∩ B).
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐀 ∪ 𝐁 = {(𝟏, 𝟐), (𝟐, 𝟒), (𝟑, 𝟑), (𝟏, 𝟑), (𝟒, 𝟐)}, 𝐀 ∩ 𝐁 = {(𝟐, 𝟒)},
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐃(𝐀) = {𝟏, 𝟐, 𝟑}, 𝐃(𝐁) = {𝟏, 𝟐, 𝟒}, 𝐃(𝐀 ∪ 𝐁) = {𝟏, 𝟐, 𝟑, 𝟒},
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐑(𝐀) = {𝟐, 𝟒, 𝟑}, 𝐑(𝐁) = {𝟑, 𝟒, 𝟐}, 𝐑(𝐀 ∩ 𝐁) = {𝟒}

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.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐃 = {(𝟏, 𝟏), (𝟏, 𝟐), (𝟏, 𝟑), (𝟏, 𝟔), (𝟐, 𝟐), (𝟐, 𝟔), (𝟑, 𝟑), (𝟑, 𝟔), (𝟔, 𝟔)}
𝐋 = {(𝟏, 𝟏), (𝟏, 𝟐), (𝟏, 𝟑), (𝟏, 𝟔), (𝟐, 𝟐), (𝟐, 𝟑), (𝟐, 𝟔), (𝟑, 𝟑), (𝟑, 𝟔), (𝟔, 𝟔)}
𝐋 ∩ 𝐃 = {(𝟏, 𝟏), (𝟏, 𝟐), (𝟏, 𝟑), (𝟏, 𝟔), (𝟐, 𝟐), (𝟐, 𝟔), (𝟑, 𝟑), (𝟑, 𝟔), (𝟔, 𝟔)}

H 𝟓 Give an example of a relation which is


a) neither reflexive nor irreflexive?
b) both symmetric and antisymmetric?
c) reflexive but not symmetric?
d) symmetric but not reflexive or transitive?
e) transitive but not reflexive or symmetric?
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐀 = {(𝟏, 𝟏), (𝟐, 𝟑), (𝟑, 𝟐), (𝟑, 𝟑)}, 𝐁 = {(𝐱, 𝐲) ∶ 𝐱, 𝐲 ∈ ℕ, 𝐱 = 𝐲},
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐂 = {(𝟏, 𝟏), (𝟏, 𝟐), (𝟐, 𝟐)}, 𝐃 = {(𝟏, 𝟐), (𝟐, 𝟏)},
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐄 = {(𝟏, 𝟐), (𝟐, 𝟑), (𝟏, 𝟑)}

H 𝟔 Check whether the following relations are transitive or not.


R1 = {(1,1)}, R 2 = {(1,2), (2,2)}, R 3 = {(1,2), (2,3), (1,3), (2,1)}
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐲𝐞𝐬, 𝐲𝐞𝐬, 𝐧𝐨

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.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [5]

C 𝟖 Given S = {1,2,3,4, … ,10} and a relation R on S, where R = {(x, y) ∶ x + y = 10},


what are the properties of the relation R?
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐬𝐲𝐦𝐦𝐞𝐭𝐫𝐢𝐜 𝐛𝐮𝐭 𝐧𝐨𝐭 𝐫𝐞𝐟𝐥𝐞𝐱𝐢𝐯𝐞, 𝐢𝐫𝐫𝐞𝐟𝐥𝐞𝐱𝐢𝐯𝐞, 𝐚𝐧𝐭𝐢𝐬𝐲𝐦𝐦𝐞𝐭𝐫𝐢𝐜 𝐨𝐫
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐭𝐫𝐚𝐧𝐬𝐢𝐭𝐢𝐯𝐞.

 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.

 Let R be a relation in A = {x1 , x2 . . , . , xm }. The elements of A are represented by points or


circles called nodes. The nodes may also be called vertices.

 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.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [6]

𝐲 𝐲
𝐲
𝐱

𝐱 𝐱 𝐱 𝐳

𝐱𝐑𝐲 𝐱 𝐑 𝐲 and 𝐲 𝐑 𝐱 𝐱𝐑𝐱 𝐱 𝐑 𝐲 , 𝐲 𝐑 𝐳 and 𝐳 𝐑 𝐱

METHOD-2: EXAMPLES ON RELATION MATRIX AND GRAPH OF A RELATION

C 𝟏 Let X = {1,2,3,4} and R = {(x, y) ∶ x > y}. Draw the graph of R and give its matrix.
𝟎 𝟎 𝟎 𝟎 𝟏 𝟒
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐌𝐑 = [ 𝟏 𝟎 𝟎 𝟎]
𝟏 𝟏 𝟎 𝟎
𝟏 𝟏 𝟏 𝟎 𝟐 𝟑

H 𝟐 Let A = {a, b, c} and denote the subsets of A by B0 , B1 , … , B7 given as B0 = ϕ, B1 =


{c}, B2 = {b}, B3 = {b, c}, B4 = {a}, B5 = {a, c}, B6 = {a, b}, B7 = {a, b, c}. If R is
the relation of proper subset on these subsets, then give the matrix of the
relation.
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎
𝟎 𝟎 𝟎 𝟏 𝟎 𝟏 𝟎 𝟏
𝟎 𝟎 𝟎 𝟏 𝟎 𝟎 𝟏 𝟏
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐌𝐑 =
𝟎 𝟎 𝟎 𝟎 𝟎 𝟏 𝟏 𝟏
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟏
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟏
[𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎]

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.
𝟏 𝟎 𝟎 𝟏
𝟎 𝟏 𝟏 𝟎 𝟏 𝟒
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐌𝐑 = [ ]
𝟎 𝟏 𝟏 𝟎
𝟏 𝟎 𝟎 𝟏 𝟑
𝟐

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [7]

C 𝟒 Determine the properties of the relations given by the graphs as given below.
Also, write corresponding relation matrices.
(a) 𝐱𝟏 (b)

𝐱𝟑 𝐱𝟏 𝐱𝟐

𝐱𝟐

𝐱𝟑
𝐱𝟒 𝐱𝟓

(c) (d)
𝐱𝟏 𝐱𝟏 𝐱𝟐

𝐱𝟐
𝐱𝟒

𝐱𝟒 𝐱𝟑

𝐱𝟑

𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐫𝐞𝐥𝐚𝐭𝐢𝐨𝐧 (𝐚) 𝐢𝐬 𝐚𝐧𝐭𝐢𝐬𝐲𝐦𝐦𝐞𝐭𝐫𝐢𝐜, 𝐫𝐞𝐥𝐚𝐭𝐢𝐨𝐧 (𝐛)𝐢𝐬 𝐫𝐞𝐟𝐥𝐞𝐱𝐢𝐯𝐞, 𝐫𝐞𝐥𝐚𝐭𝐢𝐨𝐧


𝐀𝐧𝐬𝐰𝐞𝐫 ∶ (𝐜) 𝐢𝐬 𝐫𝐞𝐟𝐥𝐞𝐱𝐢𝐯𝐞 𝐚𝐧𝐝 𝐬𝐲𝐦𝐦𝐞𝐭𝐫𝐢𝐜 𝐚𝐧𝐝 𝐫𝐞𝐥𝐚𝐭𝐢𝐨𝐧 (𝐝)𝐢𝐬 𝐭𝐫𝐚𝐧𝐬𝐢𝐭𝐢𝐯𝐞.
𝟎 𝟏 𝟏 𝟎 𝟎
𝟏 𝟏 𝟎 𝟏
𝟎 𝟎 𝟎 𝟎 𝟎 𝟏 𝟎 𝟎
𝟏 𝟏 𝟏 𝟎
𝑨𝒏𝒔𝒘𝒆𝒓 ∶ 𝐌𝐚 = 𝟎 𝟎 𝟎 𝟏 𝟏 , 𝐌𝐛 = [ 𝟎 𝟏 𝟎 ] , 𝐌𝐜 = [ ]
𝟎 𝟏 𝟏 𝟎
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟏
[𝟎 ] 𝟏 𝟎 𝟎 𝟏
𝟎 𝟎 𝟎 𝟎
𝟎 𝟎 𝟏 𝟏
𝟏 𝟎 𝟏 𝟏
𝑨𝒏𝒔𝒘𝒆𝒓 ∶ 𝐌𝐝 = [ ]
𝟎 𝟎 𝟎 𝟏
𝟎 𝟎 𝟎 𝟎

 PARTITION AND COVERING OF A SET


 Let S be a given set and A = {A1 , A2 , A3 , … , Am } where each Ai ; i = 1,2, … , m is a subset of
S and

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [8]

⋃ 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.

 Example: Let S = {x , y , z}. Then

 A = {{x, y}, {y, z}} is a covering of S.

 B = {{x}, {y, z}} is a partition of S.

 C = {{x, y, z}} is a partition of S.

 D = {{x}, {y}, {z}} is a partition of S.

 E = {{x}, {x, y}, {x, z}} is a covering of S.

 Note: Every partition is a cover, but a cover may not be a partition.

 EQUIVALENCE RELATION
 A relation R on A is called an equivalence relation if it is reflexive, symmetric and transitive.

 Example: Let A = {1, 2, … , 7} and R = {(x, y) ∶ x − y is divisible by 3}.

 For any a ∈ A, a − a is divisible by 3. Hence, a R a. So, R is reflexive.

 For any a, b ∈ A, let a R b. i.e. a − b is divisible by 3. So, b − a is also divisible by 3.


Hence, b R a. So, R is symmetric.

 For any a, b, c ∈ A, let a R b and b R c. i.e. a − b and b − c are divisible by 3. So, a − c =


(a − b) + (b − c) is also divisible by 3. Hence, a R c. So, R is transitive.

 Hence, R is an equivalence relation on A.

 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}

is called an R-equivalence class generated by x ∈ A.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [9]

 PROPERTIES OF EQUIVALENCE CLASS


 For any x ∈ A, we have x R x because R is reflexive, therefore x ∈ [x]R .

 Let y ∈ A be any element such that x R y, then we have [x]R = [y]R .

 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.

 MAXIMAL COMPATIBILITY BLOCK


 Let A be a set and R be a compatibility relation on A. Then, a subset C ⊆ A is called a
maximal compatibility block if any element of C is compatible to every other element of C
and no element of A − C is compatible to all the elements of C.

 Let R = {(x, y) ∶ x, y ∈ X and x and y contain some common letter} be a relation on X =


{ball, bed, dog, let, egg}. Then, R is a compatibility relation denoted by " ≈ ". Also, note that
R is not equivalence relation. If we denote the elements of X by x1 , x2 , x3 , x4 , x5 then the
graph is as shown here in figure (1).

𝐗𝟐
𝐗𝟏
𝐗𝟐
𝐗𝟏

𝐗𝟓

𝐗𝟑 𝐗𝟑
𝐗𝟓

𝐗𝟒

𝐗𝟒

Figure (𝟏) Figure (𝟐)

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [10]

 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.

 HOW TO FIND MAXIMAL COMPATIBILITY BLOCK AND MATRIX


 For this first we draw a simplified graph of the compatibility relation and pick from this
graph the largest complete polygons i.e. a polygon in which any vertex is connected to
every other vertex. In addition to this any element which is related only to itself forms a
maximal compatibility block. Similarly, any two elements which are compatible to one
another but to no other elements also form a maximal compatibility block. For example,
triangle.

 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

 Also, the matrix for this compatibility relation is as given below.

2 0
3 1 1
4 1 0 1
5 0 1 0 1
1 2 3 4

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [11]

 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}

 The operation of obtaining R ∘ S is called composition of relations.

 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

 TRANSITIVE CLOSURE OF A RELATION


 Let R be relation in a finite set A. The relation R+ = R ∪ R2 ∪ R3 ∪ … in A is called the
transitive closure of R in A.

METHOD-3: EXAMPLES ON EQUIVALENCE AND COMPATIBILITY RELATION

H 𝟏 Define with examples: Partition, Covering, Equivalence relation, Equivalence


class, Compatibility relation, Maximal compatibility block, Composite relation,
Converse of a relation, Transitive closure.

C 𝟐 Let X = {1,2, … … ,7} and R = {(x, y) ∶ x − y is divisible by 3}. Show that R is an


equivalence relation. Also, draw the graph of R.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶

H 𝟑 Let X = {1,2, … … ,7} and R = {(x, y) ∶ x − y is even}. Show that R is an


equivalence relation.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [12]

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 𝟔 Prove that relation “congruence modulo m” given by R = {(x, y) ∶ x −


y is divisible by m}, over the set of positive integers, is an equivalence relation.

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.

C 𝟏𝟎 Let R = {(x, y) ∶ x, y ∈ X and x and y contain some common letter} be relation on


X where X = {ball, bed, dog, let, egg}. Then, show that R is a compatibility
relation.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [13]

C 𝟏𝟏 Let the compatibility relation on a set {x1 , x2 , x3 , … , x6 } be given by the following


matrix. Draw the graph. Also, find maximal compatibility blocks of the 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 and S be two relations on a set of positive integers A, where R =


{(x, 2x) ∶ x ∈ A} and S = {(x, 7x) ∶ x ∈ A}. Find R ∘ S, R ∘ R, R ∘ R ∘ R and R ∘ S ∘ 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.
𝟎 𝟎 𝟎 𝟎 𝟏 𝟎 𝟎 𝟎 𝟏 𝟎
𝟎 𝟎 𝟎 𝟎 𝟏 𝟎 𝟎 𝟎 𝟎 𝟎
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐌𝐑∘𝐒 = 𝟎 𝟏 𝟎 𝟎 𝟎 , 𝐌𝐒∘𝐑 = 𝟎 𝟏 𝟎 𝟎 𝟎
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟏 𝟎 𝟎 𝟎
[𝟎 𝟎 𝟎 𝟎 𝟎 ] [ 𝟎 𝟎 𝟎 𝟎 𝟎]

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [14]

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 = 𝟎 𝟏 𝟏
𝟏 𝟏 𝟏
[𝟎 𝟏 𝟏]

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [15]

PART-II PARTIAL ORDERING

 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.

 Let P = {2, 3, 6, 8} and ≤ be a relation “divides”, then (P, ≤) is a poset.

 TOTALLY ORDERED SET


 Let (P, ≤) be a partially ordered set. If for every x, y ∈ P we have either x ≤ y or y ≤ x, then
≤ is called a simple ordering or linear ordering on P, and (P, ≤) is called a totally ordered
or simply ordered set or a chain.

 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.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [16]

 Example: Let P = {1, 2, 3, 4} and ≤ be a relation “less than or equal to”


4
then the Hasse diagram is as follows.
3

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
≤.

 The least member is usually denoted by 0 and greatest member by 1.

 Example: Let P = {1, 2, 3, 4} and ≤ be a relation “less than or equal to”.

 Here, least member is 1 and greatest member is 4.

 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.

 MINIMAL AND MAXIMAL MEMBER


 Let (P, ≤) be a poset. If there does not exist an element x ∈ P such that x ≤ y for y ∈ P, then
y is called the minimal member in P relative to the partial ordering ≤ . If there does not
exist an element x ∈ P such that y ≤ x for y ∈ P, then y is called the maximal member in P
relative to the partial ordering ≤ .

 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

 Also, there are two maximal members 24 and 36.


6

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.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [17]

 LEAST UPPER BOUND AND GREATEST LOWER BOUND


 Let (P, ≤) be a partially ordered set and let A ⊆ P. An element x ∈ P is a least upper bound
or supremum for A if x is an upper bound for A and x ≤ y where y is any upper bound for
A. Similarly, an element x ∈ P is a greatest lower bound or infimum for A if x is an lower
bound for A and y ≤ x where y is any lower bound for 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.

 Note: Both “GLB” and “LUB” are unique if exists.

 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”.

METHOD-4: EXAMPLES ON POSET AND HASSE DIAGRAM

H 𝟏 Define the following terms with example:


Partial order relation, Partially ordered set (poset), Simple (linear) ordering,
Totally ordered set (chain or simply ordered set), Cover, Least member, Greatest
member, Minimal member, Maximal member, Upper bound, Lower bound, Least
upper bound (supremum), Greatest lower bound (infimum), Well-ordered set.

C 𝟐 Show that the relation ⊆(inclusion) on a set P(A), i. e. power set of A = {a, b, c}, is
a partial ordering.

H 𝟑 Show that (P(A), ⊆) is a poset.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [18]

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 𝟔 Give an example of a set A such that (P(A), ⊆) is a totally ordered set.


𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐀 = {𝐚}

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

(𝐚) (𝐛) (𝐜) (𝐝)

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [19]

H 𝟖 Give a relation which is both a partial order relation and an equivalence relation
on a set.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐑 = {(𝐱, 𝐲) ∶ 𝐱 = 𝐲}

C 𝟗 Hasse diagram of a poset (P, R), where P = {x1 , x2 , x3 , x4 , x5 }, is given below.


Find out which of the followings are true? x1
a) x1 R x2 e) x4 R x1
b) x3 R x5 f) x2 R x5 x2 x3
c) x1 R x1 g) x2 R x3
d) x4 R x5
x4 x5
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐟𝐚𝐥𝐬𝐞, 𝐟𝐚𝐥𝐬𝐞, 𝐭𝐫𝐮𝐞, 𝐟𝐚𝐥𝐬𝐞, 𝐭𝐫𝐮𝐞, 𝐟𝐚𝐥𝐬𝐞, 𝐟𝐚𝐥𝐬𝐞

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

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [20]

 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)

 a ∗ b = b ∗ a and a⨁b = b⨁a (Commutative)

 (a ∗ b) ∗ c = a ∗ (b ∗ c) and (a⨁b)⨁c = a⨁(b⨁c) (Associative)

 a ∗ (a⨁b) = a and a⨁(a ∗ b) = a (Absorption)

 COMPLETE LATTICE
 A lattice is called complete if each of its non-empty subsets has a least upper bound and a
greatest lower bound.

 Note: Every finite lattice must be complete.

 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)

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.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [21]

 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.

 PSEUDO BOOLEAN LATTICE


 A bounded lattice (L, ≤) is called pseudo Boolean lattice if for all a, b ∈ L, there exists c ∈ L
such that a ∗ x ≤ b ⟺ x ≤ c, ∀x ∈ L.

 If such element c exists, then it is unique and will be denoted by b ∶ a.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [22]

 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.

METHOD-5: BASIC EXAMPLES ON LATTICE

H 𝟏 Define With example: Lattice, Complete Lattice, Distributive lattice, Modular


lattice, Bounded lattice, Complement element, Complemented lattice, Boolean
lattice(algebra), Pseudo Boolean lattice(algebra).

C 𝟐 Let A = {a, b, c}. Then, show that the poset (p(A), ⊆) is a lattice.

H 𝟑 Let A = {1,2,3}. Check whether the poset (p(A), ⊆) is a lattice.


𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐲𝐞𝐬, (𝐩(𝐀), ⊆) 𝐢𝐬 𝐚 𝐥𝐚𝐭𝐭𝐢𝐜𝐞

C 𝟒 Let A = {2,3,4,6,8,12,24,36}. Check whether the poset ( A , | ) is a lattice.


𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐧𝐨, ( 𝐀 , | ) 𝐢𝐬 𝐧𝐨𝐭 𝐚 𝐥𝐚𝐭𝐭𝐢𝐜𝐞

H 𝟓 Let Sn be the set of factors(divisors) of positive integer n. Draw Hasse diagram


for lattice ( Sn , | ) for n = 6,24,30,45.

C 𝟔 Check whether ([0,1], ≤) is a lattice. If yes, what are meet and join?
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐲𝐞𝐬, ([𝟎, 𝟏], ≤) 𝐢𝐬 𝐚 𝐥𝐚𝐭𝐭𝐢𝐜𝐞 𝐰𝐢𝐭𝐡 𝐦𝐞𝐞𝐭 {𝐚, 𝐛} = 𝐦𝐢𝐧 {𝐚, 𝐛}
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧𝐝 𝐣𝐨𝐢𝐧 {𝐚, 𝐛} = 𝐦𝐚𝐱 {𝐚, 𝐛}

H 𝟕 Define lattice. Determine whether poset ({1,2,3,4,5} , | ) is a lattice.


𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐧𝐨, ({𝟏, 𝟐, 𝟑, 𝟒, 𝟓} , | ) 𝐢𝐬 𝐧𝐨𝐭 𝐚 𝐥𝐚𝐭𝐭𝐢𝐜𝐞

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [23]

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.

 Example: Consider the following instructions for generating a sequence.

 Start with 1.

 Given a term of sequence, get the next term by adding two to it.

 If we generate terms of sequence with these two rules, we obtain

1, 3, 5, 7, …

 If we denote the sequence as a1 , a2 , a3 , a4 , …

 Then, we can rephrase instruction as, an = an−1 + 2 ; n ≥ 2 and a1 = 1.

 The equation an = an−1 + 2 ; n ≥ 2 is an recurrence relation and a1 = 1 is an initial


condition.

 SOLVING RECURRENCE RELATION


 Solving recurrence relation means finding an explicit formula for an (as f(n)).

 The following are methods for this.

 Generating function

 Undetermined coefficients

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [24]

 GENERATING FUNCTION METHOD


 Example: Let an − 3an−1 = 2 ; n ≥ 1 with a0 = 1.

 Given recurrence relation is an − 3an−1 = 2.

 Multiplying both sides by z n , we obtain

an z n − 3an−1 z n = 2z n

 Since n ≥ 1, summing for all n. we get,


∞ ∞ ∞

∑ 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

∞ ∞

∑ an−1 z = z ∑ an−1 z n−1 = z(a0 + a1 z + a2 z 2 + a3 z 3 + ⋯ ) = zA(z)


n

n=1 n=1


z
∑ zn = z + z2 + z3 + ⋯ =
1−z
n=1

 Substituting values in equation (1). We get,


z
[A(z) − a0 ] − 3zA(z) = 2
1−z
2z
⟹ (1 − 3z)A(z) = + a0
1−z
2z
⟹ (1 − 3z)A(z) = +1 (∵ given that a0 = 1)
1−z
2z 1
⟹ A(z) = +
(1 − z)(1 − 3z) (1 − 3z)

1+z
⟹ A(z) =
(1 − z)(1 − 3z)

2 1
⟹ A(z) = −
(1 − 3z) (1 − z)

⟹ A(z) = 2[1 + (3z) + (3z)2 + (3z)3 + ⋯ ] − [1 + z + z 2 + z 3 + ⋯ ]

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [25]

∞ ∞

⟹ A(z) = 2 ∑(3) z − ∑ z n
n n

n=0 n=0

⟹ an = 2(3)n − 1 ; n ≥ 0

 Which is required solution of the given recurrence relation.

 UNDETERMINED COEFFICIENTS METHOD


 Example: Let an − 3an−1 = 2 ; n ≥ 1 with a0 = 1.
(h) (P)
 Here, the total solution an is given by an = an + an .

(h)
Part-I (how to find an )

 The characteristic equation is (λ − 3) = 0.

⟹λ=3
(h)
⟹ an = C1 (3)n

(h)
an according to λ

(h)
λ an

λ1 ≠ λ2 ≠ λ3 C1 (λ1 )n + C2 (λ2 )n + C3 (λ3 )n

λ1 = λ2 = λ3 (C1 + C2 n + C3 n2 )(λ1 )n

(P)
Part-II (how to find an )

 Here, fn = 2.

 Therefore, particular solution is of the type fn = constant.


(P)
 Hence, we will consider an = P0 .

⟹ an−1 = P0

 Substituting these values in given recurrence relation. We get,

P0 − 3P0 = 2

⟹ −2P0 = 2

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [26]

⟹ 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)

Part-III (how to find constants using given conditions)

 We are given that a0 = 1.

 So, an = C1 (3)n − 1

⟹ a0 = C1 (3)0 − 1

⟹ 1 = C1 − 1

⟹ C1 = 2

 Hence, required solution is an = 2(3)n − 1.

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [27]

METHOD-6: EXAMPLES ON RECURRENCE RELATION

H 𝟏 Solve the recurrence relation using the method of generating function


an = 3an−1 ; n ≥ 1.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = (𝟑)𝐧 𝐚𝟎 ; 𝐧 ≥ 𝟎

H 𝟐 Solve the recurrence relation using the method of generating function


an + 2an−1 − 15an−2 = 0 ; n ≥ 2, a0 = 0, a1 = 1.
𝟏 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = (𝟑)𝐧 − (−𝟓)𝐧 ; 𝐧 ≥ 𝟎
𝟖 𝟖

C 𝟑 Solve the recurrence relation using the method of generating function


an − 3an−1 = 2 ; n ≥ 1, a0 = 1.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = 𝟐(𝟑)𝐧 − 𝟏 ; 𝐧 ≥ 𝟎

C 𝟒 Solve the recurrence relation using the method of generating function


an − 5an−1 + 6an−2 = 3n ; n ≥ 2, a0 = 0, a1 = 2.
𝟏 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = (𝟑)𝐧 ( − (𝟐)𝐧 + (𝟑)𝐧 ) + 𝟐((𝟑)𝐧 − (𝟐)𝐧 ) ; 𝐧 ≥ 𝟎
𝟐 𝟐

C 𝟓 Solve the following recurrence relation using the method of undetermined


coefficients.
a) an = 2an−1 − an−2 ; a1 = 1.5, a2 = 3
b) an = 3an−1 − 2an−2 ; a1 = −2, a2 = 4
c) an − 7an−1 + 10an−2 = 0 ; a0 = 0, a1 = 3
d) an − 4an−1 + 4an−2 = 0 ; a0 = 1, a1 = 6
e) an + 2an−1 − 15an−2 = 0 ; a0 = 0, a1 = 1
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = (𝟏. 𝟓𝐧)(𝟏)𝐧 , 𝐚𝐧 = (−𝟖)(𝟏)𝐧 + 𝟑(𝟐)𝐧 , 𝐚𝐧 = (𝟓)𝐧 − (𝟐)𝐧 ,
𝟏 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = (𝟏 + 𝟐𝐧)(𝟐)𝐧 , 𝐚𝐧 = (𝟑)𝐧 − (−𝟓)𝐧
𝟖 𝟖

C 𝟔 Solve the recurrence relation an + 6an−1 + 12an−2 + 8an−3 = 2n ; n ≥ 3, a0 =


a1 = 0, a2 = 2 using the method of undetermined coefficients.
𝟏 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = (− + 𝐧) (−𝟐)𝐧 + (𝟐)(𝐧−𝟑)
𝟖 𝟒

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708


UNIT-3 » RELATIONS, PARTIAL ORDERING AND RECURSION [28]

H 𝟕 Solve the recurrence relation an = 2an−1 + 3an−2 + 5n ; n ≥ 2, a0 = −2, a1 = 1


using the method of undetermined coefficients.
𝟏𝟕 𝟐𝟕 𝟐𝟓
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = − (−𝟏)𝐧 − (𝟑)𝐧 + (𝟓)𝐧
𝟐𝟒 𝟖 𝟏𝟐

C 𝟖 Solve the recurrence relation an + 5an−1 + 6an−2 = 3n2 using the method of
undetermined coefficients.
𝟏𝟏𝟓 𝟏𝟕 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = 𝐂𝟏 (−𝟐)𝐧 + 𝐂𝟐 (−𝟑)𝐧 + + 𝐧 + 𝐧𝟐
𝟐𝟐𝟖 𝟐𝟒 𝟒

C 𝟗 Solve the recurrence relation an − 5an−1 + 6an−2 = n + 2n ; n ≥ 2, a0 = 1, a1 =


1 using the method of undetermined coefficients.
𝟏𝟕 𝟕 𝟏
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = (𝟑)𝐧 − 𝟓(𝟐)𝐧 + + 𝐧 − 𝟐𝐧(𝟐)𝐧
𝟒 𝟒 𝟐

H 𝟏𝟎 Solve the recurrence relation an − 4an−1 + 4an−2 = n + 3n using undetermined


coefficients method.
𝐀𝐧𝐬𝐰𝐞𝐫 ∶ 𝐚𝐧 = (𝐂𝟏 + 𝐂𝟐 𝐧)(𝟐)𝐧 + 𝟒 + 𝐧 + 𝟗(𝟑)𝐧

⋆ ⋆ ⋆ ⋆ ⋆ ⋆ ⋆ ⋆ ⋆

DARSHAN INSTITUTE OF ENGINEERING & TECHNOLOGY »»» DM - 3140708

You might also like