Unit.1 - Lecture Notes - 24-25
Unit.1 - Lecture Notes - 24-25
The ordered n-tuple is the ordered collection (𝑎1 , 𝑎2 , … , 𝑎𝑛 ) that has 𝑎1 as its first element, 𝑎2 as its
second element,…, and 𝑎𝑛 as its nth element.
Two ordered n-tuples are equal if and only if each corresponding pair of their elements is equal.
In other words, (𝑎1 , 𝑎2 , … , 𝑎𝑛 ) = (𝑏1 , 𝑏2 , … , 𝑏𝑛 ) if and only if 𝑎𝑖 = 𝑏𝑖 for 𝑖 = 1, 2, . . . , 𝑛.
Definition
Let P and Q be two sets. The Cartesian product P × Q is the set of all ordered pairs (𝒑, 𝒒), where 𝒑 ∈
𝑷 and 𝒒 ∈ 𝑸
Consider the two sets: 𝑨 = {𝐷𝐿, 𝑀𝑃, 𝐾𝐴}, where 𝐷𝐿, 𝑀𝑃, 𝐾𝐴 represent Delhi, Madhya Pradesh and
Karnataka, respectively and 𝑩 = {01,02, 03} representing codes for the licence plates of vehicles
issued by DL, MP and KA.
If the three states, Delhi, Madhya Pradesh and Karnataka were making codes for the licence plates of
vehicles, with the restriction that the code begins with an element from set A, which are the pairs
available from these sets and how many such pairs will there be ?
(DL,01), (DL,02), (DL,03), (MP,01), (MP,02), (MP,03), (KA,01), (KA,02), (KA,03) and the product
of set A and set B is given by
It can easily be seen that there will be 9 such pairs in the Cartesian product, since there are 3 elements
in each of the sets A and B. This gives us 9 possible codes.
For example, the code (DL, 01) will not be the same as the code (01, DL).
Definition
A relation R from a non-empty 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.
The second element is called the image of the first element.
For example, 𝑅 = {(𝑎, 0), (𝑎, 1), (𝑎, 3), (𝑏, 1), (𝑏, 2), (𝑐, 0), (𝑐, 3)} is a relation from the set {𝑎, 𝑏, 𝑐}
to the set {0, 1, 2, 3}.
A relation from a set A to itself is called a relation on A.
Domain-Definition
The set of all first elements of the ordered pairs in a relation R from a set A to a set B is called the
domain of the relation R.
Co-domain Definition
The set of all second elements in a relation R from a set A to a set B is called the range of the relation
R. The whole set B is called the codomain of the relation R.
What is the largest possible relation from the set 𝐴 = {1,2,3,4,5} to the set 𝐵 = {1,2,3}?
Write the relations from 𝐴 to 𝐵 in each of the following cases when
1) 𝑎 is related to 𝑏 if and only if 𝑎 ≥ 𝑏
2) 𝑎 is related to 𝑏 if and only if 𝑎 > 𝑏
3) 𝑎 is related to 𝑏 if and only if 𝑎 < 𝑏
4) 𝑎𝑅𝑏 if and only if 𝑎 + 𝑏 > 4
5) (𝑎, 𝑏) ∈ 𝑅 if and only if 𝑎 𝑖𝑠 𝑎 𝑑𝑖𝑣𝑖𝑠𝑜𝑟 𝑜𝑓 𝑏
Solution:
The largest possible relation from 𝐴 to 𝐵 is
𝐴 × 𝐵 = {(1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3),
(4,1), (4,2), (4,3), (5,1), (5,2), (5,3)}
1) 𝑅 = {(𝑎, 𝑏)|𝑎 ≥ 𝑏, 𝑎 ∈ 𝐴, 𝑏 ∈ 𝐵}
= {(1,1), (2,1), (2,2), (3,1), (3,2), (3,3), (4,1), (4,2), (4,3), (5,1), (5,2), (5,3)}
2) 𝑅 = {(𝑎, 𝑏)|𝑎 > 𝑏, 𝑎 ∈ 𝐴, 𝑏 ∈ 𝐵} = {(2,1), (3,1), (3,2), (4,1), (4,2), (4,3), (5,1), (5,2), (5,3)}
3) 𝑅 = {(𝑎, 𝑏)|𝑎 < 𝑏, 𝑎 ∈ 𝐴, 𝑏 ∈ 𝐵} = {(1,2), (1,3), (2,3)}
4) 𝑅 = {(𝑎, 𝑏)|𝑎 + 𝑏 > 4, 𝑎 ∈ 𝐴, 𝑏 ∈ 𝐵} =
{(2,3), (3,1), (3,2), (3,3), (4,1), (4,2), (4,3), (5,1), (5,2), (5,3)}
5) 𝑅 = {(𝑎, 𝑏)|𝑎 𝑖𝑠 𝑎 𝑑𝑒𝑣𝑖𝑠𝑜𝑟 𝑜𝑓 𝑏, 𝑎 ∈ 𝐴, 𝑏 ∈ 𝐵} = {(1,1), (1,2), (1,3), (2,2), (3,3)}
Let 𝐴 = {1, 2, 5} and 𝐵 = {3, 5,7} and let 𝑅 = {(𝑎, 𝑏)|7 ≤ 𝑎 + 𝑏 < 10, 𝑎 ∈ 𝐴, 𝑏 ∈ 𝐵}.
1) Write all the elements of 𝑅 and 𝑅’
Solution:
1) 𝑅 = {(1,7), (2,5), (2,7), (5,3)}
𝑅 ′ = {(1,3), (1,5), (2,3), (5,5), (5,7)}
2) 𝑅 −1 = {(7,1), (5,2), (7,2), (3,5)}
3) 𝐷𝑜𝑚(𝑅) = {1,2,5}, 𝑅𝑎𝑛𝑔𝑒(𝑅) = {3,7,5}
𝐷𝑜𝑚(𝑅 −1 ) = {3,7,5}, 𝑅𝑎𝑛𝑔𝑒(𝑅) = {1,2,5}
Example-3:
Consider these relations on the set of integers:
𝑅1 = {(𝑎, 𝑏) | 𝑎 ≤ 𝑏},
𝑅2 = {(𝑎, 𝑏) | 𝑎 > 𝑏 },
𝑅3 = {(𝑎, 𝑏) | 𝑎 = 𝑏 𝑜𝑟 𝑎 = − 𝑏},
𝑅4 = {(𝑎, 𝑏) | 𝑎 = 𝑏},
𝑅5 = {(𝑎, 𝑏) | 𝑎 = 𝑏 + 1},
𝑅6 = {(𝑎, 𝑏) | 𝑎 + 𝑏 ≤ 3}.
Which of these relations contain each of the pairs (1,1), (1,2), (2,1), (1,−1), and (2,2)?
Solution:
The pair (1,1) is in R1, R3, R4, and R6; (1,2) is in R1 and R6; (2,1) is in R2, R5, and R6; (1,−1) is in R2,
R3, and R6; and finally, (2,2) is in R1, R3, and R4.
Exercise-1:
1. How many relations are possible from A to B if A = {1, 2, 3} and B = {0, 2}. [Winter 2017 – 18]
OR
{Number of possible relations from A = {1, 2, 3} to B = {0, 2} is________ [Winter 2018 – 19]}
2. How many relations are possible from A to B if A = {1, 2} and B = {a, b, c}?
[Summer 2018 – 19]
3. If A = {1,2,3,4,5,6} and R = {(x, y)/ |x − y| = 2, x ∈ A, y ∈ A}. Then, the relation set
𝑅 = ____________. [Summer/Winter 2023 – 24]
A) {(3,1), (4,2), (5,3), (6,4)}
B) {(1,3), (2,4), (5,3), (4,6)}
C) {(1,3), (3,1), (2,4), (4,2), (3,5), (5,3), (4,6), (6,4)}
D) {(1,2), (2,1), (2,4), (4,2), (3,6), (6,3)}
4. Let 𝐴 = {1, 2, 3, . . . ,14}. Let a relation 𝑅 on 𝐴 be defined as
𝑅 = {(𝑥, 𝑦) ∶ 3𝑥 − 𝑦 = 0, 𝑤ℎ𝑒𝑟𝑒 𝑥, 𝑦 ∈ 𝐴}. Write down its domain, co-domain and range.
5. Let 𝐴 = {𝑥, 𝑦, 𝑧} and 𝐵 = {1, 2}. Find the number of relations from 𝐴 to 𝐵. Which of the following
is not a relation from 𝐴 to 𝐵? Justify your answer.
i) {(𝑥, 1), (𝑦, 2), (𝑧, 3)}
ii) {(𝑥, 1), (𝑥, 2)}
iii) {(𝑥, 2), (𝑦, 2), (𝑧, 2)}
iv) {(1, 𝑥), (2, 𝑥)}
COMPOSITE OF RELATIONS
Definition
Let 𝑅 be a relation from a set 𝐴 to a set 𝐵 and 𝑆 a relation from B to a set 𝐶.
The composite of 𝑅 and 𝑆given by 𝑆 ∘ 𝑅 is the relation from 𝐴 to 𝐶 consisting of ordered pairs (𝑎, 𝑐),
where 𝑎 ∈ 𝐴 , 𝑐 ∈ 𝐶 , and for which there exists an element 𝑏 ∈ 𝐵 such that (𝑎, 𝑏) ∈ 𝑅 and
(𝑏, 𝑐) ∈S.
Thus, 𝑆 ∘ 𝑅 = {(𝑎, 𝑐)|(𝑎, 𝑏) ∈ 𝑅, (𝑏, 𝑐) ∈ 𝑆, 𝑓𝑜𝑟 𝑠𝑜𝑚𝑒 𝑏 ∈ 𝐵}.
In other words, 𝑎(𝑆 ∘ 𝑅)𝑐 if and only if 𝑎𝑅𝑏 and 𝑏𝑆𝑐 for some 𝑏 ∈ 𝐵.
Remark:
1. The powers of a relation R can be recursively defined from the definition of a composite of two
relations.
Let R be a relation on the set A. The powers 𝑹𝒏 , 𝑛 = 1,2,3, . ..are defined recursively by 𝑹𝟏 = 𝑹
and 𝑹𝒏+𝟏 = 𝑹𝒏 ∘ 𝑹.
Thus, R2 = R ◦R, R3 = R2 ◦R = (R ◦R) ◦R, and so on.
Example-4:
Let 𝑅 = {(1,1), (1,4), (2,3), (3,1), (3,4)} and 𝑆 = { (1,0), (2,0), (3,1), (3,2), (4,1)} be two relations
on some sets. Check if 𝑆 ∘ 𝑅 is possible or not. If it is possible then write the elements of the relation
𝑆 ∘ 𝑅.
Solution
Here, 𝑐𝑜𝑑𝑜𝑚(𝑅) = {1,3,4} is a subset of 𝑑𝑜𝑚(𝑆) = {1,2,3,4}
Hence, 𝑆 ∘ 𝑅 is Possible.
Further, 𝑆 ∘ 𝑅 = {(1,0), (1,1), (2,1), (2,2), (3,0), (3,1)}
Example-5:
Let 𝑅 = {(1,1), (2,1), (3,2), (4,3)}. Find the powers Rn, n= 2, 3, 4,,.. [Winter 2022-23]
Solution
𝑅 2 = 𝑅 ∘ 𝑅 = {(1,1), (2,1), (3,1), (4,2)}
Further, 𝑅 3 = 𝑅 2 ∘ 𝑅 = {(1,1), (2,1), (3,1), (4,1)}.
Similarly, 𝑅 4 = 𝑅 3 ∘ 𝑅 = {(1,1), (2,1), (3,1), (4,1)}.
It follows that 𝑅 𝑛 = 𝑅 3 for 𝑛 = 5,6,7, …
Exercise-2:
1. Let 𝑅1 = {(1, 2) (1, 6) (2, 4) (3, 4) (3, 6) (3, 8)} and 𝑅2 = {(2, x) (4, y) (4, z) (6, z) (8, x)}.
Then 𝑅1 𝑜 𝑅2 = _______. [Winter 2021 – 22]
2. Let 𝑅 = {(0,1), (1,2), (1,4), (2,3), (3,1), (4,3)} and 𝑆 = { (1,0), (2,1), (3,1), (3,2)} be two
relations on some sets. Check if 𝑅 ∘ 𝑆 is possible or not. If it is possible then write the elements of
the relation 𝑅 ∘ 𝑆.
3. let R = {(1, b), (2, a), (2, c)} be a relation from A = {1, 2, 3} to B = {a, b, c} and let S = {(a, y),
(b, x), (c, y), (c, z)} be a relation from B to C = {x, y, z}. Check if the composition relation 𝑆 ∘ 𝑅
and 𝑅 ∘ 𝑆. can exist. Write the relation as set if they exist. If not, give the reason.
[Winter 2021 – 22]
PROPERTIES OF RELATIONS
Equivalence relation-Definition:
A relation R on a set A is said to be equivalence relation, if R is reflexive, transitive and symmetric.
Example-7:
Show that the “greater than or equal” relation (≥) is a partial ordering on the set of integers.
[Summer 2017 – 18] [Winter 2021 – 22]
Solution:
Because a ≥ a for every integer a, ≥ is reflexive.
If a ≥ b and b ≥ a, then a = b.
Hence, ≥is antisymmetric.
Finally, ≥is transitive because a ≥ b and b ≥ c implies that a ≥ c.
It follows that ≥is a partial ordering on the set of integers and (Z, ≥) is a poset.
Example-8:
Show that the inclusion relation ⊆ is a partial ordering on the power set of a set S.
Solution:
Because A ⊆A whenever A is a subset of S, ⊆ is reflexive.
It is antisymmetric because A ⊆ B and B ⊆ A imply that A = B.
Finally, ⊆is transitive, because A ⊆ B and B ⊆ C imply that A ⊆ C.
Hence, ⊆is a partial ordering on P(S), and (P(S), ⊆) is a poset.
Exercise-3
1. Check whether the following relations are equivalence relation or not on the set of all integers
where 𝑎𝑅𝑏 if and only if 1) 𝑎 ≠ 𝑏 2) 𝑎𝑏 ≥ 0
2. Check whether from the following relation sets, which are satisfying the transitive, reflexive
or symmetric property which relation is an Equivalence relation and partially ordered relation.
1) R1 = {(1, 1), (2, 2), (3, 3)}
2) R2 = {(1, 1), (2, 2), (1, 2), (2, 1), (3, 1)}
3) R3= {(1, 1), (1, 2), (2, 1), (1, 3), (3, 1)}
4) R4= {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1), (1, 3), (3, 1), (2, 3), (3, 2)}
3. Prove that (ℤ, ≤) is a partially ordered set where Z is the set of integers.
4. Check if ℕ with the ‘𝑑𝑖𝑣𝑖𝑑𝑒𝑠’ relation is a Poset.
5. If a relation 𝑅 satisfies reflexive, anti- symmetric and Transitive property then the relation is
called _____________ relation.
[Winter 2017 – 18] [Winter 2018 – 19] [Summer 2018 – 19] [Summer 2023 – 24]
6. If a relationܴ satisfies reflexive, symmetric and Transitive property then the relation is called
_________ relation. [Winter 2021 – 22]
7. Determine whether the relation R on the set of natural numbers is reflexive, symmetric,
antisymmetric, and/or transitive, where (a, b) ∈ R if and only if ab 1. And hence check it is
an equivalence relation or a partial ordering relation. [Summer 2018 – 19]
8. A relation R on a set A is said to be equivalence relation, if R is ______. [Winter 2019 – 20]
(a) Reflexive, transitive and symmetric (b) anti-symmetric, transitive and symmetric
(c) Anti-symmetric, reflexive, symmetric (d) reflexive, transitive and anti-symmetric
9. If (𝑎, 𝑏) ∈ 𝑅, (𝑏, 𝑎) ⇒ 𝑎 = 𝑏, for all 𝑎, 𝑏 ∈ 𝐴, then relation R is said to be __________.
[Summer 2023 – 24]
10. If (𝑎, 𝑎) ∈ 𝑅 for every 𝑎 ∈ 𝑅, then relation 𝑅 is said to be __________. [Winter 2022 - 23]
11. For the relation {(2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4)} 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. (Justify your answer if the property is not satisfied) [Winter 2023 – 24]
Function
We can, visualise a function as a rule, which produces new elements out of some given elements.
There are many terms such as ‘map’ or ‘mapping’ used to denote a function.
Function-Definition
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,
A relation, f is a function from a non-empty set A to a non-empty set B if
(i) the domain of f is A
(ii) no two distinct ordered pairs in f have the same first elements.
Remark:
If 𝑓 is a function from A to B and (𝑎, 𝑏) ∈ 𝑓, then we write 𝑓 (𝑎) = 𝑏, where 𝑏 is called the image
of 𝑎 under 𝑓 and 𝑎 is called the preimage of 𝑏 under f.
Example-9:
Examine each of the following relations given below and state in each case, giving reasons whether it
is a function or not on the given domain?
REPRESENTION OF RELATIONS
(Here the elements of the sets A and B have been listed in a particular, but arbitrary, order. Furthermore,
when A = B we use the same ordering for A and B.)
1 𝑖𝑓 (𝑎𝑖 , 𝑏𝑗 ) ∈ 𝑹
The relation R can be represented by the matrix 𝑴𝑹 = [𝒎𝒊𝒋 ], where 𝒎𝒊𝒋 = {
0 𝑖𝑓 (𝑎𝑖 , 𝑏𝑗 ) ∉ 𝑹
In other words, the zero–one matrix representing R has a 1 as its(𝑖, 𝑗)th entry when 𝒂𝒊 is related to 𝒃𝒋 ,
and a 0 in this position if 𝒂𝒊 is not related to 𝒃𝒋 .
Example-10:
Suppose that 𝐴 = {1,2,3}and 𝐵 = { 1,2}.
Let R be the relation from A to B containing (𝑎, 𝑏) if 𝑎 ∈ 𝐴, 𝑏 ∈ 𝐵, 𝑎𝑛𝑑 𝑎 > 𝑏.
What is the matrix representing R?
Solution:
0 0
Because 𝑅 = {(2,1), (3,1), (3,2)}, the matrix for R is MR = [1 0]
1 1
Example-11:
Let 𝐴 = {𝑎1 , 𝑎2 , 𝑎3 } and 𝐵 = {𝑏1 , 𝑏2 , 𝑏3 , 𝑏4 , 𝑏5 }.
0 1 0 0 0
Which ordered pairs are in the relation R represented by the matrix MR =[1 0 1 1 0] ?
1 0 1 1 0
Solution:
Because R consists of those ordered pairs (𝑎𝑖 , 𝑏𝑗 ) with 𝑚𝑖𝑗 = 1, it follows that
𝑅 = {(𝑎1 , 𝑏2 ), (𝑎2 , 𝑏1 ), (𝑎2 , 𝑏3 ), (𝑎2 , 𝑏4 ), (𝑎3 , 𝑏1 ), (𝑎3 , 𝑏3 ), (𝑎3 , 𝑏5 )}.
Remarks:
• R is reflexive if and only if 𝑚𝑖𝑖 = 1 for 𝑖 = 1,2, . . . , 𝑛.
In other words, R is reflexive if all the elements on the main diagonal of MR are equal to 1.
Note that the elements off the main diagonal can be either 0 or 1.
(The matrix for a reflexive relation)
Example-12:
Suppose that the relations R and S on a set A are represented by the matrices
1 0 1 1 0 1
𝑀𝑅 =[1 0 0]and 𝑀𝑆 =[0 1 1]. What are the matrices representing 𝑅 ∪ 𝑆 and 𝑅 ∩ 𝑆?
0 1 0 1 0 0
Solution:
The matrices of these relations are
1 0 1 1 0 1
𝑀𝑅∪𝑆 = 𝑀𝑅 ∨ 𝑀𝑆 = [1 1 1] and 𝑀𝑹∩𝑺 = 𝑀𝑅 ∧ 𝑀𝑆 = [0 0 0]
1 1 0 0 0 0
Example-13:
Find the matrix representing the relation 𝑆 ∘ 𝑅, where the matrices representing R and S are
1 0 1 0 1 0
MR =[1 1 0]and MS =[0 0 1]
0 0 0 1 0 1
Solution:
1 1 1
The matrix for S◦R is 𝑀𝑺∘𝑹 = 𝑀𝑅 ʘ𝑀𝑆 = [0 1 1].
0 0 0
Exercise-4:
0 1 1
1. Let R be the relation represented by the matrix 𝑀𝑅 = [1 1 0]. Find the matrix representing
1 0 1
(a) 𝑅 −1 (b) 𝑅′ (𝒄) 𝑅 2
0 1 0
2. Let 𝑅 and 𝑆 be relations on a set A represented by the matrices 𝑀𝑅 = [1 1 1] and
1 0 0
0 1 0
𝑀𝑆 = [0 1 1] . Find the matrices representing the following relations. [Winter 2019 – 20]
1 1 1
(a) 𝑅 ∪ 𝑆 (b) 𝑅 ∩ 𝑆 (c) 𝑆 ∘ 𝑅 (d) 𝑅 ∘ S (e) 𝑅⨁𝑆
Each element of the set is represented by a point, and each ordered pair is represented using an arc
with its direction indicated by an arrow.
We use such pictorial representations when we think of relations on a finite set as directed graphs, or
digraphs.
Loop-Definition:
An edge of the form (a,a) is represented using an arc from the vertex ‘a’ back to itself. Such an edge
is called a loop.
Remarks:
• A relation R is reflexive if and only if there is a loop at every vertex of the directed graph, so that
every ordered pair of the form (𝑥, 𝑥) occurs in the relation.
• A relation is transitive if and only if whenever there is an edge from a vertex x to a vertex y
and an edge from a vertex y to a vertex z, there is an edge from x to z (completing a triangle
where each side is a directed edge with the correct direction).
• A relation is symmetric if and only if for every edge between distinct vertices in its digraph
there is an edge in the opposite direction, so that (𝑦, 𝑥) is in the relation whenever (𝑥, 𝑦) is in
the relation.
• A relation is antisymmetric if and only if there are never two edges in opposite directions
between distinct vertices.
Solution:
Solution:
1 2
3
4
Example-16: Determine whether the relations for the directed graphs shown in the following figure
are reflexive, symmetric, antisymmetric, and/or transitive.
Solution:
no Reflexive Symmetric Antisymmetric Transitive
(a) NO NO NO NO
(b) NO NO NO NO
(c) YES NO NO YES
(d) NO YES NO NO
Example-17: Write the relation represented by the following digraph and also write the matrix
representing this relation.
(a) (b)
Solution:
(a) 𝑅 = {(𝑎, 𝑎), (𝑎, 𝑏), (𝑏, 𝑎), (𝑏, 𝑏), (𝑏, 𝑐), (𝑐, 𝑏), (𝑐, 𝑎), (𝑎, 𝑐). (𝑑, 𝑑)}
1 1 1 0
1 1 1 0
𝑀𝑅 = [ ]
1 1 0 0
0 0 0 1
(b) 𝑅 = {(𝑎, 𝑎), (𝑎, 𝑏), (𝑏, 𝑎), (𝑏, 𝑏), (𝑐, 𝑐), (𝑐, 𝑑), (𝑑, 𝑐), (𝑑, 𝑑)}
1 1 0 0
1 1 0 0
𝑀𝑅 = [ ]
0 0 1 1
0 0 1 1
Exercise-5:
1. Find the matrix representing the relations 𝑆°𝑅, hence draw the digraph of where the matrices
1 0 1 0 1 0
representing R and S are 𝑀𝑅 = [1 1 0] and 𝑀𝑅 =[0 0 1].
0 0 0 1 0 0
[Winter 2018 – 19] [Winter 2017 – 18]
Check whether the relation 𝑆𝜊𝑅 is reflexive, symmetric. [Winter 2023 – 24]
2. Draw the directed graph and write a matrix representation of the relation 𝑅 on 𝐴 = {1,2,3,4}
where 𝑅 = {(1,1), (1,3), (2,1), (2,3), (2,4), (2, 2), (3,1), (3,2), (3,3), (4,1)} Also, check that the
relation 𝑅 is reflexive, symmetric, transitive, and anti-symmetric? [Winter 2022 - 23]
3. Draw the directed graph for the relation and check whether it satisfies Reflexive, Anti-
symmetric Relation. 𝑅 = {(𝑎, 𝑏)/𝑎 ≠ 𝑏; 𝑎, 𝑏 ∈ 𝐴, 𝐴 = {1,2,3,4} [Winter 2019 – 20]
4. In directed graph if there are never two edges in opposite directions between distinct vertices
then relation is
A) Symmetric B) Anti-Symmetric C) Reflexive D) Transitive
[Summer 2021-2022]
5. Write the relation represented by the following matrices also draw the corresponding digraph.
CLOSURES OF RELATIONS
Introduction
𝑅 may or may not have some property 𝑃, such as reflexivity, symmetry, or transitivity. If there is a
relation 𝑆 with property 𝑃 containing 𝑅 such that 𝑆 is a subset of every relation with property 𝑃
containing 𝑅, then 𝑆 is called the closure of 𝑅.
In other words, 𝑆 is the smallest superset of 𝑅 with the property 𝑃.
Reflexive closure of R
For given a relation R on a set A, the reflexive closure of R can be formed by adding to R all pairs of
the form (𝑎, 𝑎) with 𝑎 ∈ 𝑨, not already in R.
The addition of these pairs produces a new relation that is reflexive, contains R, and is contained within
any reflexive relation containing R. Consequently, it is the reflexive closure of 𝑅.
Thus, the reflexive closure of R can be given by R∪Δ, where 𝛥 = {(𝑎, 𝑎) | 𝑎 ∈ 𝐴}is the diagonal
relation on A.
Example-18:
The relation 𝑅 = {(1,1), (1,2), (2,1), (3,2)} on the set 𝐴 = {1,2,3} is not reflexive. Obtain the
reflexive closure of R.
Solution:
Therefore, the reflexive closure of 𝑅 is 𝑆 = 𝑅 ∪ 𝛥 = {(1,1), (1,2), (2,1), (2,2), (3,2), (3,3)}
Example-19:
What is the reflexive closure of the relation 𝑅 = {(𝑎, 𝑏) | 𝑎 < 𝑏 }on the set of integers?
Solution:
Symmetric Closure of R
The symmetric closure of a relation R can be constructed by adding all ordered pairs of the form (𝑏, 𝑎),
for all (𝑎, 𝑏) that are not already present in R.
Adding these pairs produces a relation that is symmetric, that contains R, and that is contained in any
symmetric relation that contains R. Consequently, it is the symmetric closure of 𝑅.
The symmetric closure of a relation can be constructed by taking the union of a relation with its inverse
i.e., 𝑅 ∪ 𝑅 −1 is the symmetric closure of R, where 𝑅 −1 = {(𝑏, 𝑎) | (𝑎, 𝑏) ∈ 𝑅}.
Example-20:
Find the symmetric closure of the relation{(1,1), (1,2), (2,2), (2,3), (3,1), (3,2)} on {1,2,3}.
Solution:
Example-21:
What is the symmetric closure of the relation 𝑅 = {(𝑎, 𝑏) | 𝑎 > 𝑏 } on the set of positive integers?
Solution:
𝑅 −1 = {(𝑏, 𝑎) | 𝑎 > 𝑏 } = {(𝑎, 𝑏)|𝑏 > 𝑎} = {(𝑎, 𝑏)|𝑎 < 𝑏}
The symmetric closure of R is the relation
𝑅 ∪ 𝑅 −1 = {(𝑎, 𝑏)|𝑎 > 𝑏} ∪ {(𝑎, 𝑏)|𝑎 < 𝑏} = {(𝑎, 𝑏)|𝑎 ≠ 𝑏}
Transitive closure of R:
Suppose that a relation R is not transitive.
Let 𝑀𝑅 be the zero–one matrix of the relation R on a set with 𝑛 elements.
Let 𝑅 ∗ be the transitive closure of 𝑅.
Then the zero–one matrix of the transitive closure 𝑅 ∗ is
𝑀𝑅∗ = 𝑀𝑅 ∨ 𝑀𝑅[2] ∨ 𝑀𝑅[3] ∨···∨ 𝑀𝑅[𝑛] .
Here R∗ is known as connectivity relation.
Example-22:
Find the zero–one matrix of the transitive closure of the relation R where
1 0 1
𝑀𝑅 = [0 1 0]
1 1 0
Solution:
The zero–one matrix of 𝑀𝑅 is 𝑀𝑅∗ = 𝑀𝑅 ∨ 𝑀𝑅[2] ∨ 𝑀𝑅[3] .
Now, 𝑀𝑅[2] is the matrix of the composite relation 𝑅 ∘ 𝑅.
1 1 1
⇒ 𝑴𝑹[𝟐] = [0 1 0]
1 1 1
and 𝑀𝑅[3] is the matrix of the composite relation 𝑅 ∘ 𝑅 2
1 1 1
⇒ 𝑴𝑹[𝟑] = [0 1 0]
1 1 1
Hence,
1 0 1 1 1 1 1 1 1 1 1 1
𝑀𝑅∗ = [0 1 0] ∨ [0 1 0] ∨ [0 1 0] = [0 1 0]
1 1 0 1 1 1 1 1 1 1 1 1
Exercise-6:
1. Find the zero–one matrix of the transitive closure of the relation R where,
1 0 1
𝑀𝑅 = [0 1 0] [Summer 2021-2022]
1 1 0
2. Let R be the relation on the set {0,1,2,3} containing the ordered pairs (0,1), (1,1), (1,2), (2,0),
(2,2), and (3,0). Find a) reflexive closure of R. b) symmetric closure of R.
3. Find the reflexive and symmetric closure of the relation 𝑅 = {(1,1), (1,2), (2,2), (2,3), (3,1),
(3,2)} on {1,2,3}. [Winter 2022-23]
Definition:
Let 𝐴1, 𝐴2, … , 𝐴𝑛 be sets. An n-ary relation on these sets is a subset of 𝐴1 × 𝐴2 × … × 𝐴𝑛.
The sets 𝐴1, 𝐴2, … , 𝐴𝑛 are called the domains of the relation, and n is called its degree.
Example-23:
Let R be the relation on ℕ × ℕ × ℕ consisting of triples (𝑎, 𝑏, 𝑐), where 𝑎, 𝑏, 𝑎𝑛𝑑 𝑐 are integers with
𝑎 < 𝑏 < 𝑐. Then find its domain and degree of this relation.
Solution:
Then (1, 2, 3) ∈ 𝑅, but (2, 4, 3) ∉ 𝑅. The degree of this relation is 3. Its domains are all equal to
the set of natural numbers.
Example-24:
Let 𝑅 be the relation on ℤ × ℤ × ℤ consisting of all triples of integers (𝑎, 𝑏, 𝑐) in which 𝑎, 𝑏, 𝑎𝑛𝑑 𝑐
form an arithmetic progression. That is, (𝑎, 𝑏, 𝑐) ∈ 𝑅 if and only if there is an integer 𝑘 such that
𝑏 = 𝑎 + 𝑘 and 𝑐 = 𝑎 + 2𝑘, or equivalently, such that 𝑏 − 𝑎 = 𝑘 and 𝑐 − 𝑏 = 𝑘. Find the
domain and degree of this relation.
Solution:
Note that (1, 3, 5) ∈ 𝑅 because 3 = 1 + 2 and 5 = 1 + 2 ・ 2, but (2, 5, 9) ∉ 𝑅 because 5 −
2 = 3 while 9 − 5 = 4. This relation has degree 3 and its domains are all equal to the set of
integers.
Example-25:
Let R be the relation consisting of 5 − 𝑡𝑢𝑝𝑙𝑒𝑠 (𝐴, 𝑁, 𝑆, 𝐷, 𝑇 ) representing airplane flights, where 𝐴
is the airline, 𝑁 is the flight number, 𝑆 is the starting point, 𝐷 is the destination, and 𝑇 is the
departure time.
For instance, if Nadir Express Airlines has flight 963 from Newark to Bangor at 15:00, then (Nadir,
963, Newark, Bangor, 15:00) belongs to R. Find the domain and degree of the relation.
Solution:
The degree of this relation is 5, and its domains are the set of all airlines, the set of flight numbers,
the set of cities, the set of cities (again), and the set of times.
Selection operator-Definition:
Let R be an 𝑛 − 𝑎𝑟𝑦 relation and C be a condition that elements in 𝑅 may satisfy. Then the selection
operator 𝑆𝑐 maps the 𝑛 − 𝑎𝑟𝑦 relation 𝑅 to the 𝑛 − 𝑎𝑟𝑦 relations of all n-tuples from R that satisfy the
condition 𝐶.
Projection operator-Definition:
The projection 𝑃𝑖1𝑖2 ,…,𝑖𝑚 where 𝑖1 < 𝑖2 < ⋯ < 𝑖𝑚 , maps the n-tuple (𝑎1 , 𝑎2 , … , 𝑎𝑛 ) to the m-tuple
(𝑎𝑖1 , 𝑎𝑖2 , . . . , 𝑎𝑖𝑚 ), where 𝑚 ≤ 𝑛.
In other words, the projection 𝑃𝑖1 𝑖2,…,𝑖𝑚 deletes 𝑛 − 𝑚 of the components of an n-tuple, leaving the
𝑖1𝑡ℎ , 𝑖2𝑡ℎ , . . ., and 𝑖𝑚
𝑡ℎ
components.
Example-26:
Consider the student records given by the following table.
Solution:
A sample database of six such records is
(𝐴𝑐𝑘𝑒𝑟𝑚𝑎𝑛𝑛, 231455, 𝐶𝑜𝑚𝑝𝑢𝑡𝑒𝑟 𝑆𝑐𝑖𝑒𝑛𝑐𝑒, 3.88)
(𝐴𝑑𝑎𝑚𝑠, 888323, 𝑃ℎ𝑦𝑠𝑖𝑐𝑠, 3.45)
(𝐶ℎ𝑜𝑢, 102147, 𝐶𝑜𝑚𝑝𝑢𝑡𝑒𝑟 𝑆𝑐𝑖𝑒𝑛𝑐𝑒, 3.49)
(𝐺𝑜𝑜𝑑𝑓𝑟𝑖𝑒𝑛𝑑, 453876, 𝑀𝑎𝑡ℎ𝑒𝑚𝑎𝑡𝑖𝑐𝑠, 3.45)
(𝑅𝑎𝑜, 678543, 𝑀𝑎𝑡ℎ𝑒𝑚𝑎𝑡𝑖𝑐𝑠, 3.90)
(𝑆𝑡𝑒𝑣𝑒𝑛𝑠, 786576, 𝑃𝑠𝑦𝑐ℎ𝑜𝑙𝑜𝑔𝑦, 2.99).
To find the records of computer science majors in the 𝑛 − 𝑎𝑟𝑦 relation 𝑅 shown in the above table,
we use the operator 𝑆𝑐1 , where 𝑐1 is the condition 𝑀𝑎𝑗𝑜𝑟 = “𝐶𝑜𝑚𝑝𝑢𝑡𝑒𝑟 𝑆𝑐𝑖𝑒𝑛𝑐𝑒” The result is the
two 4-tuples (𝐴𝑐𝑘𝑒𝑟𝑚𝑎𝑛𝑛, 231455, 𝐶𝑜𝑚𝑝𝑢𝑡𝑒𝑟 𝑆𝑐𝑖𝑒𝑛𝑐𝑒, 3.88) and
(𝐶ℎ𝑜𝑢, 102147, 𝐶𝑜𝑚𝑝𝑢𝑡𝑒𝑟 𝑆𝑐𝑖𝑒𝑛𝑐𝑒, 3.49).
Similarly, to find the records of students who have a grade point average above 3.5 in this database,
we use the operator 𝑆𝑐2 , where 𝑐2 is the condition 𝐺𝑃𝐴 > 3.5. The result is the two 4-tuples
(𝐴𝑐𝑘𝑒𝑟𝑚𝑎𝑛𝑛, 231455, 𝐶𝑜𝑚𝑝𝑢𝑡𝑒𝑟 𝑆𝑐𝑖𝑒𝑛𝑐𝑒, 3.88) and (𝑅𝑎𝑜, 678543, 𝑀𝑎𝑡ℎ𝑒𝑚𝑎𝑡𝑖𝑐𝑠, 3.90).
Finally, to find the records of computer science majors who have a GPA above 3.5, we use the operator
𝑆𝑐3 , where 𝐶3 is the condition (𝑀𝑎𝑗𝑜𝑟 = “𝐶𝑜𝑚𝑝𝑢𝑡𝑒𝑟 𝑆𝑐𝑖𝑒𝑛𝑐𝑒” ∧ 𝐺𝑃𝐴 > 3.5). The result consists
of the single 4-tuple (𝐴𝑐𝑘𝑒𝑟𝑚𝑎𝑛𝑛, 231455, 𝐶𝑜𝑚𝑝𝑢𝑡𝑒𝑟 𝑆𝑐𝑖𝑒𝑛𝑐𝑒, 3.88).
When the projection 𝑃1,4 is used, the second and third columns of the table are deleted, and pairs
representing student names and grade point averages are obtained. The following table displays the
results of this projection.
Join operator- Definition:
Let 𝑅 be a relation of degree 𝑚 and 𝑆 be a relation of degree 𝑛. The join 𝐽𝑃 (𝑅, 𝑆), where 𝑝 ≤ 𝑚 and
𝑝 ≤ 𝑛, is a relation of degree 𝑚 + 𝑛 − 𝑝 that consists of all (𝑚 + 𝑛 − 𝑝) − 𝑡𝑢𝑝𝑙𝑒𝑠
(𝑎1 , 𝑎2 , … 𝑎𝑚−𝑝 , 𝑐1 , 𝑐2 , … 𝑐𝑝 , 𝑏1 , 𝑏2 , … , 𝑏𝑛−𝑝 ), where the m-tuple
(𝑎1 , 𝑎2 , … 𝑎𝑚−𝑝 , 𝑐1 , 𝑐2 , … 𝑐𝑝 ) belongs to R and the n-tuple (𝑐1 , 𝑐2 , … 𝑐𝑝 , 𝑏1 , 𝑏2 , … , 𝑏𝑛−𝑝 ) belongs to S.
In other words, the join operator 𝐽𝑃 produces a new relation from two relations by combining all m-
tuples of the first relation with all n-tuples of the second relation, where the last p components of the
m-tuples agree with the first p components of the n-tuples
Example-27: What relation results when the join operator J2 is used to combine the relation
displayed in the following tables?
The join 𝐽2 produces a member of relation as (𝐶𝑟𝑢𝑧, 𝑍𝑜𝑜𝑙𝑜𝑔𝑦, 335, 𝐴100,9: 00𝐴. 𝑀. ) by joining the
members (𝐶𝑟𝑢𝑧, 𝑍𝑜𝑜𝑙𝑜𝑔𝑦, 335) and (𝑍𝑜𝑜𝑙𝑜𝑔𝑦, 335, 𝐴100,9: 00𝐴. 𝑀. )
The relation thus produced is shown in the following table.
Exercise-7:
1. Consider the following Tables.
a. What do you obtain when you apply the selection operator SC , where C is the condition
(𝑃𝑟𝑜𝑗𝑒𝑐𝑡 = 2) ∧ (𝑄𝑢𝑎𝑛𝑡𝑖𝑡𝑦 ≥ 50), to the database in the table of Parts_inventory.?
b. Construct the table obtained by applying the join operator J2 to the relations in the following
tables
Theorem:
The set of real numbers is not countable
Proof:
Suppose that 𝑓 ∶ ℕ → [0,1] is any function.
Make a table of values of 𝑓, where the 1st row contains the decimal expansion of 𝑓(1), the 2nd row
contains the decimal expansion of 𝑓(2), . . . the nth row contains the decimal expansion of 𝑓(𝑛), …
Perhaps, 𝑓(1) = 𝜋/10 , 𝑓(2) = 37/99, 𝑓(3) = 1/7, 𝑓(4) = √2/2, 𝑓(5) = 3/8, and so on, so
that the table starts out like this.
The highlighted digits are 0.37210 . . . . Suppose that we add 1 to each of these digits, to get the
number
0.48321 . . . . then this number can’t be in the table. Because
• it differs from f(1) in its first digit;
• it differs from f(2) in its second digit;
•...
• it differs from f(n) in its nth digit;
•...
So it can’t equal f(n) for any n — that is, it can’t appear in the table
This looks like a trick, but in fact there are lots of numbers that are not in the table.
As long as we highlight at least one digit in each row and at most one digit in each column, we can
change each the digits to get another number not in the table.
Therefore, there does not exist a bijection between ℕ and [0, 1].
Hence, [0,1] is not a countable set.
Since, cardinality of ℝ and [0,1] is same, ℝ is also uncountable.
Schroder-Bernstein Theorem
If A and B are sets with |𝐴| ≤ |𝐵| and |𝐵| ≤ |𝐴|, then |𝐴| = |𝐵|. In other words, if there are one-
to-one functions f from A to B and g from B to A, then there is a one-to-one correspondence between
A and B.
Hasse Diagrams
- Many edges in the directed graph for a finite poset do not have to be shown because they must
be present.
- For instance, consider the directed graph for the partial ordering {(a, b) | a ≤ b} on the set {1,
2, 3, 4}, shown in Figure-1(a).
- Because this relation is a partial ordering, it is reflexive, and its directed graph has loops at all
vertices.
- Consequently, we do not have to show these loops because they must be present; in Figure-
1(b) loops are not shown.
- Because a partial ordering is transitive, we do not have to show those edges that must be
present because of transitivity.
Figure -1
- For example, in Figure 2(c) the edges (1, 3), (1, 4), and (2, 4) are not shown because they
must be present. If we assume that all edges are pointed “upward” (as they are drawn in the
figure), we do not have to show the directions of the edges;
- Figure 2(c) does not show directions.
- In general, we can represent a finite poset (S, ) as a Hasse Diagram, using this procedure:
Step-1: Start with the directed graph for this relation.
Step-2: Because a partial ordering is reflexive, a loop (a, a) is present at every vertex a.
Remove these loops.
Step-3: Remove all edges that must be in the partial ordering because of the presence of other
edges and transitivity. That is, remove all edges (x, y) for which there is an element
z ∈ S such that x ≺ z and z ≺ x.
Step-4: Finally, arrange each edge so that its initial vertex is below its terminal vertex.
Step-5: Remove all the arrows on the directed edges, because all edges point “upward” toward their
terminal vertex.
These steps are well defined, and only a finite number of steps need to be carried out for
a finite poset. When all the steps have been taken, the resulting diagram contains sufficient
information to find the partial ordering, as we will explain later. The resulting diagram is called the
Hasse diagram of (S, ).
Example-28: Draw the Hasse diagram representing the partial ordering {(a, b) |a divides b} on
{1, 2, 3, 4, 6, 8, 12}.
Figure- 2
Solution:
Step-1: Begin with the digraph for this partial order, as shown in Figure 2(a).
Step-2: Remove all loops, as shown in Figure 2(b). Then delete all the edges implied by the transitive
property. These are (1, 4), (1, 6), (1, 8), (1, 12), (2, 8), (2, 12), and (3, 12).
Step-3: Arrange all edges to point upward, and delete all arrows to obtain the Hasse diagram. The
resulting Hasse diagram is shown in Figure 2(c).
Example-29: Draw the Hasse diagram for the partial ordering {(A, B) | A ⊆ B} on the power set P(S)
where, S = {a, b, c}.
Solution:
The Hasse diagram for this partial ordering is obtained from the associated digraph by deleting all the
loops and all the edges that occur from transitivity, namely, (∅, {a, b}), (∅, {a, c}), (∅, {b, c}), (∅, {a,
b, c}), ({a}, {a, b, c}), ({b}, {a, b, c}), and ({c}, {a, b, c}). Finally, all edges point upward, and arrows
are deleted.
The resulting Hasse diagram is illustrated in Figure 3.
Figure-3
Maximal and Minimal Elements:
Maximal element:
- An element of a poset is called maximal if it is not less than any element of the poset. That is,
a is maximal in the poset (S, ) if there is no b ∈ S such that a ≺ b.
Minimal element:
An element of a poset is called minimal if it is not greater than any element of the poset. That is, a is
minimal if there is no element b ∈ S such that b ≺ a.
Remark: Maximal and minimal elements are easy to spot using a Hasse diagram. They are the “top”
and “bottom” elements in the diagram.
Example-30: Which elements of the poset ({2, 4, 5, 10, 12, 20, 25}, | ) are maximal, and
which are minimal?
Solution:
The Hasse diagram in Figure-4 for this poset shows that the maximal elements
are 12, 20, and 25, and the minimal elements are 2 and 5. As this example shows, a poset
can have more than one maximal element and more than one minimal element.
Figure-4
Greatest Element:
- Sometimes there is an element in a poset that is greater than every other element. Such an
element is called the greatest element. That is, b is the greatest element of the poset (S, ) if
a < b for all b ∈ S.
Least Element:
- An element is called the least element if it is less than all the other elements in the
poset. That is, a is the least element of (S, ) if a < b for all b ∈ S.
Remark: The greatest and least elements are unique when it exists.
Example-31: Determine whether the posets represented by each of the Hasse diagrams in Figure-5
have a greatest element and a least element.
Figure-5
Solution:
- The least element of the poset with Hasse diagram (a) is a. This poset has no greatest
element.
- The poset with Hasse diagram (b) has neither a least nor a greatest element.
- The poset with Hasse diagram (c) has no least element. Its greatest element is d.
- The poset with Hasse diagram (d) has least element a and greatest element d.
Example-32: Let S be a set. Determine whether there is a greatest element and a least element in the
poset (P (S), ⊆).
Solution:
The least element is the empty set, because ∅ ⊆ T for any subset T of S. The set S is the
greatest element in this poset, because T ⊆ S whenever T is a subset of S.
Example-33: Is there a greatest element and a least element in the poset (Z+, | )?
Solution:
The integer 1 is the least element because 1|n whenever n is a positive integer. because
there is no integer that is divisible by all positive integers, there is no greatest element.
Upper Bound:
Sometimes it is possible to find an element that is greater than or equal to all the elements
in a subset A of a poset (S, ). If u is an element of S such that a u for all elements a ∈ A,
then u is called an upper bound of A.
Lower Bound:
- There may be an element less than or equal to all the elements in A. If l is an element of S
such that l a for all elements a ∈ A, then l is called a lower bound of A.
Example-34: Find the lower and upper bounds of the subsets {a, b, c}, {j, h}, and {a, c, d, f} in the
poset with the Hasse diagram shown in Figure 7.
Figure-7
Solution:
- The upper bounds of {a, b, c} are e, f, j, and h, and its only lower bound is a.
- There are no upper bounds of {j, h}, and its lower bounds are a, b, c, d, e, and f.
- The upper bounds of {a, c, d, f} are f, h, and j, and its lower bound is a.
Remarks:
- The greatest lower bound and least upper bound of A is unique if it exists.
- If A has an upper bound, A is bounded above, and if A has a lower bound, A is bounded below
and A is bounded if A has an upper and lower bound.
Example-35: Find the greatest lower bound and the least upper bound of {b, d, g}, if they exist, in
the poset shown in Figure 7.
Solution:
The upper bounds of {b, d, g} are g and h. Because g ≺ h, g is the least upper bound. The
lower bounds of {b, d, g} are a and b. Because a ≺ b, b is the greatest lower bound.
Example-9: Find the greatest lower bound and the least upper bound of the sets {3, 9, 12}
and {1, 2, 4, 5, 10}, if they exist, in the poset (Z+, |).
Solution:
An integer is a lower bound of {3, 9, 12} if 3, 9, and 12 are divisible by this integer.
The only such integers are 1 and 3. Because 1 | 3, 3 is the greatest lower bound of
{3, 9, 12}. The only lower bound for the set {1, 2, 4, 5, 10} with respect to | is the element 1.
Hence, 1 is the greatest lower bound for {1, 2, 4, 5, 10}.
An integer is an upper bound for {3, 9, 12} if and only if it is divisible by 3, 9, and 12.
The integers with this property are those divisible by the least common multiple of 3, 9, and
12, which is 36. Hence, 36 is the least upper bound of {3, 9, 12}. A positive integer is an
upper bound for the set {1, 2, 4, 5, 10} if and only if it is divisible by 1, 2, 4, 5, and 10. The
integers with this property are those integers divisible by the least common multiple of these
integers, which is 20. Hence, 20 is the least upper bound of {1, 2, 4, 5, 10}.
Lattices:
A partially ordered set in which every pair of elements has both a least upper bound and a
greatest lower bound is called a lattice.
Example-36: Determine whether the posets represented by each of the Hasse diagrams in
Figure 8 are lattices.
Figure-8
Solution:
The posets represented by the Hasse diagrams in (a) and (c) are both lattices because
in each poset every pair of elements has both a least upper bound and a greatest lower bound,
as the reader should verify. On the other hand, the poset with the Hasse diagram shown in (b)
is not a lattice, because the elements b and c have no least upper bound. To see this, note that
each of the elements d, e, and f is an upper bound, but none of these three elements precedes
the other two with respect to the ordering of this poset.
Example-38: Determine whether the posets ({1, 2, 3, 4, 5}, |) and ({1, 2, 4, 8, 16}, |) are
lattices.
Solution:
Because 2 and 3 have no upper bounds in ({1, 2, 3, 4, 5}, |), they certainly do not have a
least upper bound. Hence, the first poset is not a lattice.
Every two elements of the second poset have both a least upper bound and a greatest lower
bound. The least upper bound of two elements in this poset is the larger of the elements
and the greatest lower bound of two elements is the smaller of the elements, as the reader
should verify. Hence, this second poset is a lattice.
diagram for the relation have a greatest element and a least element.
2. Draw the Hasse diagram for the “greater than or equal to” relation on set S = 0,1, 2,3, 4,5 .
b. S = 1, 2,3,5,7,11,13 .
( a, a ) , ( a, b ) , ( a, c ) , ( a, d ) , ( a, e ) , ( b, b ) , ( b, c ) , ( b, e ) , ( c, c ) ,
R=
( c, e ) , ( d , d ) , ( d , e ) , ( e, e )
The Hasse diagram of the partial order ( X , R ) is shown below:
The minimum number of ordered pairs that need to be added to R to make ( X , R ) a lattice is?