Week 10 - FACTORIAL, AND PERMUTATIONS AND COMBINATIONS
Week 10 - FACTORIAL, AND PERMUTATIONS AND COMBINATIONS
Objectives:
DISCRETE STRUCTURES 1 67
Factorial, and Permutations and Combinations
Factorial
For each positive integer n, its factorial is defined to be the product of all the integers from 1 to
n and is denoted n!.
Thus n! = n(n - 1) (n - 2) … 3 2 1.
In addition, we define 0! = 1
Example:
5! = 5 4 3 2 1 = 120
7!/4! = 7 6 5 4 3 2 1
4321
or or
7654! 7 6 5 = 210
4!
Example:
(n+1)! / n! = (n+1)n!
n!
= n+1
Permutations
The number of ways in which a subset of objects can be selected from a given set of objects,
where order is important.
For example, the telephone number 123-456-7890 is not the same as the telephone number
789-012-3456.
Example:
Given the set of three letters, {A, B, C}, how many possibilities are there for selecting any two
letters where order is important?
For any integer n with n ≥ 1, the number of permutations of a set with n elements is n!.
DISCRETE STRUCTURES 1 68
Factorial, and Permutations and Combinations
Example:
How many ways can the letters in the word COMPUTER be arranged in a row?
Solution:
All the eight letters in the word COMPUTER are distinct, so the number of ways in which we can
arrange the letters equals the number of permutations of a set of eight elements. This equals 8!
= 40,320.
Example:
How many ways can the letters in the word COMPUTER be arranged if the letters CO must
remain next to each other (in order) as a unit?
Solution:
If the letter group CO is treated as a unit, then there are effectively only seven objects that are
to be arranged in a row.
CO M P U T E R
Hence there are as many ways to write the letters as there are permutations of a set of
seven elements, namely 7! = 5,040.
If n and r are integers and 1 ≤ r ≤ n, then the number of r-permutations of a set of n elements is
given by the formula
or, equivalently,
P(n, r) = n!
(n − r)!
An r-permutation of a set of n elements is an ordered selection of r elements taken from the set
of n elements.
Note that P(n, 0) = 1 whenever n is a nonnegative integer because there is exactly one way to
order zero elements. That is, there is exactly one list with no elements in it, namely the empty
list.
DISCRETE STRUCTURES 1 69
Factorial, and Permutations and Combinations
Example:
How many ways can we award a 1st, 2nd and 3rd place prize among eight contestants? (Gold /
Silver / Bronze)
A B C D E F G H 8 choices
B C D E F G H 7 Choices
C D E F G H 6 Choices
Solution:
P(8,3) 8 * 7 * 6 = 336
Example:
How many ways are there to select a first-prize winner, a second-prize winner, and a third-prize
winner from 25 different people who have entered a contest?
Solution:
Because it matters which person wins which prize, the number of ways to pick the three prize
winners is the number of ordered selections of three elements from a set of 50 elements, that is,
the number of 3-permutations of a set of 50 elements. Consequently, the answer is:
P(50,3) = 50 49 48 =117600
Exercise
1. How many 2-permutation are there of {W, X, Y, Z}? Write them all.
2. How many different ways can five of the letters of the word DISCMATH be chosen and written in
a row?
3. How many different ways can this be done if the first letter must be D?
DISCRETE STRUCTURES 1 70
Factorial, and Permutations and Combinations
Combinations
The number of ways in which a subset of objects can be selected from a given set of objects,
where order is not important.
Combination problems address the similar problem where r distinct elements are drawn
simultaneously from a set of n objects, implying that the order in which they are drawn is
irrelevant.
Example:
Given the set of three letters, {A, B, C}, how many possibilities are there for selecting any two
letters where order is not important?
The number of r-combinations of a set with n elements, where n is a nonnegative integer and r
is an integer with 0 ≤ r ≤ n, equals
Example:
How many poker hands of five cards can be dealt from a standard deck of 52 cards?
Solution:
Because the order in which the five cards are dealt from a deck of 52 cards does not matter,
there are:
C(52, 5) = 52 51 50 49 48 / 5 4 3 2 1
2,598,960.
Example:
Let X = {a, b, c}. Then 2-combinations of the 3 elements of the set X are: {a, b}, {a, c}, and {b, c}.
Solution:
Example:
How many ways are there to select five players from a 10-member tennis team to make a trip to
a match at another school?
Solution:
DISCRETE STRUCTURES 1 71
Factorial, and Permutations and Combinations
Exercise
1. In how many ways can you choose 5 out of 10 friends to invite to a dinner party?
How many ways can a teacher choose 4 students out of the 20 in her class?
2. Find C(8,8)
DISCRETE STRUCTURES 1 72
Factorial, and Permutations and Combinations
References:
1. Kenneth H. Rosen. Discrete Mathematics and Its Applications, 7th Edition. McGrawHill, 2012
2. Gary Weiss Damian Lyons, et al., Fundamentals of Discrete Structures, 2nd edition, Pearson
Learning Solutions, 2012.
3. Susanna S. Epp, Discrete Mathematics with Applications, Brooks Cole; 4th edition, 2011.
4. James L. Hein, Discrete Structures, Logic, and Computability, 3rd edition, Jones & Bartlett
Publishers, 3rd edition, 2009.
5. Kolman, B., Busby, R. C., Ross, S. C. Discrete Mathematical Structures, 6th Edition. Prentice Hall,
2008.
DISCRETE STRUCTURES 1 73