Unit I
Unit I
Semester-III (MATHEMATICS)
Unit I – Sets:
Definition, equality of sets, finite and infinite sets, subsets, operations on sets, De
Morgan's Laws, power sets, First principle of mathematical induction, applications of
inductions.
1.2 Introduction:
In this section, we study the fundamental discrete structure on which all other discrete
structures are built, namely, the set. Sets are used to group objects together. Often, but
not always, the objects in a set have similar properties. For instance, all the students
who are currently enrolled in college make up a set. Likewise, all the students currently
taking a course in discrete mathematics at any school make up a set. In addition, those
students enrolled in your school who are taking a course in discrete mathematics form
a set that can be obtained by taking the elements common to the first two collections.
A set is an unordered collection of objects, called elements or members of the set. A set
is said to contain its elements. We write a ∈ A to denote that a is an element of the set
A. The notation a ∉ A denotes that a is not an element of the set A.
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(Framing).
For example, the notation {a,b,c,d} represents the set with the four elements a,b,c, and
d.
Remember:
N={1,2,3,...}, the set of natural numbers
W={0,1,2,3,...}, the set of whole numbers
Z ={...,−2,−1,0,1,2,...}, the set of integers
Z+ ={1,2,3,...}, the set of positive integers
Q={p/q | p ∈ Z, q ∈ Z, and q≠0},the set of rational numbers
R, the set of real numbers
R+, the set of positive real numbers
C, the set of complex numbers
Example 1 The set V of all vowels in the English alphabet can be written as
V ={a,e,i,o,u}.
Example 2 The set O of odd positive integers less than 10 can be expressed by
O ={1,3,5,7,9}.
Example 3 The set of positive integers less than 100 can be denoted by {1,2,3,...,99}.
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.
Example 3. Draw Venn diagram that represents V, the set of vowels in the English
alphabet.
A set is any well-defined collection of objects, called the elements or members of the
set. For example, the collection of all wooden chairs, the collection of all one- legged
black birds, or the collection of real numbers between zero and one is each a set. Well
defined just means it is possible to decide if a given object belongs to the collection or
not. Almost all mathematical objects are first of all sets, regard-less of any additional
properties that they may possess. Thus, set theory is, in a sense, the foundation on which
virtually all of mathematics is constructed. In spite of this, set theory (at least the
informal brand we need) is easy to learn and use. One way of describing a set that has
a finite number of elements is by listing the elements of the set between braces. Thus
the set of all positive integers that are less than 4 can be written as
{1, 2, 3}…………..(1)
The order in which the elements of a set are listed is not important. Thus {1, 3, 2}, {3,
2, 1}, {3, 1, 2}, {2, 1, 3}, and {2, 3, 1} are all representations of the set given in (1).
Moreover, repeated elements in the listing of the elements of a set can be ignored. Thus
{1, 3, 2, 3, 1} is another representation of the set given in (1).
We use uppercase letters such as A, B, C to denote sets and lowercase letters such as a,
b, c, x, y, z, t to denote the members (or elements) of sets.
We indicate the fact that r is an element of the set A by writing x ∈ A. We also indicate
the fact that x is not an element of A by writing x ∉ A.
We use the notation P(x) to denote a sentence or statement P concerning the variable
object x. The set defined by P(x) written x | P(x) is just the collection of all objects x
for which P is sensible and true.
For example, x |x is a positive integer less than 4 is the set {1, 2, 3} described in (1) by
listing its elements.
Example 5. The set consisting of all the letters in the word "byte" can be denoted by
{b, y, t, e} or by {x |x is a letter in the word "byte"}.
Example 6. We introduce here several sets and their notations that will be used
throughout this book.
(e) The set that has no elements in it is denoted either by { } or the symbol and is called
Ø the empty set.
Definition 1: Two sets are equal if and only if they have the same elements. Therefore,
if A and B are sets, then A and B are equa
l if and only if ∀ x(x ∈ A ↔ x ∈ B).We write A = B if A and B are equal sets.
OR
Definition 2. Let A and B be sets. Then, A = B or A is equal to B if both A and B have
the same elements.
Example3. 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 {3,5,1}
is the same as the set {1, 3,5} because they have the same elements.
The word if has a special meaning when used in definitions. Definition 1 states that
A=B if A and B have the same elements. Since the word if is inside a definition, it is
implied that A ≠ B whenever the condition is not satisfied. Thus, "A = B" is just a short
way to say "A and B have the same elements."
Examples.
= 𝑥 2 + 2𝑥 + 1 − 𝑥 2 + 2𝑥 − 1- 4𝑥
=0
is an algebraic identity (true for all x). The empty set 0 can be described in several ways;
for example
{ 𝑥 𝜖 N: x < x} equal to the set of round squares? We know that if two sets are equal,
then they must have the same elements.
then there is an element in one of these sets that is not in the other set. This cannot be
true, however, since neither set has any elements at all.
Some sets are infinite sets, or not finite sets, like Z, R, and N. There is no way to match
all the elements of Z with a set {1, 2, ..... n} for any fixed n.
In this case, n is called the cardinality of A and is denoted by |A| Thus, the sets of
Example 1, 2, 4, 5, and 6 are finite.
Example 1. Let A be the set of odd positive integers less than 10. Then |A| = 5.
Example 2. Let S be the set of letters in the English alphabet. Then |S| = 26
1.4 Subsets:
If every element of A is also an element of B, that is, if whenever x ∈ A then x ∈ B,
we say that A is a subset of B or that A is contained in B, and we write A ⊆ B. If A is
not a subset of B, we write A⊈B. (See Figure 1.1.)
FIGURE 2
In above figure, which are used to show relationships between sets, are called Venn
diagrams after the British logician John Venn.
Example 2. Let A = {1, 2, 3, 4, 5, 6}, B = {1, 2, 4, 5}, and C= {1, 2, 3, 4, 5}. Then
B⊆A, B⊆C, and C⊆A. However, A⊈B, A⊈C. and C⊈B.
Example 3. If A is any set, then A⊆A. That is, every set is a subset of itself.
Example 4. Let A be a set and let B ={A{A}}. Then, since A and {A} are elements of
B, we have A ∈ B and {A} ∈ B. It follows that {A⊆B and {{A}} ⊆B. However, it is
not true that A⊆B.
For any set A, since there are no elements of Ø that are not in A, we have Ø⊆A.
It is easy to see that A = B if and only if A⊆B and B⊆A. The collection of everything,
it turns out, cannot be considered a set with-out destroying the logical structure of
mathematics. To avoid this and other problems, which need not concern us here, we
will assume that for each discussion there is a universal set U (which will vary with the
discussion) containing all objects for which the discussion is meaningful. Any other set
mentioned in the discussion will automatically be assumed to be a subset of U. Thus, if
we are dis-cussing real numbers and we mention sets A and B, then A and B must (we
assume) be sets of real numbers, not matrices, electronic circuits, or monkeys. In most
problems, a universal set will be apparent from the setting of the problem. In Venn
diagrams, the universal set U will be denoted by a rectangle, while sets within U will
be denoted by circles, as shown in Figure.
FIGURE 3
Solution: The power set P({0, 1, 2 }) is the set of all subsets of {0, 1, 2}
{0},{1},{2}
{0,1},{0,2},{1,2}
{1,2,3}
Note that the empty set and the set itself are members of this set of subsets.
Example What is the power set of empty set? What is the power set of {Ø}?
Solution: The empty set has exactly one subset, namely, itself.
The set {Ø} has exactly two subsets, namely, Ø and the set {Ø} itself.
If a set has n elements, then its power set has 2n elements. We will demonstrate this fact
in several ways in subsequent sections of the text.
Example. Let A = {1, 2, 3} Then P(A) consists of the following subsets of A: { }, {1},
{2}, {3}, {1, 2} {1, 3} {2, 3}, and {1, 2, 3} (or A).
Exercise 1.1
2. Let A = {x | x is a real number and x < 6 }. Identify each of the following as true or
false.
3. In each part, give the set of letters in each word by listing the elements of the set.
(a) The set of all positive integers that are less than ten
5. In each part, write the set in the form { x| P(x) } , where P(x) is a property that
describes the elements of the set.
12. Use the Venn diagram in Figure to identify each of the following as true or false.
(a) A ⊆ B (b) B ⊆ A (c) C⊆ B
(a) A ⊆ B A⊆ C B ⊈C and C ⊈ B
(b) x ∈ A x∈ B x∉ n C y ∈ B y ∈ C and y ∉ A
Introduction
Two, or more, sets can be combined in many different ways. For instance, starting with
the set of mathematics majors at your college and the set of computer science majors at
your college, we can form the set of students who are mathematics majors or computer
science majors, the set of students who are joint majors in mathematics and computer
science, the set of all students not majoring in mathematics, and so on.
An element x belongs to the union of the sets A and B if and only if x belongs to A or
x belongs to B. This tells us that A cup B=[x|x in A vee x \in B \ . The Venn diagram
shown in Figure 1 represents the union of two sets A and B. The area that represents A
cup B is the shaded area within either the circle representing A or the circle representing
B. We will give some examples of the union of sets.
In many areas of computer science and mathematics, from formal logic to object-
oriented programming, the operations to be performed must be considered in the context
of a specific set. For example, familiar operations, such as addition, subtraction,
multiplication, and division, are performed within a specific set of numbers, such as the
integers, rationals, or reals. This section discusses operations on sets and introduces the
most common operations: union, intersection, difference, complement, product, and
power set of a set. We study the laws these operations satisfy as well as how they interact
with one another. We then extend our discussion to lattices and boolean algebras.
Lattices and boolean algebras have two operations defined on their elements such that
a set of special axioms for these operations holds. An example of a lattice is a family of
sets with the operations defined as set union and set intersection.
Definition 1. Let A and B be sets. The union of the sets A and B, denoted by A U B, is
the set that contains those elements that are either in A or in B, or in both.
{x :x ∈ A or x ∈ B}
FIGURE 4
Venn diagram for set union i.e A U B
Example 1.
A U B = {1, 2, 3} U {3, 4, 5}
= {1, 2, 3, 3, 4, 5}
{1, 2, {1, 2, 3}} U {1, 2, 3, {1, 2}} = {1, 2, 3, {1, 2}, {1, 2, 3}}.
(c) ℕ U ℤ = ℤ
Why was the definition of the union of three or more sets not given? The more general
union operation, for any finite number of sets, is handled by the assumption that A U B
U C means (A U B) U C. Therefore, it is only necessary to find unions of two sets at a
time, and that has already been defined. The shaded region in Figure 1.5 shows the
union of three sets.
FIGURE 5
AUBUC
Some Fundamental Results about set union
Theorem 1. Let A, B, and C be sets. Then: (a) A U A = A. ( Idenmpotent Law)
(b) A⊆ A U B and B⊆A U B.
(c) A U B = B U A. (Commutative Law for Union)
(d) A U (B U C) = (A U B) U C. (Associative Law for Union)
Proof: (a) [ let A=B s.t A⊆B and B⊆A ]
Let x ∈ (A U A) => x ∈ A or x ∈ A
=> x ∈ (A U A)
(A U A) ⊆ A…………….(i)
Let x ∈ A then
x ∈ A => x ∈ A or x ∈ A
A ⊆ (A U A)……………………(ii)
From (i) and (ii)
AUA=A
(b) Let x ∈ A => x ∈ A or x ∈ B
=> x ∈ A U B
∀ x ∈ A => x ∈ A U B
=> A ⊆ A U B
Similarly B⊆A U B
(c) Consider x ∈ A U B <=> x ∈ A or x ∈ B
<=> x ∈ B or x ∈ A
x ∈ A U B <=> x ∈ B U A
A U B ⊆ B U A and B U A⊆ A U B
Therefore A⊆ A U B and B⊆A U B.
(d) Let x ∈ (A U B) U C …………(iii)
x ∈ A B or x ∈ C
x ∈ A, x ∈ B, x ∈ C
x ∈ A or x ∈ B U C
x ∈ A U (B U C)………………..(iv)
From (iii) and (iv)
A U (B U C) = (A U B) U C.
Definition 2. Let A and B be sets. The intersection ∩ of A and B, denoted A ∩ B, is
the set containing those element in both A and B.
{x :x ∈ A and x ∈ B}
FIGURE 6
Venn diagram for set intersection A ∩ B
(c) N ∩ Z = Z
(e) {1, 2, 3} ∩ {{1, 2, 3}1 = Ø. (The first set has three elements, 1, 2, and 3, whereas
the second set has only one element, {1, 2, 3}).
(a) If A ⊆ B or A ⊆ C, then A ⊆ B U C.
That is, the elements of A are indexed with the natural numbers, the union of sets UX
is usually written as
{x: x ∈ A and x ∉ B }
FIGURE 7
A-B
Example.
(a) Let A = {1, 2. 10} and B = {3, 5, 7, 9}. Then, A - B = {1, 2, 4, 6, 8, 10}.
The difference A - B is also sometimes call the relative difference. The Venn dia gram
(shown in Figure 1.9) gives an intuitive understanding of this notion. Remember that
Venn diagrams suggest relations between or among sets but are not actually proofs of
relationships between or among sets. Theorem 6 proves some key relationships
involving the difference of two sets, A - B and B - A.
(a) A - B and B - A are disjoint, A - B and A n B are disjoint, and A ∩ B and B - A are
disjoint.
Proof. If you look at a Venn diagram for two sets and identify A - B, B - A, and A ∩
B, it looks like the sets are disjoint. This theorem says that your intuition from the
diagram is correct. The proofs of (a)-(d) are left as exercises for the reader.
FIGURE 8
Complements of a set
Definition 6. Let U be a universal set and A be a subset of U. The complement of A,
denoted Ā, is
{x : x ∈ U and x ∉ A}
For example, if B = {2, 3, 6} then B = 11001 The operations of union, intersection, and
complement can be carried out using operators UNION, INTER, DIFF, and COMP that
operate on binary numbers bit-by-bit. Let B, C ⊆ U with B = b1b2b3b4b5b6 and C =
c1c2c3c4c5c6 .
Solution. BUC = {1, 2, 3, 4, 5, 6, 7, 8). B∩C = {3, 4, 5). C = {1, 2,9}. B - C = {1, 2}.
Therefore,
UNION(B, C) = 111111110
INTER(B, C) = 001110000
COMP(C) = 110000001
DIFF(B, C) = 110000000
Complement of a Set
Recall that a universal set is a set that contains as a subset every set currently being dis
cussed. In a context in which there is a universal set, another set theoretic operation can
be defined.
{x :x ∈ A and x ∉ A}
De Morgan's Laws are among the most important and useful results about sets. These
laws describe how union, intersection, and complement are related.
Theorem 8. (De Morgan's Laws) Let U be a universal set, and let A and B be subsets
of U. Then: (a) ( ̅̅̅̅̅̅̅
𝐴 U 𝐵 )= 𝐴̅ ∩ 𝐵̅. (De Morgan's Law for Union)
̅̅̅̅̅̅̅̅̅
(b) (𝐴 ∩ 𝐵 ) = 𝐴̅ U 𝐵
̅ . (De Morgan's Law for Intersection)
<=> x ∉ A and x ∉ B
<=> x∈ 𝐴̅ and x∈ 𝐵
̅
<=>x∈ 𝐴̅ ∩ 𝐵̅
x∈ ( ̅̅̅̅̅̅̅
𝐴 U 𝐵 ) <=> x∈ 𝐴̅ ∩ 𝐵̅
Thus ( ̅̅̅̅̅̅̅
𝐴 U 𝐵 )= 𝐴̅ ∩ 𝐵̅.
(b) x∈ ( ̅̅̅̅̅̅̅̅
𝐴 ∩ 𝐵 ) <=> x ∉ A ∩ B
<=> x ∉ A or x ∉ B
<=> x∈ 𝐴̅ or x∈ 𝐵
̅
<=>x∈ 𝐴̅ U 𝐵̅
x∈ ( 𝐴
̅̅̅̅̅̅̅̅
∩ 𝐵 ) <=> x∈ 𝐴̅ U 𝐵
̅
̅̅̅̅̅̅̅̅̅
Thus (𝐴 ∩ 𝐵 ) = 𝐴̅ U 𝐵
̅
Example. Verify De Morgan's Laws for the sets A = {1, 2, 3, 4} and B = {3, 5, 6, 8}
when the universal set is U = {1, 2, 3, 4, 5, 6, 7, 8}.
𝐴 U 𝐵 = { ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
Solution: ̅̅̅̅̅̅̅ 1,2,3,4,5,6,8 } = {7}.
𝐴̅ = {5,6,7,8}. 𝐵̅ = {1,2,4,7}.
𝐴̅ ∩ 𝐵̅ = {7}
Let P(n) be a statement about a positive integer n such that the following holds:
To complete the inductive step of a proof using the principle of mathematical induction,
we assume that P(k) is true for an arbitrary positive integer k and show that under this
assumption, P(k+1) must also be true. The assumption that P(k) is true is called the
inductive hypothesis. Once we complete both steps in a proof by mathematical
induction, we have shown that P(n) is true for all positive integers, that is, we have
shown that ∀ n P(n) is true where the quantification is over the set of positive integers.
In the inductive step, we show that ∀k(P(k) → P(k+ 1)) is true, where again, the domain
is the set of positive integers.
when the domain is the set of positive integers. Because mathematical induction is such
an important technique, it is worth while to explain in detail the steps of a proof using
this technique. The first thing we do to prove that P(n) is true for all positive integers n
is to show that P(1) is true. This amounts to showing that the particular statement
obtained when n is replaced by 1 in P(n) is true. Then we must show that P(k)→ P(k+1)
is true for every positive integer k. To prove that this conditional statement is true for
every positive integer k, we need to show that P(k+1) cannot be false when P(k)is true.
This can be accomplished by assuming that P(k) is true and showing that under this
hypothesis P(k+ 1) must also be true.
Remark: In a proof by mathematical induction it is not assumed that P(k)is true for all
positive integers! It is only shown that if it is assumed that P(k)is true, then P(k+ 1) is
also true. Thus, a proof by mathematical induction is not a case of begging the question,
or circular reasoning. When we use mathematical induction to prove a theorem, we first
show that P(1) is true. Then we know that P(2) is true, because P(1) implies P(2).
Further, we know that P(3) is true, because P(2) implies P(3). Continuing along these
lines, we see that P(n) is true for every positive integer n.
Historical Note
The first known use of mathematical induction is in the work of the sixteenth-century
mathematician Francesco Maurolico (1494–1575). Maurolico wrote extensively on the
works of classical mathematics and made many contributions to geometry and optics.
In his book Arithmeticorum Libri Duo, Maurolico presented a variety of properties of
the integers together with proofs of these properties. To prove some of these properties,
he devised the method of mathematical induction. His first use of mathematical
induction in this book was to prove that the sum of the first n odd positive integers
equals n2. Augustus De Morgan is credited with the first presentation in 1838 of formal
proofs using mathematical induction, as well as introducing the terminology
“mathematical induction.” Maurolico’s proofs were informal and he never used the
word “induction.” See [Gu11] to learn more about the history of the method of
mathematical induction.
STEPS:
𝑛(𝑛+1)
Solution: Let the given statement be denoted by S(n) =
2
At n = 1,
1(1+1)
S(1) = = 1 , which is true
2
At n = 𝑘
At n = k+1
(𝑘+1)(𝑘+1+1)
1+2+3+………………..+ 𝑘 + 𝑘 +1 =
2
(𝑘+1)(𝑘+2)
=
2
(𝑘+2)
= (𝑘 + 1)
2
𝐾
= (𝑘 + 1)[ + 1]
2
1
= (𝑘 + 1) (𝑘 + 2)
2
S(𝑘 + 1) is true
S(n) is true by principal of mathematical induction.
𝑛
Example 2. Shown that 12 + 22 + 32 +………… n2 = (n + 1)(2n + 1), n ≥ 1 by
6
mathematical imduction.
𝑛
Sol. Let the given statement be denoted by S(n) = (n + 1)(2n + 1)
6
I. n = 1
1
S(1)= (1 + 1)(2(1) + 1)
6
1
S(1)= (1+ 1)(2 + 1)
6
1
S(1)= (2)(3)
6
S(1)= 1
S(1) is true
ⅡI. n = k+1
(k + 1)
12 + 22 + 32 +………… k2+ (k+1) 2 = (k + 1+1)+ (2(k+1)+1)
6
(k + 1)
= (k + 2) (2k+2+1)
6
(k + 1)
= (k + 2) (2k+3)
6
(k + 1)
= (2k 2+ 3k+4k+6)
6
(k + 1)
= (2k 2+ 4k+3k+6)
6
(k + 1)
= [2k (k+2)+3(k+6)]
6
(k + 1)
= [(k+2) (2k+3)]
6
(k + 1)
= (k+2) (2k+3)
6
S(𝑘 + 1) is true
S(n) is true by principal of mathematical induction
Example 3. Use mathematical induction to show that 1 +2+22+···+2n =2n+1−1 for all
nonnegative integers n.
Solution: Let P(n) be the proposition that 1 +2+22+···+2n =2n+1−1 for the integer n.
I. n = 1
P(1) = 20+1−1
= 21−1
= 2−1
=1
ⅡI. n = k+1
= 2k+2−1
P(𝑘 + 1) is true
P(n) is true by principal of mathematical induction.
𝑛 𝑎𝑟 𝑛+1 −𝑎
∑=0 𝑎𝑟 𝑗 = 𝑎 + 𝑎𝑟1 + 𝑎𝑟 2 + 𝑎𝑟 3 + ⋯ + 𝑎𝑟 𝑛 = when r≠1
𝑟−1
At n = 0,
𝑎𝑟 0+1 −𝑎
P(0) =
𝑟−1
𝑎𝑟−𝑎
P(0) =
𝑟−1
𝑎(𝑟−1)
= =𝑎,
𝑟−1
At n = 𝑘
𝑎𝑟 𝑘+1 −𝑎
P(k) = 𝑎 + 𝑎𝑟1 + 𝑎𝑟2 + 𝑎𝑟3 + ⋯ + 𝑎𝑟𝑘 =
𝑟−1
At n = k+1
𝑎𝑟 𝑘+1+1 −𝑎
P(k+1) = 𝑎 + 𝑎𝑟1 + 𝑎𝑟2 + 𝑎𝑟3 + ⋯ + 𝑎𝑟𝑘 + 𝑎𝑟𝑘+1 =
𝑟−1
𝑎𝑟 𝑘+2 −𝑎
=
𝑟−1
𝑘+1 𝑘+2
(𝑎𝑟 −𝑎) (𝑎𝑟 − 𝑎𝑟𝑘+1 )
= 𝑟−1
+
𝑟−1
𝑘+1
(𝑎𝑟 −𝑎) (𝑟 −1) 𝑎𝑟𝑘+1
= 𝑟−1
+
𝑟−1
𝑘+1
(𝑎𝑟 −𝑎)
= 𝑟−1
+ 𝑎𝑟 𝑘+1
S(𝑘 + 1) is true
S(n) is true by principal of mathematical induction.
Example 5. Use mathematical induction to prove the inequality
𝑛 < 2𝑛
for all positive integers 𝑛.
At n = 1,
P(k) = 1 < 2𝑘
At 𝑛 = 𝑘 + 1
We know 𝑘 < 2𝑘
If 𝑘 = 1, 𝑘 + 1 = 2 and 2𝑘 = 2, so 𝑘 + 1 = 2𝑘.