Maths Olympiad Prep

Library / /439 of 520

Number theory Difficulty 7.4 National olympiad, round 2 Prove it

Suppose that n numbers x1,x2,...,xnx_1, x_2, . . . , x_n are chosen randomly from the set {1,2,3,4,5}\{1, 2, 3, 4, 5\}. Prove that the probability that x12+x22++xn20(mod5)x_1^2+ x_2^2 +\cdots+ x_n^2 \equiv 0 \pmod 5 is at least 15.\frac 15.

Solution

1. **Identify the possible values of xi2mod5 x_i^2 \mod 5 :**
Since xi x_i is chosen from the set {1,2,3,4,5}\{1, 2, 3, 4, 5\}, we compute xi2mod5 x_i^2 \mod 5 :
121(mod5),2241(mod5),32941(mod5),42161(mod5),52250(mod5). \begin{aligned} 1^2 &\equiv 1 \pmod{5}, \\ 2^2 &\equiv 4 \equiv -1 \pmod{5}, \\ 3^2 &\equiv 9 \equiv 4 \equiv -1 \pmod{5}, \\ 4^2 &\equiv 16 \equiv 1 \pmod{5}, \\ 5^2 &\equiv 25 \equiv 0 \pmod{5}. \end{aligned}
Therefore, xi2mod5{0,1,1} x_i^2 \mod 5 \in \{0, 1, -1\} .

2. Calculate the probabilities:
P(xi21(mod5))=P(xi21(mod5))=25,P(xi20(mod5))=15. \mathbb{P}(x_i^2 \equiv 1 \pmod{5}) = \mathbb{P}(x_i^2 \equiv -1 \pmod{5}) = \frac{2}{5}, \quad \mathbb{P}(x_i^2 \equiv 0 \pmod{5}) = \frac{1}{5}.

3. **Define the sum Sn S_n and probabilities pn,qn,rn p_n, q_n, r_n :**
Let Sn=i=1nxi2 S_n = \sum_{i=1}^n x_i^2 . Define:
pn=P(Sn0(mod5)),qn=P(Sn1(mod5)),rn=P(Sn2(mod5)). \begin{aligned} p_n &= \mathbb{P}(S_n \equiv 0 \pmod{5}), \\ q_n &= \mathbb{P}(S_n \equiv 1 \pmod{5}), \\ r_n &= \mathbb{P}(S_n \equiv 2 \pmod{5}). \end{aligned}

4. Key observation:
If Sn1(mod5) S_n \equiv 1 \pmod{5} , then i=1n(2xi)21(mod5) \sum_{i=1}^n (2x_i)^2 \equiv -1 \pmod{5} . This implies:
P(Sn1(mod5))=qn. \mathbb{P}(S_n \equiv -1 \pmod{5}) = q_n.
Similarly, P(Sn2(mod5))=rn \mathbb{P}(S_n \equiv -2 \pmod{5}) = r_n .

5. Set up the recursion relations:
Using the law of total probability with respect to xn x_n :
pn=15pn1+45qn1,qn=25pn1+15qn1+25rn1,rn=25qn1+35rn1. \begin{aligned} p_n &= \frac{1}{5} p_{n-1} + \frac{4}{5} q_{n-1}, \\ q_n &= \frac{2}{5} p_{n-1} + \frac{1}{5} q_{n-1} + \frac{2}{5} r_{n-1}, \\ r_n &= \frac{2}{5} q_{n-1} + \frac{3}{5} r_{n-1}. \end{aligned}

6. Matrix form of the recursion:
(pnqnrn)=(1545025152502535)(pn1qn1rn1). \begin{pmatrix} p_n \\ q_n \\ r_n \end{pmatrix} = \begin{pmatrix} \frac{1}{5} & \frac{4}{5} & 0 \\ \frac{2}{5} & \frac{1}{5} & \frac{2}{5} \\ 0 & \frac{2}{5} & \frac{3}{5} \end{pmatrix} \begin{pmatrix} p_{n-1} \\ q_{n-1} \\ r_{n-1} \end{pmatrix}.

7. Initial conditions:
(p1,q1,r1)=(15,25,0). (p_1, q_1, r_1) = \left(\frac{1}{5}, \frac{2}{5}, 0\right).

8. Analyze the recursion:
By studying the recursion, we find:
pn=15 for every odd n,pn>15 for every even n. p_n = \frac{1}{5} \text{ for every odd } n, \quad p_n > \frac{1}{5} \text{ for every even } n.
This can be shown by induction, considering the parity of n n .

Conclusion:
The probability that Sn0(mod5) is at least 15. \boxed{\text{The probability that } S_n \equiv 0 \pmod{5} \text{ is at least } \frac{1}{5}.}

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.