PPT Discrete
PPT Discrete
Basics of
in
Discrete Mathematics
Rules of
SuSubtra
and
m ction
The Sum Rule: If a task can be done either in one of 𝑛1 ways or in one of
𝑛2, where none of the set of 𝑛1 ways is the same as any of the 𝑛2 ways,
then there are 𝑛1 + 𝑛2ways to do the task.
Example
Suppose you're organizing a list of students who like sports. There are:
• 40 students who like basketball.
• 35 students who like volleyball.
• 10 students who like both basketball and volleyball.
You want to know how many students like either basketball or volleyball, but not
double-count the ones who like both.
Using the subtraction rule, you calculate: Total students liking basketball or volleyball
= (students liking basketball) + (students liking volleyball) - (students liking both)
Total = 40 + 35 - 10 = 65 students.
This ensures you're not counting the 10 students who like both sports twice.
Subtraction avoids the overlap!
Rules of
Product
and
Divisi
on
of two tasks. There are 𝑛1 ways to do the first task and 𝑛2 ways to do
The Product Rule: A procedure can be broken down into a sequence
the second task. Then there are 𝑛1𝑛2 ways to do the procedure.
Example
To find the total number of outfits you can create by choosing one shirt and one pair
of pants, you can use the product rule.
Choices for shirts: 3 (Red, Blue, Green) Choices for pants: 2 (Black, Khaki)
Using the product rule: Total outfits = Choices for shirts × Choices for pants =
3×2=6
Division Rule: There are 𝑛/𝑑 ways to do a task if it can be done
using a procedure that can be carried out in 𝑛 ways, and for every
way 𝑤, exactly 𝑑 of the 𝑛 ways correspond to way 𝑤.
Example 1
Imagine you have 6 students in a group, and you need to pair them up
into 3 teams of 2 students each. However, the order in which the teams
are formed doesn’t matter (i.e., team A and team B are the same as team B
and team A).
Initially, you calculate the total number of ways to assign 6 students to 3 teams,
but then you need to account for the fact that the arrangement of the teams
doesn't matter. This is where the division rule comes in:
Total arrangements = (Number of initial arrangements) ÷ (Number of
ways the teams can be reordered)
In this case:
• Suppose the number of initial arrangements is 720.
• The teams can be reordered in 3! = 6 ways.
So, the total unique arrangements are: Total = 720 ÷ 6 = 120 unique ways.
Where did 720 came
from
The number of ways to arrange n distinct items
is represented by n! (n factorial). For 6 students,
we calculate:
6!=6×5×4×3×2×1=720
Example 2: Arranging Flags with Repetition
Suppose you have 7 flags, where:
• 4 are red,
• 3 are blue.
You want to find the number of unique arrangements of these flags. Since the red
flags are identical to each other, and the blue flags are identical to each other, we
must eliminate the overcounting of repeated arrangements.
Quiz
for
A school cafeteria offers three types of sandwiches: Turkey,
Veggie, and Chicken. Each sandwich can be served on four types
of bread (White, Wheat, Rye, and Sourdough), except Veggie,
which is only available on Wheat, Rye, and Sourdough, and
Chicken, which is only available on Rye and Sourdough. What is
the minimum number of sandwiches the cafeteria needs to
prepare to have one of each type and bread combination?
A video game store sells three gaming consoles: PlayBox,
GameSphere, and NexGen. Each console is available in four
storage capacities (256GB, 512GB, 1TB, and 2TB), except
GameSphere, which is only available in 512GB, 1TB, and 2TB, and
NexGen, which is only available in 1TB and 2TB. What is the
minimum number of consoles the store needs to stock to have one
of each type and storage capacity combination?
How many unique arrangements can be formed from the
letters in the word BANANA?
Combin
ion
ation
A permutation is an arrangement of
some elements in which order
matters. In other words a
Permutation is an ordered
Combination of elements.
Some Problems
Problem 1 − From a bunch of 6 different cards, how many ways we can permute it?
Solution − As we are taking 6 cards at a time from a deck of 6 cards, the permutation
will be 6P6=6!=7206P6=6!=720
Problem 2 − In how many ways can the letters of the word 'READER' be arranged?
Solution − There are 6 letters word (2 E, 1 A, 1D and 2R.) in the word 'READER'.
The permutation will be =6!/[(2!)(1!)(1!)(2!)]=180.=6!/[(2!)(1!)(1!)(2!)]=180.
Problem 3 − In how ways can the letters of the word 'ORANGE' be arranged so that the consonants occupy
only the even positions?
Solution − There are 3 vowels and 3 consonants in the word 'ORANGE'. Number of ways of arranging the
consonants among themselves =3P3=3!=6=3P3=3!=6. The remaining 3 vacant places will be filled up by 3
vowels in 3P3=3!=63P3=3!=6 ways. Hence, the total number of permutation is 6×6=36
A combination is selection of some given elements in which
order does not matter.
The number of all combinations of n things, taken r at a time
is −
Sample Problems
Problem 1
Find the number of subsets of the set {1,2,3,4,5,6}{1,2,3,4,5,6} having 3
elements.
Solution
The cardinality of the set is 6 and we have to choose 3 elements from the set. Here,
the ordering does not matter. Hence, the number of subsets will be
6C3=206C3=20.
Problem 2
There are 6 men and 5 women in a room. In how many ways we can choose 3 men
and 2 women from the room?
Solution
The number of ways to choose 3 men from 6 men is 6C36C3 and the number of
ways to choose 2 women from 5 women is 5C25C2
Hence, the total number of ways is − 6C3×5C2=20×10=200
Pascal’s
Identity
Pascal's identity, first derived by Blaise Pascal in 17th
century, states that the number of ways to choose k
elements from n elements is equal to the summation of
number of ways to choose (k-1) elements from (n-1)
elements and the number of ways to choose elements from
n-1 elements.
Pigeonho
Principle
le
In 1834, German mathematician, Peter Gustav Lejeune Dirichlet, stated a
principle which he called the drawer principle. Now, it is known as the
pigeonhole principle.
Pigeonhole Principle states that if there are fewer pigeon holes than total
number of pigeons and each pigeon is put in a pigeon hole, then there must
be at least one pigeon hole with more than one pigeon. If n pigeons are put
into m pigeonholes where n > m, there's a hole with more than one pigeon.
Examples
• Ten men are in a room and they are taking part in handshakes. If
each person shakes hands at least once and no man shakes the
same man’s hand more than once then two men took part in the
same number of handshakes.
|A∪B|=|A|+|B|−|A∩B||A∪B|=|A|+|B|−|A∩B|
|A∪B∪C|=|A|+|B|+|C|−|A∩B|−|A∩C|−|B∩C|+|A∩B∩C||A∪B∪C|=|A|+|B|+|C|−|
A∩B|−|A∩C|−|B∩C|+|A∩B∩C|
|⋃ni=1Ai|=∑1≤i<j<k≤n|Ai∩Aj|+∑1≤i<j<k≤n|Ai∩Aj∩Ak|−⋯+(−1)\n−1|A1∩⋯
∩A2|
Problem 1
How many integers from 1 to 50 are multiples of 2 or 3 but not both?
Solution
From 1 to 100, there are 50/2=2550/2=25 numbers which are multiples of 2.
There are 50/3=1650/3=16 numbers which are multiples of 3.
There are 50/6=850/6=8 numbers which are multiples of both 2 and 3.
So, |A|=25|A|=25, |B|=16|B|=16 and |A∩B|=8|A∩B|=8.
|A∪B|=|A|+|B|−|A∩B|=25+16−8=33
Problem 2
In a group of 50 students 24 like cold drinks and 36 like hot drinks and each
student likes at least one of the two drinks. How many like both coffee and
tea?
Solution
Let X be the set of students who like cold drinks and Y be the set of people
who like hot drinks.
So, |X∪Y|=50|X∪Y|=50, |X|=24|X|=24, |Y|=36|Y|=36
|X∩Y|=|X|+|Y|−|X∪Y|=24+36−50=60−50=10|X∩Y|=|X|+|Y|−|X∪Y|
=24+36−50=60−50=10
Hence, there are 10 students who like both tea and coffee.
You
Thank