You are on page 1of 17

Permutations and Combinations

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

• The poker hand is one of 52P5permutations

5
• Number of 5 card combinations:
• P5 = 52*51*50*49*48 = 311,875,200
52

• Number of (initial) blackjack hands (2 cards):


• P5 = 52*51 = 2,652
52

• r-permutation notation: nPr


• The poker hand is one of 52P5 permutations

P(n, r )  n(n  1)(n  2)...(n  r  1)

n!

(n  r )!

6
r-permutations example

• How many ways are there for 5 people


in this class to give presentations?

• If there are 27 students in the class


• 27P5 = 27*26*25*24*23 = 9,687,600
• Note that the order they go in does matter
in this 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

• By the product rule, that gives us:


nP = n(n-1)(n-2)…(n-r+1)
r

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

• Permutations: Choosing an order for all 52


cards is 52P52= 52!
• Thus, nPn= n!
9
Sample question
• How many permutations of {a, b, c, d, e, f, g}
end with a?
• Note that the set has 7 elements
• The last character must be a
• The rest can be in any order
• Thus, we want a 6-permutation on the set {b,
c, d, e, f, g}
• 6P = 6! = 720
6
• Why is it not 7P6?
-Because one alphabet is fixed
10
Permutations when not all objects
are distinct

What happens if not all the objects are


distinct?
The number of ways of arranging n objects
of which r are the same is
In addition to this, the number of ways of
arranging n objects of p of one type are
alike, q of a second type are alike, r of a
third type are alike, etc.
This is given by:

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

Hence the number of ways

...Still a very large number of ways.

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♦

• The number of r-combinations of a set with n


elements, where n is non-negative and 0≤r≤n
is: n!
C (n, r ) 
r!(n  r )!
13
Combinations example

• How many different poker hands are


there (5 cards)?
52! 52! 52 * 51* 50 * 49 * 48 * 47!
C (52,5)     2,598,960
5!(52  5)! 5!47! 5 * 4 * 3 * 2 *1* 47!

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

You might also like