Professional Documents
Culture Documents
October 2023 05
1. In each of the following, solve the counting problem in two different ways,
one using the inclusion-exclusion principle and the other not using it. (a) How
many four-digit positive integers have at least two digits being the same?
(b) How many four-digit positive integers have their product of digits being
odd?
54 = 625
2. Compute the number of permutations of (1, 2, ..., 6) with the following
forbidden positions: X1 = {1}, X2 = X3 = {2}, and X4 = X5 = X6 = {3}.
The sets you’ve defined are as follows:
X1 = {1} X2 = X3 = {2} X4 = X5 = X6 = {3}
6! − (5! × 6 − 4! × (5 + 3 + 3) + 3! × 6) = 228
(3) (a) How many permutations (i1 , i2 , ...i10 ) of (1, 2, ..., 10) are there such
that i1 < i2 < < i6 and i6 > i7 > > i10 ?
9
= 126
5
(c) How many permutations of (1, 2, ..., 10) are ‘unimodal’ in the sense that it
is initially ‘increasing’ and then becomes ‘decreasing’ from some point (possibly
strictly increasing/decreasing throughout)?
9
X 9
= 512
i=0
i
(d) Find a different approach to (b) and come up with a combinatorial equal-
ity.
29 = 512
Every digit can be increasing or decreasing starting from the second.
1
4. If and only if the union of any 4 subsets is empty, then:
|A1 ∪ A2 ∪ . . . ∪ Am | = S1 − S2 + S3
k (k − 1) k (k − 1) (k − 2) 6k − 3k 2 + 3k + k 3 − 3k 2 + 2k
k− + =
2 6 6
2
k (k − 3) + 2
2
3 2 k k − 6k + 11
k − 6k + 11k
= = =
6 6 6
When k = 4, the term equals to 2. For k ≥ 4, all terms in the expression are
positive and increasing in size, so the whole expression is increasing. Therefore,
the element is overcounted and S1 −S2 +S3 will be larger than the correct answer.
6. (a) Firstly we can choose 3 fixed points, there are 83 ways to do so. Then
2
n
(b) For any n, k, f (n, k) = k · Dn−k ,
(c) For each term of k ·f (n, k), it can be imagined as highlighting every fixed
point for all permutations of {1, 2, 3, . . . , n}. As there are totally n! permutations
and each number will appear at each position an equal number of times, i.e.,
(n − 1)! number of times. Then 1 will appear at position 1 (n − 1)! number of
times, 2 will appear at position 2 (n−1)! number of times, etc. PnThe final number
of fixed points summed up will be (n−1)!·n = n! Therefore k=0 (k · f (n, k)) =
n!