Study Material_DM Unit-01_Set Theory & Logic_Part-01-Set Theory_SY B.tech Comp
Study Material_DM Unit-01_Set Theory & Logic_Part-01-Set Theory_SY B.tech Comp
Text Books :
1. Kenneth H. Rosen, “Discrete Mathematics and its Applications”, 6th edition,
McGraw-Hill, 2007. ISBN 978-0-07-288008-3
2. C. L. Liu and D. P. Mohapatra, “Elements of Discrete Mathematics”, Six Edition,
Tata McGraw-Hill, 2008, ISBN 10:0-07-066913-9
Reference Books:
1. R. Johnsonbaugh, “Discrete Mathematics”, 5th Edition, Pearson Education, 2001,
ISBN 81 – 7808 – 279 - 9 (Recommended for Unit I and Unit II)
2. N. Deo, “Graph Theory with application to Engineering and Computer Science”,
Prentice Hall of India,1990, 0 – 87692 – 145 – 4
3. B. Kolman, R. Busby and S. Ross, “Discrete Mathematical Structures”, 4th Edition,
Pearson Education,2002, ISBN 81-7808-556-9
4. Semyour Lipschutz & Marc Lipson, “ Discrete Mathematics”, McGraw-Hill, 3rd
Special Indian Edition,ISBN-13 : 978-0-07-060174-1
5. N. Biggs, “Discrete Mathematics”, 3rd Edition, Oxford University Press, ISBN 0 –
19 –850717 – 8
6. E. Goodaire and M. Parmenter, “Discrete Mathematics with Graph Theory”, 2nd
edition, Pearson Education,2003 ISBN 81 – 7808 – 827 – 4
The opening and closing curly braces denote a set, 2n specifies the members of
the set, the colon says “such that” or “where” and everything following the colon are
conditions that explain or refine the membership. All correct mathematics can be
spoken in English. The set definition above is spoken “The set of twice n where n is an
integer”. The only problem with this definition is that we do not yet have a formal
definition of the integers. The integers are the set of whole numbers, both positive and
negative: {0, ±1, ±2, ±3, . . .}. We now introduce the operations used to manipulate sets,
using the opportunity to practice curly brace notation.
A naive theory in the sense of "naive set theory" is a non-formalized theory, that is,
a theory that uses a natural language to describe sets and operations on sets. The
words and, or, if ... then, not, for some, for every are treated as in ordinary mathematics.
As a matter of convenience, use of naive set theory and its formalism prevails even in
higher mathematics – including in more formal settings of set theory itself.
The set of positive integers less than 100 can be denoted by {1, 2, 3, . . . , 99}.
Another way to describe a set is to use set builder notation. We characterize all those
elements in the set by stating the property or properties they must have to be members.
For instance, the set A of all odd positive integers less than 10 can be written as
A = {x | x is an odd positive integer less than 10},
or, specifying the universe as the set of positive integers, as
A = {x ∈ Z+ | x is odd and x < 10}.
e.g. of set:
The set of books in the Library.
The Greek alphabet.
The set of natural numbers with 0.
The set {1, 2, 3, 4} =
{x | x is an integer where x>0 and x<5 } =
{x | x is a positive integer whose square is >0 and <25}
Recall the notation for intervals of real numbers. When a and b are real numbers with
a < b, we write
[a, b] = {x | a ≤ x ≤ b}
[a, b) = {x | a ≤ x < b}
(a, b] = {x |a < x ≤ b}
(a, b) = {x |a < x < b}
Note that [a, b] is called the closed interval from a to b and (a, b) is called the open
interval from a to b.
Empty Set:
The empty set is a set containing no objects. It is written as a pair of curly braces
with nothing inside {} or by using the symbol ∅.
the empty set is a handy object. It is also quite strange. The set of all humans that
weigh at least eight tons, for example, is the empty set. Sets whose definition contains a
contradiction or impossibility are often empty.
Remarks:
1. The empty set, denoted by ∅, is the set that has no element.
2. N = {1, 2, . . .} = the set of Natural numbers;
3. W= {0, 1, 2, . . .} = the set of Whole numbers:
3. Z = {. . . ,−2,−1, 0, 1, 2, . . .} = the set of Integers;
4. Q = {p/q : p, q ∈ Z, q ≠ 0} = the set of Rational numbers;
5. R = Set of rational union set of Irrational numbers = the set of Real numbers; and
6. C = {𝑎 + 𝑖𝑏/ 𝑎 𝑎𝑛𝑏 𝑏 𝑎𝑟𝑒 𝑟𝑒𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟𝑠} = the set of Complex numbers.
Discrete Mathematics, Unit-01_Sets & Logics Vishwakarma University, Pune-48
Prepared by Jameel A. Ansari
Cardinality:
The cardinality of a set is its size. For a finite set, the cardinality of a set is the
number of members it contains. In symbolic notation the size of a set S is written |A|.
A set A is said to have finite cardinality, denoted |A| or n(A), if the number of
distinct elements in A is finite, else the set A is said to have infinite cardinality.
for e.g.
1. If A = {lower case letters of the alphabet}, | A | = 26.
2. The cardinality of the empty set equals 0. That is, |∅| = 0.
3. Fix a positive integer n and consider the set A = {1, 2, . . . , n}. Then |A| = n.
4. Let S = {2x ∈ Z : x ∈ Z}. Then S is the set of even integers and it’s cardinality is infinite.
Subset: A set A is a subset of a set B, if all the elements in the set A also lie in the set B.
Denoted by A B.(i. e. A B if for all xA, xB)
Let A be a set. If B is a set such that each element of B is also an element of the set A,
then B is said to be a subset of the set A, denoted B ⊆ A and set B called as superset of A.
𝑺 ⊆ 𝑻 (S is a subset of T): every element of S is also an element of T
𝑺 ⊂ 𝑻 (S is a proper subset of T): S is a subset of T and 𝑆 ≠ 𝑇.
Equal Sets:
We say two sets are equal if they have exactly the same members.
Or Two sets A and B are said to be equal if A ⊆ B and B ⊆ A, denoted A = B.
e.g. If S = {1, 2, 3} then 3 ∈ S and 4 ∉ 𝑆. The set membership symbol is often used in
defining operations that manipulate sets. The set T = {2, 3, 1} is equal to S because they
have the same members: 1, 2, and 3. While we usually list the members of a set in a
“standard” order (if one is available) there is no requirement to do so and sets are
indifferent to the order in which their members are listed.
e.g.:
i) Let the universal set be the integers. Then the compliment of the even
integers is the odd integers.
ii) Let the universal set be {1, 2, 3, 4, 5}, then the compliment of S = {1, 2, 3} is
𝑆 𝑐 = {4, 5} while the compliment of T = {1, 3, 5} is 𝑇 𝑐 = {2, 4}.
Union of two sets: The union of two sets A and B, written A ∪ B, is the set of elements
that are in A or in B (or both). A ∪ B = {x : x ∈ A or x ∈ B}.
e.g.:
Suppose S = {1, 2, 3}, T = {1, 3, 5}, and U = {2, 3, 4, 5}. Then:
S ∪ T = {1, 2, 3, 5}, S ∪ U = {1, 2, 3, 4, 5}, and T ∪ U = {1, 2, 3, 4, 5}
e.g.:
Suppose S = {1, 2, 3, 5}, T = {1, 3, 4, 5}, and U = {2, 3, 4, 5}. Then:
S ∩ T = {1, 3, 5}, S ∩ U = {2, 3, 5}, and T ∩ U = {3, 4, 5}.
Disjoint Sets:
If A and B are sets and A ∩ B = ∅ then we say that A and B are disjoint, or disjoint sets.
Or Two sets are said to be disjoint if they have no elements in common (i.e A ∩ B = ∅).
e.g.:
1) the set of all even integers and set of all odd integers are disjoint sets.
2) the set of rational and set of irrational are disjoint sets.
Example:
Let S be the set of non-negative multiples of two that are no more than twenty four. Let
T be the nonnegative multiples of three that are no more than twenty four.
i.e. 𝑆 = {0, 2,4,6,8,10,12,14,16,18,20,22,24}
𝑇 = {0, 3,6,9,12,15,18,21,24}
Then 𝑆∆𝑇 = (𝑆 − 𝑇) ∪ (𝑇 − 𝑆) = {2, 3, 4, 8, 9, 10, 14, 15, 16, 20, 21, 22}
Remarks:
1. Let A be a set. Then A ⊆ A.
2. The empty set is a subset of every set.
Note: Set itself and empty set are called improper subet and other subsets called as
proper subsets.
3. Observe that N ⊆ Z ⊆ Q ⊆ R ⊆ C.
4. Let A be the set of odd integers and B be the set of even integers. Then A ∩ B = ∅ and
A∪B = Z. Thus, it also follows that the complement of A, in Z, equals B and vice-versa.
6. Let A = {{b, c}, {{b}, {c}}} and B = {a, b, c} be subsets of a set . Then A ∩ B = ∅ and
Discrete Mathematics, Unit-01_Sets & Logics Vishwakarma University, Pune-48
Prepared by Jameel A. Ansari
A ∪ B = {a, b, c, {b, c}, {{b}, {c}} }.
Power Set: Let A be a non empty set . Then the set that contains all subsets of A is called
the power set of A and is denoted by P(A).
Examples:
1. Let A = {∅}. Then P(A) = {∅,A} = {∅, {∅}}.
2. Let A = {a, b, c}. Then P(A) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}.
3. The power set P({0, 1, 2}) is the set of all subsets of {0, 1, 2}. Hence,
P({0, 1, 2}) = {∅, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}}.
Note that the empty set and the set itself are members of this set of subsets.
Q) What is the power set of the empty set? What is the power set of the set {∅}?
Solution: The empty set has exactly one subset, namely, itself. Consequently,
P(∅) = {∅}.
The set {∅} has exactly two subsets, namely, ∅ and the set {∅} itself. Therefore,
P({∅}) = {∅, {∅}}.
Venn diagram :
A Venn diagram can be a useful way of illustrating relationships between sets.
In a Venn diagram:
• The universal set is represented by a rectangle. Points inside the rectangle
represent elements that are in the universal set; points outside represent things
not in the universal set. You can think of this rectangle, then, as a 'fence' keeping
unwanted things out - and concentrating our attention on the things we're
talking about.
• Other sets are represented by loops, usually oval or circular in shape, drawn
inside the rectangle. Again, points inside a given loop represent elements in the
set it represents; points outside represent things not in the set.
3. A B = B A Commutative Laws
AB=BA
4. A (B C) = (A B) C Associative Laws
A (B C) = (A B) C
5. A (B C) = (A B) (A C) Distributive Laws
A (B C) = (A B) (A C)
6. A A = A, A A = A Idempotent Laws
7. A = A, A U = A Identity Laws
8. A 𝐴′ = U, A 𝐴′ = Inverse Laws
9. A U = U, A = Domination Laws
A (A B) = A
Proof:
Let 𝑥 ∈ (𝐴 ∪ 𝐵)𝑐 ; then 𝑥 is not a member of A or B . Since 𝑥 is not a member of A we
see that ∈ 𝐴𝑐 . Similarly 𝑥 ∈ 𝐵 𝑐 . Since 𝑥 is a member of both these sets we see that
𝑥 ∈ 𝐴𝑐 ∩ 𝐵 𝐶 and we see that (𝐴 ∪ 𝐵)𝑐 ⊆ 𝐴𝑐 ∩ 𝐵 𝐶 ........(1)
Let 𝑦 ∈ 𝐴𝑐 ∩ 𝐵 𝐶 Then the definition of intersection tells us that 𝑦 ∈ 𝐴𝑐 and 𝑦 ∈ 𝐵 𝑐 .
This in turn lets us deduce that 𝑦 is not a member of ∪ 𝐵 , since it is not in either set, and
so we see that 𝑦 ∈ (𝐴 ∪ 𝐵)𝑐 . This demonstrates that 𝐴𝑐 ∩ 𝐵 𝐶 ⊆ (𝐴 ∪ 𝐵)𝑐 ...........(2)
From (1) and (2), we get that (𝐴 ∪ 𝐵)𝑐 = 𝐴𝑐 ∩ 𝐵 𝐶 and we have proven part 1). The
proof of part 2) is left as an exercise.
Remark:
Let A = {𝑎1 ,𝑎2 , 𝑎3 , . . . , 𝑎𝑚 } and B = {𝑏1 ,𝑏2 , 𝑏3 , . . . , 𝑏𝑚 } be two finite subsets of a set ,
with |A| = m and B| = n. Also, assume that A ∩ B = ∅. Then, by definition it follows that A
∪ B = {𝑎1 ,𝑎2 , 𝑎3 , . . . ,𝑎𝑚 , 𝑏1 ,𝑏2 , 𝑏3 , . . . , 𝑏𝑚 } and hence |A ∪ B| = |A| + |B|.
Example 01:
In a class of 100 students, 35 like science and 45 like math. 10 like both. How many
like either of them and how many like neither?
Solution:
Total number of students, n(µ) = 100
→ 45+35-10 = 70
The easiest way to solve problems on sets is by drawing Venn diagrams, as shown
below.
As it is said, one picture is worth a thousand words. One Venn diagram can help solve
the problem faster and save time. This is especially true when more than two categories
are involved in the problem.
Example 02: There are 30 students in a class. Among them, 8 students are learning
both English and French. A total of 18 students are learning English. If every student is
learning at least one language, how many students are learning French in total?
Solution:
The Venn diagram for this problem looks like this.
It is mentioned in the problem that a total of 18 are learning English. This DOES NOT
mean that 18 are learning ONLY English. Only when the word ‘only’ is mentioned in the
problem should we consider it so.
Now, 18 are learning English and 8 are learning both. This means that 18 – 8 = 10 are
learning ONLY English.
30 = 18+ n(F) – 8
n(F) = 20
Note: The question was only about the total number of students learning French and
not about those learning ONLY French, which would have been a different answer, 12.
Finally, the Venn diagram looks like this.
n(C∩H) = 5
n(H∩V) = 10
n(C∩V) = 5
n(C∩H∩V) = 10
= 50 + 50 + 40 – 5 – 10 – 5 + 10
No. of students who played only cricket = n(C) – [n(C∩H) + n(C∩V) + n(C∩H∩V)] = 50 –
(5+5+10) = 30.
No. of students who played only hockey = n(H) – [n(C∩H) + n(H∩V) + n(C∩H∩V)]
= 50 – (5+10+10) = 25.
No. of students who played only volley ball = n(V) – [n(H∩V) + n(C∩V) +n(C∩H∩V)]
=40-(10+5+10) = 15.
Countable set:
a countable set is a set with the same cardinality (number of elements) as
some subset of the set of natural numbers. A countable set is either a finite set or a
countably infinite set. Whether finite or infinite, the elements of a countable set can
always be counted one at a time and, although the counting may never finish, every
element of the set is associated with a unique natural number.
A set S is countable if there exists an injective function (one to one) f from S to
the natural numbers N = {0, 1, 2, 3, ...}.
Uncountable set :
an uncountable set (or uncountably infinite set) is an infinite set that contains too
many elements to be countable. The uncountability of a set is closely related to
its cardinal number. A set is uncountable if its cardinal number is larger than that of the
set of all natural numbers.
A set S is uncountable if there does not exists an injective function (one to one)
f from S to the natural numbers N = {0, 1, 2, 3, ...}.
Results:
1) Z (the set of all integers) and Q (the set of all rational numbers) are countable.
2) Any finite union of countable sets is countable.
3) The union of countably many countable sets is countable.
4) The set of all finite-length sequences of natural numbers is countable.
5) Any finite set is countable.
6) Any subset of a countable set is countable.
7) If A and B are countable sets then A ∪ B is countable
8) If an uncountable set X is a subset of set Y, then Y is uncountable.
And 𝐴 ∪ 𝐵 = {𝑎, 𝑎, 𝑎, 𝑎, 𝑎, 𝑎, 𝑏, 𝑏, 𝑏, 𝑏, 𝑏, 𝑐, 𝑐, 𝑐, 𝑐, 𝑐, 𝑑, 𝑑, 𝑑, 𝑒, 𝑒, 𝑒, 𝑒, 𝑓, 𝑓, ℎ, ℎ, ℎ}
𝐴 ∩ 𝐵 = {𝑎, 𝑎, 𝑎, 𝑎, 𝑎, 𝑏, 𝑏, 𝑏, 𝑐, 𝑐, 𝑐, 𝑐, 𝑑, 𝑑, 𝑒, 𝑒, 𝑒}
After Calculation we get |𝐴 ∪ 𝐵| = 27 𝑎𝑛𝑑 |𝐴 ∩ 𝐵| = 17
Discrete Mathematics, Unit-01_Sets & Logics Vishwakarma University, Pune-48
Prepared by Jameel A. Ansari
Cartesian product:
Let A and B be two sets. Then their Cartesian product is denoted by A × B, is defined as
A × B = {(a, b) / a ∈ A and b ∈ B}.
Example:
1) Let A = {a, b, c} and B = {1, 2, 3, 4}. Then
A × A = {(a, a), (a, b), (a, c), (b, a), (b, b), (b, c), (c, a), (c, b), (c, c)}.
A × B = {(a, 1), (a, 2), (a, 3), (a, 4), (b, 1), (b, 2), (b, 3), (b, 4), (c, 1), (c, 2), (c, 3), (c, 4)}.
2) The Euclidean plane, denoted R2 = R × R = {(x, y) / x ∈ R}.
Note that the Cartesian products 𝐴 × 𝐵 and 𝐵 × 𝐴 are not equal, unless 𝐴 = ∅ 𝑜𝑟 𝐵 = ∅
(so that 𝐴 × 𝐵 = ∅) or 𝐴 = 𝐵.
e.g. What is the Cartesian product 𝐴 × 𝐵 × 𝐶, where A = {0, 1}, B = {1, 2}, and
C = {0, 1, 2} ?
Solution: The Cartesian product 𝐴 × 𝐵 × 𝐶 consists of all ordered triples (a, b, c), where
a ∈ A, b ∈ B, and c ∈ C. Hence,
𝐴 × 𝐵 × 𝐶 = {(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:
1) Note that when A, B, and C are sets, (𝐴 × 𝐵) × 𝐶 is not the same as 𝐴 × 𝐵 × 𝐶.
2) If A and B are two non empty set with |𝐴| = 𝑚 𝑎𝑛𝑑 |𝐵| = 𝑛 then |𝐴 × 𝐵| = 𝑚 × 𝑛