Professional Documents
Culture Documents
07 Lecture
07 Lecture
Nurlan Ismailov
nurlan.ismailov@astanait.edu.kz
Astana IT University
June 9, 2020
10 × 9 × 8 × 7 × 6
1st 2nd 3rd 4th 5th
position position position position position
Exactly the same answer is obtained if the positions are filled from right to
left - namely,
6 × 7 × 8 × 9 × 10.
If the 3rd position is filled first, the 1st position second, the 4th position third,
the 5th position fourth, and 2nd position fifth, then the answer is
9 × 6 × 10 × 8 × 7,
still the same value, 30240.
If we make use of the factorial notation, the answer can expressed in the
following more compact form:
5×4×3×2×1 10!
10 × 9 × 8 × 7 × 6 = 10 × 9 × 8 × 7 × 6 × = .
5×4×3×2×1 5!
Definition (Permutation)
Given a collection of n distinct objects, any (linear) arrangement of these
objects is called a permutation of the collection.
Example
Given three letters a, b, c. Permutations on a, b, c are
abc, acb, bac, bca, cab, cba.
So there are 6 permutations on three objects.
Proposition
The number of permutations of n distinct objects is n!.
Definition (k-permutation)
For natural numbers k and n, k ≤ n, an k−permutation of n objects is a
permutation of k of them, that is, an arrangement of k of the objects in a line
in some order. The number of k permutations of n objects is denoted by
P (n, k).
Examples
2-permutations of three letters a, b, c are
ab, ba, ac, ca, bc, cb
Hence P (3, 2) = 6.
Five students are to be chosen from 10 students and seated in a row for a
picture. Possible arrangements of five students selected from the class of
10 are just 5-permutations of 10 students. As we calculated above
P (10, 5) = 30240
Proposition
n!
Let k, n be integer numbers and 1 ≤ k ≤ n. Then P (n, k) = (n−k)!
P (n, k) = n × (n − 1) × (n − 2) × · · · × (n − k + 1)
The number of (linear) arrangements of the four letters in BALL is 12, not
4! = 24. The reason is that we do not have four distinct letters to arrange. To
get 12 arrangements, we can list them as in Table
A B L L A B L1 L2 A B L2 L1
A L B L A L1 B L2 A L2 B L1
A L L B A L1 L2 B A L2 L1 B
B A L L B A L1 L2 B A L2 L1
B L A L B L1 A L2 B L2 A L1
B L L A B L1 L2 A B L2 L1 A
L A B L L1 A B L2 L2 A B L1
L A L B L1 A L2 B L2 A L1 B
L B A L L1 B A L2 L2 B A L1
L B L A L1 B L2 A L2 B L1 A
L L A B L1 L2 A B L2 L1 A B
L L B A L1 L2 B A L2 L1 B A
(a) (b)
and the answer to the original problem of finding all the arrangements of the
four letters in BALL is 4!
2 = 12.
The number of ways to place these three balls into the boxes so that at most
one to a box, is P (10, 3) = 720. (Why?)
Explanation. We could place the first ball into any 10 boxes, so there are 10
ways of doing that. After we replace the first ball, we would have 9 ways of
putting the second ball. For the last ball there are 8 free boxes where we can
place it into. Therefore,
10 × 9 × 8 = P (10, 3) = 720.
Question
What if three balls are absolutely identical(the same size, the same color)?
Are there still 720 possibilities?
When there are red, blue and green balls, for each choice of boxes, there are
3! = 6 different ways of assigning the balls to boxes 3, 4 and 8, for instance.
When the ball are identical, these assignments are all the same. Thus, the
number of ways to put three identical balls into ten boxes is just the number
of ways to select three boxes out of ten.
To summarize,
Number of ways to select three boxes from ten
= number of ways to put three identical balls into ten boxes
= P (10,3)
3!
10!
= 7!3! = 120.
Definition
n
For integers k and n, and 0 ≤ k ≤ n, the binomial coefficient k (read “n
choose k”) is defined by
n n!
k = k!(n−k)! .
Proposition
with 0 ≤ k ≤ n. Then number of ways to choose k
Let n and k be integers
objects from n is nk .
Corollary
n
The number of k-combination of n objects is k .
Example
2-combinations of the letters a, b, c, d, e is
5 5! 5×4
= = = 10.
2 2! × 3! 2×1
They are
{a, b}, {a, c}, {a, d}, {a, e}, {b, c}, {b, d}, {b, e}, {c, d}, {c, e}, {d, e}.
n n
k = n−k where 0 ≤ k ≤ n
n n−1 n−1
k = k−1 + k where 0 ≤ k ≤ n − 1
n n n n n
0 + 1 + 2 + ... + n−1 + n = 2n where n > 0.
n n n n n
0 − 1 + 2 − . . . + (−1)n−1 n−1 + (−1)n n =0 where n > 0.
n
The first two can be proved using the definition of k or just applying
directly the preceding proposition to them.
The last two can be obtained from The Binomial Theorem which will be
stated below, substituting x = y = 1 and x = −1, y = 1, respectively.
In how many ways can 4 balls be chosen from a box which contains balls
numbered from 1 to 10 if
(a) the ball numbered 1 not to be chosen?
(b) the ball numbered 1 should be chosen?
(c) the balls numbered 1 and 2 should be chosen?
(d) either the ball numbered 1 or 2 should be chosen?
(e) just one of the balls numbered 1 and 2 should be chosen?
(f ) the balls numbered 1 and 2 should not be chosen together?
Solution.
(a) The answer 94 = 126 since, in effect, it is necessary to select 4 balls from
(c) The answer 82 = 28, it being necessary to choose the remaining 2 balls
ball numbered 1 (but not the ball numbered 2) is chosen, the ball numbered 2
(but not the ball numbered 1) is chosen, both balls numbered 1 and 2 are
chosen - and add the result.
An alternative method of obtaining this answer is to susbtract from the total
number of possible selections of 10 balls the number of selections containing
balls numbered neither 1 nor 2. This gives 10 8
4 − 4 = 140.
(e) 83 + 83 = 112. This would be to count separately the cases - the ball
numbered 1 (but not the ball numbered 2) is chosen, the ball numbered 2 (but
not the ball numbered 1) is chosen - and add the result.
(f ) 10 8
4 − 2 = 182. The number of selections containing balls numbered 1
and 2 is 82 by part (c), taking account that we have the answer.
In previous cases we counted the number of ways to put k balls into n boxes
with at most one ball to a box in two situations: The balls have different
colors and the balls are all the same color. Suppose we allow any number of
balls in a box. If the balls are all colored differently, then there are n choices
for the first ball, n for the second, and so forth. There are, altogether
n × n × · · · × n = nk possibilities. When the balls are all the same colour,
however, we expect for fewer possibilities.
Suppose we want to place three white balls into ten boxes and we are allowed
to put as many balls into a box as we like. There are three mutually exclusive
ways in which this can be accomplished. Each goes into a different box (in one
of 10
3 = 120); two balls go into the same box, but the third goes into its own
box (in one of 10 × 9 = 90 ways); or all the balls go into the same box (in one
of 10 ways). By the addition rule, the number of ways in all is
120 + 90 + 10 = 220. We note in passing that 220 = 10+3−1 3 .
Example
In how many ways can we distribute 7 bananas among four children so that
each child receives at least one banana?
Solution. After giving each one banana, consider the number of ways the
remaining 3 banana can be distributed among these four children. In fact, it is
equivalent question about replacing three identical balls into four boxes.
Consequently, there are 4+3−1
3 = 20 ways.
n
at most one to a box (0 ≤ k ≤ n) k P (n, k)
n+k−1
any number in a box (n, k ≥ 0) k nk
(x + y)0 = 1
(x + y)1 = x + y = 1 x + 1 y
(x + y)2 = x2 + 2xy + y 2 = 1 x + 2 xy + 1 y 2
Theorem
For any x and y and any positive integer number n,
Pn
(x + y)n = k=0 nk xn−k y k
Let n, k ∈ Z+ .
Let x1 + x2 + . . . + xn = k, with xi ≥ 0, for 1 ≤ i ≤ n.
What is the number of integer solutions of the equation?
For positive n and k, what is the coefficient of xn1 1 x2n2 · · · xnk k in the
expansion
(x1 + x2 + . . . + xk )n ?