Unit 18: Discrete Mathematics
Unit 18: Discrete Mathematics
Discrete Mathematics
Why Mathematics?
Design efficient computer systems.
How did Google manage to build a fast search engine?
3
What is Discrete Mathematics?
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}
• “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, …}
• Venn Diagrams
Venn diagrams are very useful in
visualizing relation between sets. In
a Venn diagram any set is depicted by a
closed region.
We observe that, all the elements of A are present in B but the element ‘5’
of B is not present in A. Notes:
• No set is a proper subset of itself.
So, we say that A is a proper subset of B. • Null set or ∅ is a proper subset of
Symbolically, we write it as A ⊂ B every set.
then U = {1, 2, 3, 4, 5, 7}
[Here A ⊆ U, B ⊆ U, C ⊆ U and U ⊇ A, U ⊇ B, U ⊇ C]
• 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
• For example;
{1,2}∩{2,3}={2}
Set Theory
• Set Operations
For example
A={1,2,3} and B={3,5},
then A−B={1,2}.
Set Theory
• Set Operations
Two sets A and B are mutually
exclusive or disjoint if they do not have
any shared elements;
Set Theory
For example,
A Cartesian product If A={1,2,3} and B={H,T},
of two sets A and B, written as A×B, is the set then
containing ordered pairs from A and B. A×B={(1,H),(1,T),(2,H),
(2,T),(3,H),(3,T)}.
A×B={(x,y)|x∈A and y∈B}.