Permutation and Combination
Permutation and Combination
Tom Davis
[email protected]
http://www.geometer.org/mathcircles
October 25, 2000
Permutations: A permutation
is an arrangement of things. The number of ordered ways to choose things from a set of is
. This is because the first object can be chosen in any of ways, the second in any of
ways, and so on.
Example: How many ways are there to choose an ordered set of numbers from a set of ? Answer: . Suppose
the numbers are and . The possibilities are listed below. Note that it is very convenient to organize a list like this in
some order to be certain you haven’t left anything out. In this case, they’re arranged in a sort of “alphabetical order”, as if
were in the alphabet:
Combinations: Combinations are like permutations except that they are unordered. In the example above, the combinations
of 4 things taken two at a time would not include both and . To get the number of combinations of things taken at a
time, we must divide the number of permutations by to get rid of duplicate permutations.
Thus, the number of combinations of things taken at a time is:
"
!
#
This formula works fine for %$ and/or %$ , as long as you remember that $ & .
Example: The number of ways to choose numbers from the set ' ( ) * is + ,- ./
$ . The possibilities include.
Notice that this list is also in “alphabetical order”:
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
Relationship with Pascal’s Triangle: Here is Pascal’s triangle, written both in the usual way, and written with its terms
expressed as combinations.
+0 .
+ 1 .2 0 +1. 3
0 + 4 .2 1
- + 04 .5 - 1 - + 44 . - 6 7
+ .5+ .2+ .8+ - . 639
+ : .20 + : .5 1 + : .24 + :- .8+ : . ;<)=>
0 1 4 :
In other words, the entries in Pascal’s triangle equal to the corresponding entry in the triangle of combination coefficients on
the left.
Relationship of Pascal’s Triangle with the binomial theorem: Note that in the following expansion, the coefficients of the
1
terms correspond exactly to the fourth row (starting at row zero) of Pascal’s Triangle:
? @A
B C DFE&G @ HA!I @ J B KAL @ M B MNA!I @ K B JNA%G B H O
Counting Tricks: If you have no idea how to proceed, it’s often a good idea to count or calculate (very carefully) the first
? C
few cases, and then try to work from that. Here’s a simple example of that, together with a new technique for analysis. The
problem is to find a formula for the sum of the first Q squares. In other words, find a formula for ] Q , where
X
? Q CNE&G MA M A^ MA%Y Y Y A Q M O
]
R R X
? CE ? G CNE_G ? C E&R GA!IE%` ? ^ CNE_GA!IA
aE&G I
In this case, it’s easy to work out the first few cases: ] ,] ,] E ,] , and so
on. Here’s a list of the first few (be sure to start your row with the value for Q ):
R Gb`_G Ic^ R ` `da GG I RcX R I X e `
Now take differences of the numbers in this row, forming a second row. Then take differences in the second row, forming a
third, and so on:
R f
G `gG Ih^ R X ` `ia GjG I RiX R I e X e `
GkIlamG L `i^ LnI a3L I G
^o q
` r
p s
a
XcX=X<X3XuXvX G i
G G 9
^ G t
` G p
RwR=R<R3RxR
E&G y X y —
Counting Mountains ^ y Catalan
I Numbers: Using Q pairs of the characters { and | , build as many chains of mountains as
you can. For Q and here are the possibilities:
} ~ {
2
So there are 1, 2, 5, and 14 ways to construct legal mountain chains for 1, 2, 3, and 4 pairs of the slash characters. How do
we count these?
The answer is
n
way
The
F ! to see Fthis
is to imagine all possible arrangements
of up-strokes and only down-strokes. From among these
them to be up-strokes, so there are b
strokes, we need to choose %of V choices. But imagine putting
these stroke sequences next to each other. For , look at the example “up down down up up up down”:
as above, and all will have a lowest
All of these will form a sort of staircase
point marking the lowest edge. Since the low
point can occur at any of the positions, we must divide by .
These are known as the Catalan numbers, and they come up in many counting problems.%Is it obvious why the number of
valid arrangements of pairs or parentheses is also given by the Catalan numbers? For :