Unofficial archive — problems, solutions & results © IMC, reproduced with permission.

IMC / 1999 / Problems / Day 2, P8

IMC 1999 · Day 2 · P8

medium

We throw a dice (which selects one of the numbers 1,2,,61, 2, \dots, 6 with equal probability) nn times. What is the probability that the sum of the values is divisible by 5?

Solution 1 of 3 (official)

For all nonnegative integers nn and modulo 5 residue class rr, denote by pn(r)p_n^{(r)} the probability that after nn throwing the sum of values is congruent to rr modulo nn. It is obvious that p0(0)=1p_0^{(0)} = 1 and p0(1)=p0(2)=p0(3)=p0(4)=0p_0^{(1)} = p_0^{(2)} = p_0^{(3)} = p_0^{(4)} = 0.

Moreover, for any n>0n > 0 we have pn(r)=i=1616pn1(ri).(1)\tag{1} p_n^{(r)} = \sum_{i=1}^{6} \frac{1}{6}\, p_{n-1}^{(r-i)}. From this recursion we can compute the probabilities for small values of nn and can conjecture that pn(r)=15+456np_n^{(r)} = \frac{1}{5} + \frac{4}{5 \cdot 6^n} if nr(mod5)n \equiv r \pmod{5} and pn(r)=15156np_n^{(r)} = \frac{1}{5} - \frac{1}{5 \cdot 6^n} otherwise. From (1), this conjecture can be proved by induction.

Solution 2 of 3 (official)

Let SS be the set of all sequences consisting of digits 1,,61, \dots, 6 of length nn. We create collections of these sequences.

Let a collection contain sequences of the form 666kXY1Ynk1,\underbrace{66 \dots 6}_{k} X Y_1 \dots Y_{n-k-1}, where X{1,2,3,4,5}X \in \{1, 2, 3, 4, 5\} and kk and the digits Y1,,Ynk1Y_1, \dots, Y_{n-k-1} are fixed. Then each collection consists of 5 sequences, and the sums of the digits of sequences give a whole residue system mod 5.

Except for the sequence 66666 \dots 6, each sequence is the element of one collection. This means that the number of the sequences, which have a sum of digits divisible by 5, is 15(6n1)+1\frac{1}{5}(6^n - 1) + 1 if nn is divisible by 5, otherwise 15(6n1)\frac{1}{5}(6^n - 1).

Thus, the probability is 15+456n\frac{1}{5} + \frac{4}{5 \cdot 6^n} if nn is divisible by 5, otherwise it is 15156n\frac{1}{5} - \frac{1}{5 \cdot 6^n}.

Solution 3 of 3 (official)

For arbitrary positive integer kk denote by pkp_k the probability that the sum of values is kk. Define the generating function f(x)=k=1pkxk=(x+x2+x3+x4+x5+x66)n.f(x) = \sum_{k=1}^{\infty} p_k x^k = \left( \frac{x + x^2 + x^3 + x^4 + x^5 + x^6}{6} \right)^n. (The last equality can be easily proved by induction.)

Our goal is to compute the sum k=1p5k\sum\limits_{k=1}^{\infty} p_{5k}. Let ε=cos2π5+isin2π5\varepsilon = \cos\frac{2\pi}{5} + i \sin\frac{2\pi}{5} be the first 5th root of unity. Then k=1p5k=f(1)+f(ε)+f(ε2)+f(ε3)+f(ε4)5.\sum_{k=1}^{\infty} p_{5k} = \frac{f(1) + f(\varepsilon) + f(\varepsilon^2) + f(\varepsilon^3) + f(\varepsilon^4)}{5}. Obviously f(1)=1f(1) = 1, and f(εj)=εjn6nf(\varepsilon^j) = \frac{\varepsilon^{jn}}{6^n} for j=1,2,3,4j = 1, 2, 3, 4. This implies that f(ε)+f(ε2)+f(ε3)+f(ε4)f(\varepsilon) + f(\varepsilon^2) + f(\varepsilon^3) + f(\varepsilon^4) is 46n\frac{4}{6^n} if nn is divisible by 5, otherwise it is 16n\frac{-1}{6^n}. Thus, k=1p5k\sum\limits_{k=1}^{\infty} p_{5k} is 15+456n\frac{1}{5} + \frac{4}{5 \cdot 6^n} if nn is divisible by 5, otherwise it is 15156n\frac{1}{5} - \frac{1}{5 \cdot 6^n}.

How the field did

contestants scored
87
average (of 20)
11.18
solved (≥ 80%)
49.4%
near-0 (≤ 10%)
32.2%
discrimination
0.58

Score distribution (field cohort)

Computed on contestants with a meaningful total (field cohort); discrimination is the corrected item–total correlation.

Similar problems

IMC 2021 · Day 1 · P2mediumavg 5.4/10 · solved 39% · near-0 19% · disc 0.46
IMC 2017 · Day 1 · P4very hardavg 1.4/10 · solved 11% · near-0 81% · disc 0.52
IMC 2022 · Day 2 · P5mediumavg 5.0/10 · solved 49% · near-0 45% · disc 0.41
IMC 1999 · Day 1 · P5mediumavg 5.5/10 · solved 48% · near-0 33% · disc 0.58