Professional Documents
Culture Documents
Chapter 9 Counting
Chapter 9 Counting
Contents
BASIC KNOWLEDGE ......................................................................... 2
(1.1)Permutations ........................................................................... 2
(1.2)Combinations .......................................................................... 4
PROBLEMS ......................................................................................... 40
SOLUTIONS ........................................................................................ 44
BASIC KNOWLEDGE
(1). There are n different elements, and we would like to arrange r of these
elements with no repetition, where 1 r n .
(2). There are n different elements, and we would like to arrange all n of
these elements with no repetition.
Proof of (1.2):
The first object can be chosen in n ways, the second object in n −1 ways, the third in n
−2, etc. By the Fundamental Counting Principle, we have n(n − 1)(n −2) · · · 2 · 1 = n!
ways.
Example 1: How many 5-digit positive integers can be formed by the digits
of 0, 1, 2, 3, and 4?
(1.2). Combinations
Definition:
A combination is an arrangement or a listing of things in which order is not important.
n
Let n, r be non-negative integers such that 0 r n .The symbol
r
n P(n, r) n!
= = (1.5)
r P(r, r) r!(n − r)!
n n
=
Since n − (n − r ) = r , we have r n − r (1.6)
Unlike permutations, combinations are used when the order of the terms
When a task consists of k separate steps, if the first step can be done in n 1
ways, the second step can be done in n2 ways, and so on through the kth
step, which can be done in n k ways, then the total number of possible
N = n1 n 2 n3 n k (2.1)
Example 3: (North Carolina Math Contest) There are 8 girls and 6 boys in
the Math Club at Central High School. The Club needs to form a delegation
to send to a conference, and the delegation must contain exactly two girls and
two boys. The number of possible delegations that can be formed from the
membership of the Club is
N = n1 + n 2 + + nk (2.2)
Example 4: Hope High School has three elective courses for social
studies and four electives for science. How many ways are there for Alex
to select three electives from them this semester?
Example 5: How many two-digit numbers are there such that the units
digit is greater than the tens digit?
Example 6: (AMC) How many distinct four-digit numbers are divisible by 3 and have 23 as
their last two digits?
THEOREM 1: (Grouping)
(a). Let the number of different objects be n. Divide n into r groups A1, A2, ..., Ar such that
there are n1 objects in group A1, n2 objects in group A2, ..., nr objects in the group Ar, where
n1 + n2 + · · · + nr = n. The number of ways to do so is
n!
N= (2.2)
n1 !n 2 !n r !
Proof:
There are n ways to take out n1 elements from n elements to form group A1.
n1
n − n1
There are ways to take out n2 elements from n –n1 elements to form group A2.
n2
Continue the process until there are nr elements left to form group Ar.
n n − n1 n r n!
=
n1 n 2 n r n1 !n 2 ! n r !
(b). Let there be r types of objects: n1 of type 1, n2 of type 2; etc. The number of ways in
which these n1 + n2 + · · · + nr = n objects can be rearranged is
n!
(2.2)
n1 !n2 ! nr !
Example 7: A gardener plants eight trees out of three maple trees, two oak trees, and four
birch trees in a row. How many ways are there?
Example 8: Five numbers 1, 2, 3, 4, and 5 are arranged in a row, like a1a2 a3a4 a5
How many arrangements are there such that a1 1, a2 2, a3 3, a4 4, a5 5
(a). n identical balls are put into r labeled boxes and the number of balls in each box is not
limited. The number of ways is
n + r − 1 n + r − 1
or (3.3)
n r −1
Proof:
Put r labeled boxes next to each other as shown in the figure below. Put n balls into these
boxes (Figure 1). Next, we line these boxes up next to each other (Figure 2). Now we take
apart the top and bottom sides of the each box and the two sides of the two boxes at the end
(Figure 3), resulting figure 4.
The problem now becomes finding the number of ways to permute n identical balls with r-1 identical
(n + r − 1)! n + r − 1 n + r − 1
partitions: or or
n!(r − 1)! n r −1
Figure 1 Figure 2
Figure 3 Figure 4
( x1 + x 2 + x 3 +. + x r )
n
(b) The number of terms in the expansion of , after the like terms combined,
is
n + r − 1 n + r − 1
or (3.4)
n r −1
(c). Let n be a positive integer. The number of positive integer solutions to x1 + x 2 ++ xr = n is
n − 1
(3.5)
r −1
Proof:
Write n as n =1+1+ ··· +1+1, where there are n 1’s and n-1 plus signs. In order to
n − 1
decompose n into r summands, we choose r −1 plus signs from the n −1, giving us
r −1
ways to do so.
(d). Let n be a positive integer. The number of non-negative integer solutions to
y1 + y2 + + yr = n is
n + r − 1 n + r − 1 (3.6)
or
n r −1
Proof:
Example 9: A baking company produces four different cookies: Chocolate Chip Cookies,
Peanut Butter Cookies, Oatmeal Cookies, and Blueberry Cookies. (a) If a package contains
8 cookies, how many different packages are possible? (b) If a package contains 8 cookies
with at least one cookie of each kind, how many different packages are possible?
Example 11: (a) How many ways are there to take 4 letters from a, b, b, c, c, c, d, d, d, d, d ?
(b) How many different 4-letter codes can be formed by using the letters from a, b, b, c, c, c,
d, d, d, d, d ?
We can think of this as n people being seated at a round table. Since a rotation of the table
does not change an arrangement, we can put person A in one fixed place and then consider
the number of ways to seat all the others. Person B can be treated as the first person to seat
and M the last person to seat. The number of ways to arrange persons A to M is the same as
the number of ways to arrange persons B to M in a row. So the number of ways to seat n
people around a round table, or arranging n distinct objects around a circle, is N = (n –1)!.
Example 12: In how many ways is it possible to seat seven people at a round table if Alex and Bob
must not sit in adjacent seats?
Example 13: In how many ways can four married couples be seated at a round table if no two
men, as well as no husband and wife are to be in adjacent seats?
Example 14: Twelve student body members are seated at a round table electing president,
vice president, and treasurer. How many possible ways are there such that at least two of
the three elected had been sitting next to each other?
Example 15: Six boys and three girls are seating nine chairs in a row. The girls arrive
before the boys and decide to choose their chairs so that each girl will be between two
boys. In how many ways can girls choose their chairs?
(A) 42 (B) 46 (C) 60 (D) 72 (E) 720
Example 16: Ten chairs in a row are to be occupied by eight students and two teachers
Alpha and Beta for a class picture. Two teachers decide not to sit next to each other. There
are n arrangements and the last two digits of n is
(A) 40 (B) 20 (C) 50 (D)70
Example 17: As shown in the figure below, each of five regions ABCDE is to be assigned a
color. There are 5 colors to choose from, and no adjacent regions can be the same color. How
many different ways are there if each color is allowed to be used more than once?
Example 18: As shown in the figure below, each of four regions ABCD is to be assigned a
color. There are 4 colors to choose from, and no adjacent regions can be the same color. How
many different ways are there if each color is allowed to use more than once?
A.96 B.84 C.60 D.48
Example 19: The lengths of five sides of convex pentagon ABCDE are distinct. Each side
is to be assigned a color. There are 3 colors (red, yellow and blue) to choose from, and two
sides sharing the same vertex must have different colors. How many different colorings are
possible?
Example 20: Each of four faces of a regular tetrahedron is colored one of 10 colors. How
many distinct ways are there to color the tetrahedron? (Two colorings are considered distinct
if they cannot be rotated to look like each other).
(A) 925 (B) 980 (C) 1024 (D) 1090 (E) 1450
Example 21: (North Carolina Math Contest) The tips of a five-pointed star are to be
painted red, white and blue. How many ways can this be
done if no adjacent points can be the same color?
Example 22. There are five regions to be colored with four different colors. If no same
color can be used for adjacent regions, how many ways are there to color?
Example 24. Find the number of triangles whose vertices are lattice points in the xy- plane satisfying
1 x 5 and 1 y 5 .
Example 25. There are six points in a plane. Sixteen triangles can be formed by connecting
these points. How many lines are there that contain more than 3 of the points?
Example 26: Alex wants to select two different numbers from {2, 3, 4, 5, 6, 7, 8, 9}. How
many ways are there to do so such that these two numbers are not consecutive?
Example 27: (AMC) How many non-empty subsets S of {1, 2, 3,..., 15} have the following
two properties? No two consecutive integers belong to S. If S contains k elements, then S
contains no number less than k.
(A) 277 (B) 311 (C) 376 (D) 377 (E) 405
Example 28: (Bulgarian Mathematical Olympiad) Find the number of ways of choosing 6 among the
first 49 positive integers, at least two of which are consecutive.
.
49
6
Example 29. (1987 China Middle School Math Contest) Counting number n has the
following property: if we take any 50 different numbers from 1, 2, 3, …, n, there always will be two
numbers with the difference of 7. Among the many values of n, what is the largest value?
Example 30: A subset of integers 1, 2,…, 100 has the property that none of its members is either the
sum of other two or two times of another. What is the largest number of members such a subset can
have?
Example 31: A subset of integers 1, 2,…, 10 has the property that the sum of its
members is odd. How many such subsets are there?
PROBLEMS
Problem 1. There are 120 permutations of ABCDE when arranged in alphabetic order.
What is the last letter of the 100th permutation?
(A) A (B) B (C) C (D) D (E) E
Problem 2. Six cards each labeled with one of the digits 1 to 6 are put into 3 different
envelopes. Each envelope will have two cards and cards 1 and 2 will be in the same
envelope. How many ways are there to do so?
(A)12 (B) 18 (C) 36 (D) 54
Problem 3. Hope High School has three elective courses for social studies and four
electives for science. How many ways are there for Alex to select three electives from
them this semester with at least one from each subject?
(A) 30 (B) 35 (C) 42 (D) 48
Problem 5. How many 3-digit even numbers can be formed by using the digit 0, 2, 3, 4, and
5?
Problem 6. You have nine line segments with the lengths of 1, 2, 3, 4, 5, 6, 7, 8, and 9,
respectively. How many ways are there to form a square by connecting the ends of some of
these line segments? No overlapping of the line segments is allowed.
Problem 7. In how many ways can three married couples be seated in a row if no
husband and wife are to be in adjacent seats?
Problem 8. A baking company produces five different cookies: Chocolate Chip Cookies,
Peanut Butter Cookies, Oatmeal Cookies, Sugar Cookies, and Blueberry Cookies. If a
package contains 8 cookies with at least one each kind, how many different packages are
possible?
Problem 9. (1985 China High School Math Contest) Find the number of nonnegative
integer solutions to the equation 2x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 = 3.
Problem 10. In how many ways can four men and four women be seated at a round table if
no two men are to be in adjacent seats?
Problem 11. In how many ways can a family of six people be seated at a round table if the
youngest kid must sit between the parents?
中科数理国际教育 AMC 课程系列
陈汉梽 13120352211 41
50 AMC Lectures Chapter 26 Counting
Problem 12. A gardener plants three maple trees, four oak trees, and five birch trees in a row.
How many ways are there such that no two birch trees are next to one another?
Problem 13. Seven identical chairs in a row are to be seated by four students. How many
arrangements are there such that the only two of the three empty chairs are next to each other?
Problem 15. There are five regions that need to be colored by six different
colors as shown in the figure. Each region can only be colored with one
color. How many different ways to do the coloring?
Problem 16. Each vertex of convex pentagon ABCDE is to be colored with a color. There are
7 colors available. Each end of every diagonal must have different colors. Find the number of
different colorings possible.
Problem 17. (AMC) Each face of a regular tetrahedron is painted either red, white, or
blue. Two colorings are considered indistinguishable if two congruent tetrahedra with
those colorings can be rotated so that their appearances are identical. How many
distinguishable colorings are possible?
Problem 18. Nine squares of a 3 × 3 board are painted using three colors: black, red and
yellow with the following restrictions: (1) each square is pained with one color, (2) each color
is used exactly three times, (3) each column is painted with three colors, and each row is
colored with three colors. How many ways can this be done?
Problem 19. How many ways to color the 4 regions using 3 different
colors, if no two neighboring regions can have the same color?
Problem 20. Using red, yellow, blue, and black colors to color the figure as shown.
Each region is colored with one color and no adjacent region can have the same color.
If each color is allowed to use more than once, how many ways are there to color?
Problem 21. What is the size of the largest subset, S, of {1, 2,…, 2013} such
that no pair of distinct elements of S has a sum divisible by 3?
Problem 22. Line a is parallel to line b. There are 10 points on line a and 9 points on
line b. At most how many points of intersection of line segments obtained by connect
all these points on line a to all the points on b?
Problem 23. In how many ways can two squares be selected from an 8-by-8
chessboard so that they are not in the same row or the same column?
Problem 24. Alex wants to select three different numbers from {2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15}. How many ways are there such that no two
numbers are consecutive?
Problem 25. Alex wants to select four different numbers from {2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15}. How many ways are there such that no two
numbers are consecutive?
Problem 26. How many ways are there to take two different numbers from
1, 2,…, 32 such that the sum of them is divisible by 4?
Problem 27. At least how many numbers need to be removed from the list
of 1, 2, 3,…, 2013 such that among the remaining numbers, any number is
not a product of other two numbers?
Problem 28. A subset of integers 1, 2,…, 100 has the property that the sum
of its two members is always divisible by 10. What is the largest number of
members such a subset can have?
Problem 29. How many ways are there to take 7 numbers from 1 to 12 such
that none of the chosen numbers is twice another?
Problem 30. How many ways are there to take two different numbers from 1,
2,…, 30 such that the product of them is divisible by 7?
Problem 31. How many ways are there to take three different numbers from
1, 2,…, 30 such that the sum of them is divisible by 3?
Problem 32. What is the size of the largest subset, S, of {1, 2,…, 2013} such
that no pair of distinct elements of S has a sum divisible by 3?
SOLUTIONS
Method 2:
7 3 4
− − = 18
3 3 3
There are 9 two-digit palindromes: 11, 22, 33, 44, 55, 66, 77, 88, 99. We finished E2
in n2 = 9 ways.
There are 90 3-digit palindromes: 101, 111, 121, ........ 999. We finished E3 in n3= 90
ways.
N = n1+ n2 + n3 = 10 + 9 + 90 = 109.
Problem 6: Solution: 9.
45
We see that (1 + 2 + 3 ++ 9) 4 = 12 ,so the length of the side of the square is
less than 12. 4
If we switch the genders for A, B, and C, we have the factors 2× 2 ×2. If A is followed
by C, we get another factor of 2.
n − 1 8 − 1 7
The answer is N = = = = 35
r − 1 5 − 1 4
Case I: x1 = 0.
The given equation becomes: x2 + x3 + x4 + x5 + x6 + x7 + x8 +
x9 + x10 = 3. The number of nonnegative integer solutions is
given by (3.6):
n + r − 1 3 + 9 − 1
= = 165
n 3
Case II: x1 = 1.
The given equation becomes: x2 + x3 + x4 + x5 + x6 + x7 + x8 +
x9 + x10 = 1. The number of nonnegative integer solutions is
given by (3.6):
n + r − 1 1 + 9 − 1
= =9
n 1
8
By the product rule, the answer is 7! 5! = 33868800
5
中科数理国际教育 AMC 课程系列
陈汉梽 13120352211 48
50 AMC Lectures Chapter 26 Counting
Method 1:
We consider the vertex A first, and then we color point B and point A with the
same color. We multiply by 5 because we have five vertices (5 sub cases).
Method 2:
There is a formula for this problem which can be derived by the recursion method.
n = 5 and m = 7.
An = (m − 1) (m − 1)( n −1) + (−1) n = (7 − 1) (7 − 1) (5−1) + ( −1) 5 = 7770
(our solution):
Let r, w, and b be the number of red, white, and blue faces, respectively.
We have 3 ways to color square 8. Let us say we use the color black.
In the region that contains the squares 5, 9, 2, and 7, we have two ways to
use the black color (color 5, 2 black or 7, 9 black). After that, we have
exactly two ways to color other squares. By the product rule, we have 3 × 2
×2 = 12 ways.
Regions 1 2 3 4
Ways to color 3 × 2 × 1 × 2
Let A = {3, 6, 9, …, 2013}, B = {1, 4, 7,…, 2011}, and C = {2, 5, 8,…, 2012}.
We can at most select one element from A to add to B or C to form S.
Since B and C each have 671 elements, S has at most 671 + 1 = 672 elements.
We need two points on line a and two points on line b in in order to form 1
point of intersection.
Consider the coordinate system (a, b), which designates a square to be in row a,
column.b. In order to ensure that two squares are in different rows and different
columns, both their coordinates must be different. There are 8 ways to choose
= 28
8 2
2 different row coordinates and = 28 ways to choose 2 different column
2
coordinates. Given the row coordinates and column coordinates, there are 2 different
ways to pair them into two ordered pairs. Therefore, the answer is 2 ×28 ×28 = 1568.
n − (k − 1) 14 − (3 − 1) 12
N= = = = 220
k 3 3
n − (k − 1) 14 − (4 − 1) 11
N= = = = 330
k 4 4
If we take two numbers from A, or two numbers from C, the sum of them
must also be divisible by 3.
If we take one number from B and one number from D, the sum of
them must be divisible by 3.
8 8 8
So the number of ways is: 2 + = 120
2 1 1
On the other hand, if we only remove 42 numbers from the list, there is at
least one set with all three numbers remaining.
We can select at most 2 numbers each from (1, 2, 4, 8) and (3, 6, 12). We have three
ways to take two numbers from (1, 2, 4, 8): {1, 4}, {1, 8}, {2,8}, and one way to take
two numbers from (3, 6, 12): {3,12}.
The other 3 numbers are selected from the remaining numbers. We also need to pay
attention to these 3 numbers if we selected one of (5, 10). The number of ways to take
7 numbers is 3 × 1 ×(1 + 2 × 3)= 21.
Next, we can take two numbers from (1, 2, 4, 8) and one number from (3, 6,
12). There are 3 × 3 × 2 = 18 total ways to do so.
Finally, we can take one number from (1, 2, 4, 8), and 2 numbers from (3, 6, 12).
There are 4 × 1 × 2 = 8 total ways to do so.
4 4 26
So the number of ways is: + = 110
2 1 1
Let A = {3, 6, 9, …, 2013}, B = {1, 4, 7,…, 2011}, and C = {2, 5, 8,…, 2012}.
At most we can select one element from A to add to B or C to form S.
Since B and C each has 671 elements, S has at most 671 + 1 = 672 element