ITP3902 DMS Lec 8 Permutation and Combination
ITP3902 DMS Lec 8 Permutation and Combination
Lecture 8
Introduction
• We extend the product rule to count linear
arrangement of objects.
• These arrangements are often known as
permutations when all the objects are distinct.
• If these distinct objects are selected without regard
to order, these selections are known as
combinations.
• https://www.youtube.com/watch?v=hJRXKq2GEo8
Permutations
• Factorial
• The factorial of a non-negative integer is defined
as
1, 𝑖𝑖𝑖𝑖 𝑛𝑛 = 0
n! = �
𝑛𝑛 n − 1 ⋯ 3 � 2 � 1, 𝑖𝑖𝑖𝑖 𝑛𝑛 ≥ 1
• To arrange n distinct objects in a row
• 1st position object can be chosen in n ways;
• 2nd position object can be chosen in (n-1) ways;
• ……….
• 2nd last position object can be chosen in 2 ways;
• Last position object is left with only 1 way.
ITP3902 Discrete Mathematics & Statistics Page 3
Lecture 8 Permutation and Combination
Factorial => !
• n! = n * (n-1) * (n-2) * … * 3 * 2 * 1 * 0!
where 0! = 1
• 例子:
• 3! = 3 * 2 * 1 * 0! = 6
• 6! = 6 * 5 * 4 * 3!
=6*5*4*3*2*1*1
= 720
Permutations
• The number of possible arrangement is
n⋅(n – 1)⋅(n – 2)⋅⋅⋅(n – r + 2)⋅(n – r + 1)
• This is written as
𝑃𝑃 𝑛𝑛, 𝑟𝑟 = 𝑛𝑛 � 𝑛𝑛 − 1 � 𝑛𝑛 − 2 ��� (𝑛𝑛 − 𝑟𝑟 − 2) � (𝑛𝑛 − 𝑟𝑟 − 1)
𝑛𝑛!
=
𝑛𝑛−𝑟𝑟 !
Permutation
• Permutation(排列): the order(次序) of the
selection is important
Example 1
It is known that the password on a computer system
contain the three letters A, B and C in any order,
followed by the six digits 1, 2, 3, 4, 5, 6, again in any
order. Find the number of possible passwords.
Solution
P(3,3) = 3!
There are _________ ways of arranging the letters A,
B and C, and
___________ways
P(6,6) = 6! of arranging the digits 1, 2, 3, 4, 5, 6.
Therefore, by the product rule, the total number of
possible passwords is
_____________.
3! x 6! = 4320
i.e. 4320 different passwords can be formed.
ITP3902 Discrete Mathematics & Statistics Page 7
Lecture 8 Permutation and Combination
Example 2
10 computing students were nominated as student
representatives. An upcoming student meeting is scheduled to
approve an executive committee (chosen from the 10 student
representatives).
(a) How many different executive committee consisting of a
chairman, vice chairman, secretary and treasurer can the
student representatives present to the students for their
approval?
(b) Three members of the student representatives are final year
students. How many executive committees from part (a)
have (i) a final year student nominated for the
chairmanship? (ii) exactly one final year student appearing in
the executive committee? (iii) at least one final year student
appearing in the executive committee?
ITP3902 Discrete Mathematics & Statistics Page 8
Lecture 8 Permutation and Combination
Example 2 (cont.)
Solution
(a) Arrange the 4 positions, chairman, vice-chairman,
secretary and treasurer in a row and then choose 4 out
of 10 to fill the positions. So the number of different
executive committees is 10!
= 5040
P(10, 4) = P4 =__________________.
10 6!
Example 2 (cont.)
(b) Three members of the student representatives
are final year students from 10 computing students:
Combination
• Combination(組合): the order(次序) of the
selection is NOT that important
Example 5
Example 6
A committee of 5 members is chosen at random from 6
faculty members of the mathematics department and 8
faculty members of the computer science department. In how
many ways can the committee be chosen if
(a) there are no restrictions;
(b) there must be more faculty members of the computer
science department than the faculty members of the
mathematics department.
Solution
(a) There are 14 members, and 5 are to be chosen from them.
The order in which they are chosen is not important.
So the number of ways of choosing the committee is
_______________
C(14, 5) = 2002.
ITP3902 Discrete Mathematics & Statistics Page 14
Lecture 8 Permutation and Combination
Example 6 (cont.)
(b) The faculty members of the computer science
department is more than faculty members of the
mathematics department, then we have the following
disjoint cases:
Case 1 (5 CS, 0 Maths)
8!
No. of selections = C(8,5)⋅C(6,0) = = 56
5!3!
Case 2 (4 CS, 1 Maths)
8! 6!
No. of selections = C(8,4)⋅C(6,1) = = 420
4!4! 1!5!
Case 3 (3 CS, 2 Maths) 8! 6!
C(8,3) ⋅C(6,2) =
No. of selections =_______________________ = 840
3!5! 2!4!
So, by the sum rule, the total number of combinations is
56 + 420 + 840 = 1316.
ITP3902 Discrete Mathematics & Statistics Page 15