Maths Olympiad Prep

Library / Irish Mathematical Olympiad /234 of 236

Irish Mathematical Olympiad

Combinatorics Difficulty 7.7 National Olympiad, round 2 Prove it Ireland

A non-degenerate triangle is formed by three points that are not collinear. A triangle is called nice if it is non-degenerate and its vertices have integer coordinates (x,y)(x, y) such that 0≤x≤20180 \le x \le 2018 and 0≤y≤20180 \le y \le 2018. Let VnV_n denote the number of nice isosceles triangles for which the coordinates of each vertex satisfy y≤ny \le n. Prove that
Vn+1=2Vn−2Vn−2+Vn−3for all n>20182. V_{n+1} = 2V_n - 2V_{n-2} + V_{n-3} \quad \text{for all } n > 2018^2.

Solution

We let EnE_n be the number of nice isosceles triangles for which the coordinates (x,y)(x, y) of all vertices satisfy y≤ny \le n and for at least one vertex we have y=ny = n. These triangles are part of the count for VnV_n but not for Vn−1V_{n-1}. Therefore, we obtain
Vn=Vn−1+Enfor n≥1.(19) V_n = V_{n-1} + E_n \quad \text{for } n \ge 1. \quad (19)
We remark that EnE_n is also equal to the number of nice isosceles triangles for which the coordinates (x,y)(x, y) of all vertices satisfy y≤ny \le n and for at least one vertex we have y=0y = 0. To see this, replace each vertex (x,y)(x, y) by (x,n−y)(x, n-y). Let now BnB_n denote the number of all nice isosceles triangles for which the coordinates (x,y)(x, y) of all vertices satisfy y≤ny \le n and at least one vertex has y=ny = n and at least one vertex has y=0y = 0. We then have
En=En−1+Bnfor n≥2,(20) E_n = E_{n-1} + B_n \quad \text{for } n \ge 2, \quad (20)
because we can split the set of nice isosceles triangles for which the coordinates (x,y)(x, y) of all vertices satisfy y≤ny \le n and for at least one vertex we have y=0y = 0 (totalling to EnE_n) into the set of those for which all vertices have y<ny < n (giving En−1E_{n-1}) and those for which at least one vertex has y=ny = n (giving BnB_n).

We now split the set (with BnB_n elements) of all nice isosceles triangles for which the coordinates (x,y)(x, y) of all vertices satisfy y≤ny \le n and at least one vertex has y=ny = n and at least one vertex has y=0y = 0 into two subsets. One subset contains all those triangles that have a vertex with coordinates (x,y)(x, y) with 0<y<n0 < y < n. The number of triangles in this subset is denoted by CnC_n. The other subset consists of those triangles that do not have a vertex with 0<y<n0 < y < n and its number of elements is denoted by DnD_n. We then have Bn=Cn+DnB_n = C_n + D_n.

The crucial observations are that DnD_n does not depend on nn and that CnC_n depends on the parity of nn only, provided that nn is large enough. We now explain why.

Consider a nice isosceles triangle that has vertices P=(a,0)P = (a, 0), Q=(b,n)Q = (b, n) and R=(c,n)R = (c, n). Both, ∣PQ∣|PQ| and ∣PR∣|PR|, are at least nn and ∣QR∣=∣b−c∣≤2018|QR| = |b - c| \le 2018. If n>2018n > 2018, we cannot have an isosceles triangle in which QRQR is one of the equal sides. Hence, we need to have ∣PQ∣=∣PR∣|PQ| = |PR| and this happens exactly when 2a=b+c2a = b + c. Therefore, PP is completely determined by QQ and RR and no such PP exists if aa and bb differ by an odd number. This shows that DnD_n does not depend on nn as long as n>2018n > 2018.

Consider now a nice isosceles triangle PQRPQR with vertices P=(a,0)P = (a, 0), Q=(b,n)Q = (b, n) and R=(c,y)R = (c, y) such that 0<y<n0 < y < n. Considering the diagonal from (0,0)(0, 0) to (2018,n−1)(2018, n - 1) we see that ∣PR∣2|PR|^2 and ∣QR∣2|QR|^2 do not exceed 20182+(n−1)22018^2 + (n - 1)^2. Because we also have ∣PQ∣2≥n2|PQ|^2 \ge n^2, we obtain ∣PQ∣>∣QR∣|PQ| > |QR| and ∣PQ∣>∣PR∣|PQ| > |PR| as soon as 2n>20182+12n > 2018^2 + 1. Therefore, for such nn, we need to have ∣PR∣=∣QR∣|PR| = |QR|. If we let r=∣a−c∣r = |a - c| and s=∣b−c∣s = |b - c|, we get
r2+y2=∣PR∣2=∣QR∣2=s2+(n−y)2, r^2 + y^2 = |PR|^2 = |QR|^2 = s^2 + (n - y)^2,
i.e. r2−s2=n(n−2y)r^2 - s^2 = n(n - 2y). If r≠sr \neq s, then n≠2yn \neq 2y and ∣n−2y∣≥1|n - 2y| \ge 1, hence ∣r2−s2∣≥n|r^2 - s^2| \ge n. In case n=20182n = 2018^2 and n≠2yn \neq 2y, we even have ∣n−2y∣≥2|n - 2y| \ge 2 and we obtain ∣r2−s2∣≥2⋅20182>20182|r^2 - s^2| \ge 2 \cdot 2018^2 > 2018^2. However, we have 0≤r,s≤20180 \le r, s \le 2018 and so ∣r2−s2∣≤20182|r^2 - s^2| \le 2018^2.

This shows that we need to have r=sr = s and n=2yn = 2y, whenever n≥20182n \ge 2018^2. In particular, if n≥20182n \ge 2018^2 is odd, Cn=0C_n = 0. If n≥20182n \ge 2018^2 is even, CnC_n is not equal to zero but does not depend on nn because the triangles we count are determined by the choice of a=ba = b and c≠ac \neq a. Therefore, if n≥20182n \ge 2018^2, CnC_n depends on the parity of nn only.

Because Bn=Cn+DnB_n = C_n + D_n, we see now that BnB_n depends on the parity of nn only, i.e.
Bn+2=Bn for n≥20182.(21) B_{n+2} = B_n \text{ for } n \ge 2018^2. \qquad (21)

The desired recurrence is now obtained as follows:
Vn+1=Vn+En+1=Vn+En+Bn+1=Vn+Vn−Vn−1+Bn+1=2Vn−Vn−1+Bn+1 \begin{align*} V_{n+1} &= V_n + E_{n+1} \\ &= V_n + E_n + B_{n+1} \\ &= V_n + V_n - V_{n-1} + B_{n+1} \\ &= 2V_n - V_{n-1} + B_{n+1} \end{align*}
using (19)
valid for all n≥1n \ge 1.

Replacing nn by n−2n-2 we obtain
Vn=2Vn−1−Vn−2+Bnfor all n≥3. V_n = 2V_{n-1} - V_{n-2} + B_n \quad \text{for all } n \ge 3.
Substituting this in the previous equation finally gives
Vn+1=2Vn−2Vn−2+Vn−3−Bn−1+Bn+1=2Vn−2Vn−2+Vn−3 \begin{align*} V_{n+1} &= 2V_n - 2V_{n-2} + V_{n-3} - B_{n-1} + B_{n+1} \\ &= 2V_n - 2V_{n-2} + V_{n-3} \end{align*}
using (21)
for all n>20182n > 2018^2.

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

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.