Maths Olympiad Prep

Library / /456 of 462

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 0x20180 \le x \le 2018 and 0y20180 \le y \le 2018. Let VnV_n denote the number of nice isosceles triangles for which the coordinates of each vertex satisfy yny \le n. Prove that
Vn+1=2Vn2Vn2+Vn3for 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 yny \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 Vn1V_{n-1}. Therefore, we obtain
Vn=Vn1+Enfor n1.(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 yny \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,ny)(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 yny \le n and at least one vertex has y=ny = n and at least one vertex has y=0y = 0. We then have
En=En1+Bnfor n2,(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 yny \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 En1E_{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 yny \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=bc2018|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,n1)(2018, n - 1) we see that PR2|PR|^2 and QR2|QR|^2 do not exceed 20182+(n1)22018^2 + (n - 1)^2. Because we also have PQ2n2|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=acr = |a - c| and s=bcs = |b - c|, we get
r2+y2=PR2=QR2=s2+(ny)2, r^2 + y^2 = |PR|^2 = |QR|^2 = s^2 + (n - y)^2,
i.e. r2s2=n(n2y)r^2 - s^2 = n(n - 2y). If rsr \neq s, then n2yn \neq 2y and n2y1|n - 2y| \ge 1, hence r2s2n|r^2 - s^2| \ge n. In case n=20182n = 2018^2 and n2yn \neq 2y, we even have n2y2|n - 2y| \ge 2 and we obtain r2s2220182>20182|r^2 - s^2| \ge 2 \cdot 2018^2 > 2018^2. However, we have 0r,s20180 \le r, s \le 2018 and so r2s220182|r^2 - s^2| \le 2018^2.

This shows that we need to have r=sr = s and n=2yn = 2y, whenever n20182n \ge 2018^2. In particular, if n20182n \ge 2018^2 is odd, Cn=0C_n = 0. If n20182n \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 cac \neq a. Therefore, if n20182n \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 n20182.(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+VnVn1+Bn+1=2VnVn1+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 n1n \ge 1.

Replacing nn by n2n-2 we obtain
Vn=2Vn1Vn2+Bnfor all n3. 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=2Vn2Vn2+Vn3Bn1+Bn+1=2Vn2Vn2+Vn3 \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,000 problems in a working order, from AMC 10 level to the IMO shortlist.

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