Professional Documents
Culture Documents
Unit-I
Set Theory & Relations, POSET & Lattices
Contents
Topic Page No.
Sets 1-22
Relations 23-35
POSET 36-44
Lattice 45-63
Sets
It is common for sets to be denoted using uppercase letters. Lowercase letters are usually used to
denote elements of sets. There are several ways to describe a set. One way is to list all the
members of a set, when this is possible. We use a notation where all members of the set are listed
between braces. For example, the notation {a, b, c, d} represents the set with the four elements a,
b, c, and d. This way of describing a set is known as the roster method.
Page 1 of 63
Sets as elements of a set
Equality of Sets
The sets {1, 3, 5} and {3, 5, 1} are equal, because they have the same elements. Note that the order
in which the elements of a set are listed does not matter. Note also that it does not matter if an
element of a set is listed more than once, so {1, 3, 3, 3, 5, 5, 5, 5} is the same as the set {1, 3, 5}
because they have the same elements.
Page 2 of 63
Empty Set
THE EMPTY SET There is a special set that has no elements. This set is called the empty set, or
null set, and is denoted by ∅. The empty set can also be denoted by { } (that is, we represent the
empty set with a pair of braces that encloses all the elements in this set). Often, a set of elements
with certain properties turns out to be the null set. For instance, the set of all positive integers that
are greater than their squares is the null set.
Singleton Set
A set with one element is called a singleton set. A common error is to confuse the empty {∅} has
one more element than ∅. set ∅ with the set {∅}, which is a singleton set. The single element of the
set {∅} is the empty set itself! A useful analogy for remembering this difference is to think of
folders in a computer file system. The empty set can be thought of as an empty folder and the set
consisting of just the empty set can be thought of as a folder with exactly one folder inside,
namely, the empty folder.
Venn Diagrams
Sets can be represented graphically using Venn diagrams, named after the English mathematician
John Venn, who introduced their use in 1881. In Venn diagrams the universal set U, which
contains all the objects under consideration, is represented by a rectangle. (Note that the universal
set varies depending on which objects are of interest.) Inside this rectangle, circles or other
geometrical figures are used to represent sets. Sometimes points are used to represent the particular
elements of the set. Venn diagrams are often used to indicate the relationships between sets.
Page 3 of 63
Page 4 of 63
Theorem 1: Show that every nonempty set S is guaranteed to have at least two subsets, the empty
set and the set S itself, that is, ∅ ⊆ S and S ⊆ S. i.e.,
is true.
A useful way to show that two sets have the same elements is to show that each set is a subset of
the other. In other words, we can show that if A and B are sets with A ⊆ B and B ⊆ A, then A = B.
That is, A = B if and only if ∀x(x ∈ A → x ∈ B) and ∀x(x ∈ B → x ∈ A) or equivalently if and
only if ∀x(x ∈ A ↔ x ∈ B), which is what it means for the A and B to be equal. Because this
method of showing two sets are equal is so useful, we highlight it here.
Page 5 of 63
The Size of a Set
Partition of a set
A partition of a set S is a collection of disjoint nonempty subsets of S that have S as their union. In
other words, the collection of subsets Ai, i ∈ I (where I is an index set) forms a partition of S if and
only if forms a partition of S if and only if
Page 6 of 63
Page 7 of 63
Page 8 of 63
What is the Cartesian product A × B × C, where A = {0, 1}, B = {1, 2}, and C = {0, 1, 2} ?
Solution: The Cartesian product A × B × C consists of all ordered triples (a, b, c), where a ∈ A, b
∈ B, and c ∈ C. Hence, A × B × C = {(0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 2, 0), (0, 2, 1), (0, 2, 2), (1, 1,
0), (1, 1, 1),(1, 1, 2), (1, 2, 0), (1, 2, 1), (1, 2, 2)}.
Remark: Note that when A, B, and C are sets, (A × B) × C is not the same as A × B × C
P2.
Page 9 of 63
P3.
P4.
P5.
P6.
P7.
Page 10 of 63
P8.
P9.
P10.
Combination of Sets
Union of sets
Page 11 of 63
Intersection of the sets
Disjoint Sets
Principle Of Inclusion–Exclusion
Page 12 of 63
enumeration.
Example
Among a group of students, 49 study Physics, 37 study English and 21 study Biology. If 9 of
these students study Physics and English, 5 study English and Biology, 4 study Physics and
Biology and 3 study Physics, English and Biology, find the number of students in the group.
Solution:
Let P represent the number of students who study Physics, E represents the number of students
who study English, and B represents the number of students who study Biology.
n(P⋂E) = 9
n(E⋂B) = 5
n(P⋂B) = 4
n(P⋂E⋂B) = 3
= 49 + 37 + 21 – 9 – 5 – 4 + 3
= 92 is the answer.
Page 13 of 63
Difference between sets
Examples
Page 14 of 63
Complement of a set
Examples
Page 15 of 63
Set Identities Table 1
Page 16 of 63
Proof of De Morgan Law
Page 17 of 63
Proof
Example
Page 18 of 63
Union and Intersection of Collection of Sets
P2.
Page 19 of 63
P3.
P4.
P5.
P6.
P7.
P8.
P9.
Page 20 of 63
P10.
P11.
Multisets
Fuzzy Sets
Page 21 of 63
Page 22 of 63
Relations
Note: A relation can be used to express a one-to-many relationship between the elements of the
sets A and B, where an element of A may be related to more than one element of B. A function
represents a relation where exactly one element of B is related to each element of A.
Page 23 of 63
No. of Relations on a set
Page 24 of 63
Properties of Relations
Reflexive Relation
A relation R on a set A is called reflexive if (a, a) ∈ R for every element a ∈ A.
Problem 1:
How many reflexive relations are there on a set with n elements?
Page 25 of 63
Symmetric Relation
That is, a relation is symmetric if and only if a is related to b implies that b is related to a.
Antisymmetric Relation
A relation is antisymmetric if and only if there are no pairs of distinct elements a and b with a
related to b and b related to a. That is, the only way to have a related to b and b related to a is for a
and b to be the same element. The terms symmetric and antisymmetric are not opposites, because a
relation can have both of these properties or may lack both of them. A relation cannot be both
symmetric and antisymmetric if it contains some pair of the form (a, b), where a not equal to b.
Example 1:
Page 26 of 63
Which of the relations are symmetric and which are antisymmetric?
Example 2:
Transitive Relation
Page 27 of 63
Example 1:
Which of the following relations are transitive?
Combining Relations
Composite Relations
Computing the composite of two relations requires that we find elements that are the second
element of ordered pairs in the first relation and the first element of ordered pairs in the second
relation.
Page 28 of 63
Examples:
Example
Inverse of a relation
Page 29 of 63
Page 30 of 63
Complement of a relation
Complement of a relation will contain all the pairs where pair do not belong to relation but belongs
to Cartesian product.
Page 31 of 63
Equivalence Relations
Example 1:
The relation “is equal to”, denoted “=”, is an equivalence relation on the set of real
numbers since for any x, y, z ∈ R:
(Reflexivity) x = x,
(Symmetry) if x = y then y = x,
(Transitivity) if x = y and y = z then x = z.
Example 2:
Let R be the relation on the set of real numbers such that aRb if and only if a − b is an integer. Is R
an equivalence relation?
Example 3:
\\
Page 32 of 63
Practice Problems on Relations
Problem 1
Problem 2
Problem 3
Problem 4
Page 33 of 63
Problem 5
Problem 6
Problem 7
Problem 8
Page 34 of 63
Problem 9
Problem 10
Let R be the relation on the set of all sets of real numbers such that SRT if and only if S and T have
the same cardinality. Show that R is an equivalence relation.
Page 35 of 63
POSET & Lattices
Partial Order Relation and Partially Ordered Set (POSET)
Example 1: Show that the “greater than or equal” relation (≥) is a partial ordering on the set
of integers.
Note:
Example 2: The divisibility relation | is a partial ordering on the set of positive integers, because it
is reflexive, antisymmetric, and transitive. We see that (Z+, |) is a poset. Recall that (Z+ denotes the
set of positive integers.)
Example 3:
Observe that in a partially ordered set every pair of elements need not be comparable.
Example 1:
Page 36 of 63
Totally Ordered Set (TOSET)
When every two elements in the set are comparable, the relation is called a total ordering.
Examples
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.
Example 1: The directed graph of the relation R = {(1, 1), (1, 3), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2),
(4, 1)} on the set {1, 2, 3, 4} is shown below:
Page 37 of 63
Hasse Diagram
A Hasse diagram is a graphical representation of the relation of elements of a
partially ordered set (POSET) with an implied upward orientation. Hasse diagram of
(S, ≤), named after the twentieth-century German mathematician Helmut Hasse.
A point is drawn for each element of the partially ordered set (POSET) and joined
with the line segment according to the following rules:
If a < b in the POSET, then the point corresponding to a appears lower in the
drawing than the point corresponding to b.
The two points a and b will be joined by line segment if a is related to b.
Example-1: Draw Hasse diagram for ({3, 4, 12, 24, 48, 72}, / )
Explanation – According to above given question, first we have to find the POSET for the
divisibility.
Let the set is A and the POSET is P then P = (A, /) and defined as
{(3 < 12), (3 < 24), (3 < 48), (3 < 72), (4 <12), (4 <24), (4 <48), (4 <72), (12 <24), (12 <48),
(12 <72), (24 <48), (24 <72)}
So, now the Hasse diagram will be:
In above diagram, 3 and 4 are at same level because they are not related to each other and they
Page 39 of 63
are smaller than other elements in the set. The next succeeding element for 3 and 4 is 12 i.e, 12 is
divisible by both 3 and 4. Then 24 is divisible by 3, 4 and 12. Hence, it is placed above 12. 24
divides both 48 and 72 but 48 does not divide 72. Hence 48 and 72 are not joined.
We can see transitivity in our diagram as the level is increasing.
Example-2:
Draw the Hasse diagram for the partial ordering {(A, B) | A ⊆ B} on the power set P (S) where S =
{a, b, c}.
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 given
below.
Similarly, 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.
Maximal and minimal elements are easy to spot using a Hasse diagram. They are the “top” and
“bottom” elements in the diagram.
Example 1: Which elements of the poset ({2, 4, 5, 10, 12, 20, 25}, |) are maximal, and which are
minimal?
Solution: The Hasse diagram in Figure given below 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
Page 40 of 63
minimal element.
Example 2: Determine whether the posets represented by each of the Hasse diagrams in
Figure below have a greatest element and a least element.
Solution:
The poset with Hasse diagram (a) has least element 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 3: Let S be a set. Determine whether there is a greatest element and a least element
in the poset (P (S), ⊆).
Page 41 of 63
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 4: 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.
Example 1: 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 below.
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.
Page 42 of 63
Example 2:
Similarly, the element y is called the greatest lower bound (GUB) of A if y is a lower bound of
A and z ≤ y whenever z is a lower bound of A. The greatest lower bound of A is unique if it
exists. The greatest lower bound and least upper bound of a subset A are denoted by GLB(A)
and LUB(A), respectively.
Example 1: Find the greatest lower bound and the least upper bound of {b, d, g}, if they exist, in
the poset shown below:
Page 43 of 63
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 2:
Page 44 of 63
Lattices
To understand lattice we first need to understand join semi lattice and meet semi lattice.
Join Semilattice
Page 45 of 63
Page 46 of 63
Meet Semilattice
Page 47 of 63
Page 48 of 63
Page 49 of 63
Lattice
Definition 1: A poset in which every pair of elements has both a least upper bound and a
greatest lower bound is called a lattice.
Definition 2: A poset is called a lattice iff it is a join semi lattice and a meet semi lattice.
Example 1: Determine whether the posets represented by each of the Hasse diagrams in
Figure given below are lattices.
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.
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
Page 50 of 63
elements precedes the other two with respect to the ordering of this poset.
Example 3:
Page 51 of 63
Sublattice
Example 1: The lattice Dn of all positive divisors of n is a sublattice of the lattice Z+ under the
relation of divisibility.
Example 2:
Page 52 of 63
Properties of Lattice
1. Idempotent Properties
a) a v a = a
b) a Λ a = a
2. Commutative Properties
a) a v b = b v a
b) a Λ b = b Λ a
3. Associative Properties
a) a v (b v c)= (a v b) v c
b) a Λ(b Λ c)= (a Λ b) Λ c
4. Absorption Properties
a) a v (a Λ b) = a
b) a Λ (a v b) = a
Types of Lattice
1. Bounded Lattice
Page 53 of 63
Page 54 of 63
2. Complemented Lattice
A lattice L is said to be complemented if it is bounded and if every element in L has a complement.
Page 55 of 63
Page 56 of 63
Page 57 of 63
DIY Problem
3. Distributed Lattice
Page 58 of 63
Page 59 of 63
Page 60 of 63
Page 61 of 63
4. Modular Lattice
5. Complete Lattice
Page 62 of 63
References:
1. Koshy, Discrete Structures, Elsevier Pub. 2008 Kenneth H. Rosen, Discrete Mathematics
and Its Applications, 6/e, McGraw-Hill, 2006.
2. B. Kolman, R.C. Busby, and S.C. Ross, Discrete Mathematical Structures, 5/e, Prentice
Hall, 2004.
3. https://www.nesoacademy.org/cs/07-discrete-mathematics/06-lattices/01-meet-
semilattice
4. https://www.geeksforgeeks.org/discrete-mathematics-tutorial/
Page 63 of 63