Lecture 09 - Counting Theory
Lecture 09 - Counting Theory
THEORY
Counting Theory
• In daily lives, many a times one needs to find out the number of
all possible outcomes for a series of events.
Example
• A boy lives at X and wants to go to School at Z. From his home X
he has to first reach Y and then Y to Z. He has 3 paths to reach
from X to Y and 2 paths to reach Y to Z. How many ways are
there to go from X to Z?
a1 b1
a2
X Y b2
Z
a3
3X2=6
The Rules of Sum and Product
X Y Z
No of ways to do T1 & T2 3 2
The Rules of Sum and Product
T1 T2
X Y Z
Total No of ways 3 x 2 =6
Exercise
3. There are 138,122 and125 bus services and one train service to
reach Maharagama to Colombo Fort. If you want to travel from
Maharagama to Colombo Fort how many different ways do you
have?
Permutations
Permutation relates to the act of arranging all the members of a
set into some sequence or order.
n= 3 𝑛!
𝑛𝑃 𝑟 = 𝑛−𝑟 !
r=2
3!
3𝑃 2 = 3−2 !
3𝑥2𝑥1
3𝑃 2 = 1! =6
6 arrangements
Exercise
1. Find the number of permutations if n = 12 and r = 2.
𝑛!
𝑛1! 𝑛2! … . . 𝑛𝑘 !
Example
Find how many ways you can rearrange letters of the word
“BANANA” all at a time.
𝑛!
Total number of letters in “BANANA” = 6 𝑛𝑃 𝑟 = 𝑛−𝑟 !
6!
“A” repeats 3 times 6𝑃 6 = 6−6 !
= 6!
“N” repeats 2 times
6𝑃 6 6!
So, the permutation = = = 60
3! 2! 3! 2!
Exercise
1. How many ways can the letters in the name RAMONA be
arranged?