You are on page 1of 3

2023-24 First Semester

MATH 3600 Discrete Mathematics


Discussion Class 4

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?

|A1 ∪ A2 ∪ A3 ∪ A4 ∪ A5 ∪ A6 | = 9 × 103 − 9 × 9 × 8 × 7 = 4464

(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

If the union of any 4 subsets is not empty, then the results of S1 − S2 + S3


are larger than the correct answer.
Proof: Consider an element that is in 4 or more subsets. Assume the element
is counted k times. Then the number of times it is calculated in S1 is k1 , the


number of times it is counted in S2 is k2 , etc. Using the inclusion-exclusion




principle, the element should be counted precisely once. I.e.,


       
k k k k−1 k
− + − . . . + (−1) =1
1 2 3 k
But when there are only 3 terms, k1 − k2 + k3 equals
  

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.

5. (a) 1000 = 23 · 53 . When considering unit digits, 0,2,4,6,8 are multiples


of 2 and 0,5 are multiples of 5. Then to be relatively prime with 1000, the unit
digit must be 1,3,7,9. Then φ (1000) = 4 · 10 · 10 = 400 as the tens and hundreds
digits can be any digit from 0 to 9.

(b) 2023 = 7 · 172 . By the inclusion-exclusion principle,


2023 2023 2023
φ (2023) = 2023 − − + = 1632
7 17 7 · 17
.

(c) Similarly to part (b),


k
!
n n n n n k
Y n
φ (n) = n − − − ... − + + + . . . + (−1)
p1 p2 pk p1 p2 p1 p3 p
i=1 i

,which is equivalent to φ (n) = n · (1 − 1/p1 ) (1 − 1/p2 ) . . . (1/1 − pk )

6. (a) Firstly we can choose 3 fixed points, there are 83 ways to do so. Then


the 5 remaining numbers must be deranged, which equals to D5 = 44. Then


f (8, 3) = 83 · D5 = 2464.


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!

You might also like