2. Why Mathematics?
Design efficient computer systems.
How did Google manage to build a fast search engine?
What is the foundation of internet security?
algorithms, data structures, database,
parallel computing, distributed systems,
cryptography, computer networks…
Logic, number theory, counting, set, graph theory…
3. 3
What Is Discrete Mathematics?
• What it isn’t: continuous
• Discrete: consisting of distinct or unconnected
elements
• Countably Infinite
• Definition Discrete Mathematics
• Discrete Mathematics is a collection of
mathematical topics that examine and use finite or
countably infinite mathematical objects.
4. What is Discrete Mathematics?
• Discrete mathematics is the branch of mathematics handling objects
that only considers distinct, separated values.
• It is steadily being applied in the multiple domains of mathematics
and computer science. It is accounted as a very effective approach for
developing and problem-solving strength.
• Discrete Mathematics focuses on the systematic study of
Mathematical structures that are essentially discrete in nature and
does not demand the belief of continuity.
5. What is Discrete Mathematics?
• In simple words, discrete mathematics gives an individual the ability
to understand mathematical language that can be learned through
various branches of it.
6. Set Theory
• A set is a collection of some items (elements). We often use capital
letters to denote a set. To define a set we can simply list all the
elements in curly brackets { } separated by commas.
• for example to define a set A that consists of the two elements ♣ and ♢,
we write A={♣,♢}
• To say that ♢ belongs to A, we write ♢∈A, where "∈" is pronounced
"belongs to." To say that an element does not belong to a set, we use ∉.
For example, we may write ♡∉A.
• Note that ordering does not matter, so the two
sets {♣,♢}{♣,♢} and {♢,♣}{♢,♣} are equal.
A set is a collection of things (elements).
8. Set Theory
Set Builder Notation
• We can also define a set by mathematically stating the properties satisfied by the
elements in the set. In particular, we may write
• A={x|x satisfies some property}A={x|x satisfies some property}
or
A={x:x satisfies some property}A={x:x satisfies some property}
The symbols "|" and ":" are pronounced "such that."
Example
•If the set C is defined as C={x|x∈Z,−2≤x<10}C={x|x∈Z,−2≤x<10}, then C={−2,−1,0,⋯,9}
• If the set D is defined as D={x2|x∈N}D={x2|x∈N}, then D={1,4,9,16,⋯}D={1,4,9,16,⋯}.
•The set of rational numbers can be defined as Q={a/b|a,b∈Z,b≠0}Q={ab|a,b∈Z,b≠0}.
9. Sep 2021 Unit 18- Discrete Mathematics 9
Set Theory
Examples for Sets
• “Standard” Sets:
• Natural numbers N = {0, 1, 2, 3, …}
• Integers Z = {…, -2, -1, 0, 1, 2, …}
• Positive Integers Z+ = {1, 2, 3, 4, …}
• Real Numbers R = {47.3, -12, , …}
• Rational Numbers Q = {1.5, 2.6, -3.8, 15, …}
10. Sep 2021 Unit 18- Discrete Mathematics 10
Set Theory
Examples for Sets
• A = “empty set/null set”
• A = {z} Note: zA, but z {z}
• A = {{b, c}, {c, x, d}}
• A = {{x, y}}
Note: {x, y} A, but {x, y} {{x, y}}
• A = {x | P(x)}
“set of all x such that P(x)”
• A = {x | xN x > 7} = {8, 9, 10, …}
“set builder notation”
11. Set Theory
• Venn Diagrams
Venn diagrams are very useful in
visualizing relation between sets. In
a Venn diagram any set is depicted by a
closed region.
• In this figure, the big rectangle shows the
universal set S. The shaded area shows
another set A
12. Set Theory
Subsets
•A B “A is a subset of B”
•A B if and only if every element of A is also an
element of B.
• Useful rules:
• A for any set A
• A A for any set A
• Equivalently, we say B is a superset of A, or B ⊇ A. .
•Examples:
Venn Diagram for two sets A and B, where B⊂A.
13. Set Theory
• Proper Subsets
Set A is considered to be a proper subset of Set B if Set B
contains at least one element that is not present in Set A.
• A proper subset is denoted by ⊂
• If A and B are two sets, then A is called the proper
subset of B if A ⊆ B but B ⊇ A i.e., A ≠ B
example;
1) A = {1, 2, 3, 4}, Here n(A) = 4,
B = {1, 2, 3, 4, 5}, Here n(B) = 5
We observe that, all the elements of A are present in B but the
element ‘5’ of B is not present in A.
So, we say that A is a proper subset of B.
Symbolically, we write it as A ⊂ B
example;
• 2. A = {p, q, r}
B = {p, q, r, s, t}
Here A is a proper subset
of B as all the elements of
set A are in set B and also
A ≠ B.
Notes:
• No set is a proper subset of itself.
• Null set or ∅ is a proper subset of
every set.
Sep 2021 Unit 18- Discrete Mathematics 13
14. Set Theory
• How many subsets and
proper subsets does a set
have?
If a set has “n” elements, then the
number of subset of the given set
is 2n
And
the number of proper subsets of
the given subset is given by 2n-1.
Example
If set A has the
elements, A = {a, b},
then what is the subset
& proper subset of the
given set?
15. Sep 2021 Unit 18- Discrete Mathematics 15
Set Theory
• Power Set
• The power set is said to be the collection of all the subsets. It is represented by P(A).
• If A is set having elements {a, b}. Then the power set of A will be;
• P(A) = {∅, {a}, {b}, {a, b}}
• For example;
If A = {p, q} then all the subsets of A will be
P(A) = {∅, {p}, {q}, {p, q}}
Number of elements of P(A) = n[P(A)] = 4 =2^2
In general, n[P(A)] = 2^m where m is the number of elements in set A.
16. Sep 2021 Unit 18- Discrete Mathematics 16
Set Theory
• Universal Set
• A set which contains all the elements of other given sets is called
a universal set. The symbol for denoting a universal set is ∪ or ξ.
• For example;
If A = {1, 2, 3} B = {2, 3, 4} C = {3, 5, 7}
then U = {1, 2, 3, 4, 5, 7}
[Here A ⊆ U, B ⊆ U, C ⊆ U and U ⊇ A, U ⊇ B, U ⊇ C]
17. Set Theory
• Set Operations
• The union of two sets is a set containing all
elements that are in A or in B
• For example;
{1,2}∪{2,3}={1,2,3}
Thus, we can write x∈(A∪B) if and only
if (x∈A) or (x∈B)
Note that A∪B=B∪A
Sep 2021 Unit 18- Discrete Mathematics 17
18. Set Theory
• Set Operations
The intersection of two
sets A and B, denoted by A∩B,
consists of all elements that are both
in A and B
• For example;
{1,2}∩{2,3}={2}
Sep 2021 Unit 18- Discrete Mathematics 18
19. Set Theory
• Set Operations
The complement of a set A,
denoted by Ac or A¯ is the set of
all elements that are in the
universal set S but are not in A
Sep 2021 Unit 18- Discrete Mathematics 19
20. Set Theory
• Set Operations
The difference (subtraction) is
defined as follows. The
set A−B consists of elements that
are in A but not in B
For example
A={1,2,3} and B={3,5},
then A−B={1,2}.
Sep 2021 Unit 18- Discrete Mathematics 20
i
21. Set Theory
• Set Operations
i.e., their intersection is the empty
set, A∩B=∅A∩B=∅.
Sep 2021 Unit 18- Discrete Mathematics 21
i
Two sets A and B are mutually
exclusive or disjoint if they do not have
any shared elements;
22. Set Theory
A Cartesian product
of two sets A and B, written as A×B, is the
set containing ordered pairs from A and B.
That is, if C=A×B, then each element
of C is of the form (x,y),
where x∈A and y∈B:
A×B={(x,y)|x∈A and y∈B}.
Sep 2021 Unit 18- Discrete Mathematics 22
i
For example,
If A={1,2,3} and B={H,T},
then
A×B={(1,H),(1,T),(2,H),(2,T)
,(3,H),(3,T)}.
A×B is not the same as B×A.