DM Chapter+1
DM Chapter+1
1
24/01/2024
This is a discrete
mathematics problem
because there is a
finite (fixed, discrete)
number of bridges.
2
24/01/2024
Sets
A set is an unordered collection of different elements. A set can be
written explicitly by listing its elements using set bracket. If the order of
the elements is changed or any element of a set is repeated, it does not
make any changes in the set.
3
24/01/2024
Sets
Examples ---
1. The set of vowels in the English alphabet
2. The set of primary colors
3. The set of natural numbers
4. The set of positive integers between 1 and 40
Sets
The set of primary colors
Roster or Tabular Form: A = {}
Set Builder Notation: A = {}
4
24/01/2024
Sets
The set of natural numbers
Roster or Tabular Form: A = {}
Set Builder Notation: A = {}
Sets
The set of positive integers between 1 and 40
5
24/01/2024
Sets
Some important sets --
Sets
Cardinality of a set
Cardinality of a set S, denoted by |S|, is the number of elements of the
set. If a set has an infinite number of elements, its cardinality is ∞.
6
24/01/2024
Types of Sets
Finite Set
A set which contains a definite number of elements is called a finite set.
Infinite Set
A set which contains infinite number of elements is called an infinite
set.
Types of Sets
Subset
A set Y is a subset of set X (Written as Y ⊆ X) if every element of Y is an
element of set X.
7
24/01/2024
Types of Sets
Proper Subset
The term “proper subset” can be defined as “subset of but not equal
to”. A Set X is a proper subset of set Y (Written as X ⊂ Y) if every
element of X is an element of set Y and |X| < |Y|.
Types of Sets
Universal Set
It is a collection of all elements in a particular context or application. All
the sets in that context or application are essentially subsets of this
universal set. Universal sets are represented as U.
8
24/01/2024
Types of Sets
Empty Set or Null Set
An empty set contains no elements. It is denoted by ∅. As the number of
elements in an empty set is finite, empty set is a finite set. The cardinality of
empty set or null set is zero.
Types of Sets
Equal Set
If two sets contain the same elements they are said to be equal.
Example − If A = {1, 2, 6} and B = {6, 1, 2}, they are equal as every element of
set A is an element of set B and every element of set B is an element of set A.
Equivalent Set
If the cardinalities of two sets are same, they are called equivalent sets.
9
24/01/2024
Types of Sets
Overlapping Set
Two sets that have at least one common element are called overlapping sets.
Example − Let, A = {1, 2, 6} and B = {6, 12, 42}. There is a common element
‘6’, hence these sets are overlapping sets.
Disjoint Set
If two sets C and D are disjoint sets as they do not have even one element in
common.
Example − Let, A = {1, 2, 6} and B = {7, 9, 14}, there is no common element,
hence these sets are not overlapping sets.
Venn Diagrams
Venn diagram, invented in 1880 by John Venn, is a schematic diagram
that shows all possible logical relations between different mathematical
sets.
10
24/01/2024
Exercise
Let A = {1, 2, 3, 4, 5, 6, 7, 8} and B = {x ∈ Z | x is divisible by 3}
______ 1. 2 ∈ A
______ 2 . -2 ∈ A
______ 3. -3 ∉ B
______ 4. 11 ∈ B
Exercise
True or False.
______ 1. 12 ∈ Z
______ 2. 15∈ Q
______ 3. - 2 ∈ Q
______ 4. 0 ∈ N
______ 5. - 3 ∈ R
11
24/01/2024
Set Operations
Set Union
If A = {10, 11, 12, 13} and B = {13, 14, 15}, then A ∪ B = {10, 11, 12, 13,
14, 15}. (The common element occurs only once)
Hence, A ∪ B = {x | x ∈ A OR x ∈ B}
Set Operations
Set Intersection
If A = {11, 12, 13} and B = {13, 14, 15}, then A ∩ B = {13}
Hence, A ∩ B = {x | x ∈ A AND x ∈ B}
12
24/01/2024
Set Operations
Set Difference/Relative Complement
If A = {10, 11, 12, 13} and B = {13, 14, 15},
then (A− B) = {10, 11, 12} and (B − A) = {14, 15}.
Hence, A − B = {x | x ∈ A AND x ∉ B}
Set Operations
Complement of a Set
If A = {x | x belongs to set of odd integers}
then A' = {y | y does not belong to set of odd integers}
Hence, A' = {x | x ∉ A}
13
24/01/2024
Set Operations
Cartesian Product / Cross Product
If we take two sets A = {a, b} and B = {1, 2},
Set Operations
Power Set
Power set of a set S is the set of all subsets of S including the empty set.
14
24/01/2024
Set Operations
Power Set
Hence, P(S) = { {∅}, {a}, {b}, {c}, {d}, {a,b}, {a,c}, {a,d}, {b,c}, {b,d}, {c,d},
{a,b,c}, {a,b,d}, {a,c,d}, {b,c,d}, {a,b,c,d}}
|P(S)| = 24 = 16
Set Operations
Partitioning of a Set
Let S = {a, b, c, d, e, f, g, h}
15
24/01/2024
Set Operations
Partitioning of a Set
Partition of a set, say S, is a collection of n disjoint subsets, say P1,
P2,...… Pn, that satisfies the following three conditions −
16
24/01/2024
Relations
Whenever sets are being discussed, the relationship between the elements
of the sets is the next thing that comes up. Relations may exist between
objects of the same set or between objects of two or more sets.
Generally an n-ary relation R between sets A1, ... , and An is a subset of the
n-ary product A1 × ... × An.
For two distinct sets, A and B, having cardinalities m and n respectively, the
maximum cardinality of a relation R from A to B is mn
17
24/01/2024
Suppose, there is a relation R = {(1, 1), (1,2), (3, 2)} on set S = {1, 2, 3}, it
can be represented by the following graph −
Types of Relations
▪ The Empty Relation between sets X and Y, or on E, is the
empty set ∅
Let X = {} and Y = {}, then R = {}
18
24/01/2024
Types of Relations
▪ The Inverse Relation R' of a relation R is defined as −
R’ = {(b, a) | (a, b) ∈ R}
If R = {(1, 2), (2, 3)} then R’ will be {(2, 1), (3, 2)}
▪ Reflexive vs Irreflexive
If A = {1, 2, 3}, R = {(a, b)|a=b} = {(1, 1), (2, 2), (3, 3)}
Types of Relations
▪ Symmetric vs Anti-Symmetric
The relation R = {(1, 2), (2, 1), (3, 2), (2, 3)} on set A = {1,
2, 3} is symmetric.
▪ Transitive
The relation R = {(1, 2), (2, 3), (1, 3)} on set A = {1, 2, 3} is
transitive
▪ A relation is an Equivalence Relation if it is reflexive,
symmetric, and transitive
19
24/01/2024
Functions
▪ A function relates an input to an output.
▪ And the output is related somehow to the input.
Functions
The "x" is Just a Place-Holder
So this function:
f(x) = 1 - x + x2
20
24/01/2024
Functions vs Relations
Function has special rules:
▪ It must work for every possible input value
▪ And it has only one relationship for each input value
Functions vs Relations
X Y X Y
1 1 -1 1
1 2 0 0
2 1 1 1
2 2 2 4
21
24/01/2024
22