Professional Documents
Culture Documents
1
Fundamental Principle of Counting
• This counting principle is all about choices we might make given many
possibilities.
Suppose most of your clothes are dirty and you are left with 2 pants and 3
shirts.
How many choices do you have or how many different ways can you
dress?
Let's call the pants: pants #1 and pants #2
Let's call the shirts: shirt #1, shirt #2, and shirt #3
Then, a tree diagram as the one below can be used to show all the
choices you can make
2
• As you can see on the diagram, you can wear pants #1 with
shirt # 1. That's one of your choices.
Count all the branches to see how many choices you have.
Since you have six branches, you have 6 choices.
However, notice that a quick multiplication of 2 × 3 will yield the
same answer.
In general, if you have n choices for a first task and m choices
for a second task, you have n × m choices for both tasks
In the example above, you have 2 choices for pants and 3
choices for shirts. Thus, you have 2 × 3 choices.
3
Permutations vs. Combinations
• Both are ways to count the possibilities
• The difference between them is whether order
matters or not
• Consider a poker hand:
• A♦, 5♥, 7♣, 10♠, K♠
• Is that the same hand as:
• K♠, 10♠, 7♣, 5♥, A♦
• Does the order the cards are handed out matter?
• If yes, then we are dealing with permutations
• If no, then we are dealing with combinations
4
Permutations
• A permutation is an ordered arrangement of the
elements of some set S
• Let S = {a, b, c}
• c, b, a is a permutation of S
• b, c, a is a different permutation of S
• An r-permutation is an ordered arrangement of r
elements of the set
• A♦, 5♥, 7♣, 10♠, K♠ is a 5-permutation of the set of cards
• The notation for the number of r-permutations: nPr
5
• Number of 5 card combinations:
• P5 = 52*51*50*49*48 = 311,875,200
52
n!
(n r )!
6
r-permutations example
7
Permutation formula proof
• There are n ways to choose the first element
• n-1 ways to choose the second
• n-2 ways to choose the third
• …
• n-r+1 ways to choose the rth element
8
Permutations vs. r-permutations
• r-permutations: Choosing an ordered 5 card
hand is 52P5
• When people say “permutations”, they almost
always mean r-permutations
• But the name can refer to both
11
For Example:
In how many ways can the letters of the
word statistics be arranged?
There are 10 letters in 'statistics' and:
• S occurs 3 times,
• T occurs 3 times,
• I occurs twice
12
Combinations
• What if order doesn’t matter?
• In poker, the following two hands are
equivalent:
• A♦, 5♥, 7♣, 10♠, K♠
• K♠, 10♠, 7♣, 5♥, A♦
14
Combination formula proof
• Let 52C5 be the number of ways to generate
unordered poker hands
• The number of ordered poker hands is 52P5=
311,875,200
• The number of ways to order a single poker
hand is 5P5 = 5! = 120
• The total number of unordered poker hands is
the total number of ordered hands divided by
the number of ways to order each hand
• Thus, 52C5 = 52P5 / 5P5
15
• Let nCr be the number of ways to generate unordered
combinations
• The number of ordered combinations (i.e. r-
permutations) is nPr
• The number of ways to order a single one of those r-
permutations rPr
• The total number of unordered combinations is the
total number of ordered combinations (i.e. r-
permutations) divided by the number of ways to order
each combination
• Thus, nCr = nPr / rPr
P (n, r ) n! /( n r )! n!
C (n, r )
P (r , r ) r! /( r r )! r!(n r )!
16
This Project was Done By:
Name :Abhisheak.D
Roll :03
Class :XI - C
17