Maths Olympiad Prep

Library / HMMT November /667 of 672

HMMT November, 2023

Geometry Difficulty 6.0 AIME, harder Prove it United States

Problem:

Compute the number of ways a non-self-intersecting concave quadrilateral can be drawn in the plane such that two of its vertices are (0,0)(0,0) and (1,0)(1,0), and the other two vertices are two distinct lattice points (a,b),(c,d)(a, b),(c, d) with 0≤a,c≤590 \leq a, c \leq 59 and 1≤b,d≤51 \leq b, d \leq 5.

(A concave quadrilateral is a quadrilateral with an angle strictly larger than 180∘180^{\circ}. A lattice point is a point with both coordinates integers.)

Solution

Solution:

We instead choose points (0,0)(0,0), (1,0)(1,0), (a,b)(a, b), (c,d)(c, d) with 0≤a,c≤590 \leq a, c \leq 59 and 0≤b,d≤50 \leq b, d \leq 5 with (c,d)(c, d) in the interior of the triangle formed by the other three points. Any selection of these four points may be connected to form a concave quadrilateral in precisely three ways.

Apply Pick's theorem to this triangle. If II is the count of interior points, and BB is the number of boundary lattice points, we have that the triangle's area is equal to

b2=I+B2−1 \frac{b}{2} = I + \frac{B}{2} - 1

Let's first compute the number of boundary lattice points on the segment from (0,0)(0,0) to (a,b)(a, b), not counting (0,0)(0,0). This is just gcd⁡(a,b)\operatorname{gcd}(a, b). Similarly, there are gcd⁡(a−1,b)\operatorname{gcd}(a-1, b) boundary lattice points from (1,0)(1,0) to (a,b)(a, b). Adjusting for the overcounting at (a,b)(a, b), we have

B=gcd⁡(a,b)+gcd⁡(a−1,b)−1 B = \operatorname{gcd}(a, b) + \operatorname{gcd}(a-1, b) - 1

and thus

I=b−gcd⁡(a,b)−gcd⁡(a−1,b)+12 I = \frac{b - \operatorname{gcd}(a, b) - \operatorname{gcd}(a-1, b) + 1}{2}

which we notice is periodic in aa with period bb. That is, the count of boundary points does not change between choices (a,b)(a, b) and (a+b,b)(a+b, b).

We wanted to find the sum across all (a,b)(a, b) of II, the number of interior points (c,d)(c, d). Using casework on bb, the periodicity allows us to just check II across points with 0≤a<b0 \leq a < b, and then multiply the count by 60b\frac{60}{b} to get the sum of II across the entire row of points.

For b=1,2b=1,2, we always have I=0I=0.

For b=3b=3, we have I=0I=0 at (0,3)(0,3), (1,3)(1,3) and I=1I=1 for (2,3)(2,3). Using periodicity, this yy-coordinate has a total of

(0+0+1)⋅603=20 (0+0+1) \cdot \frac{60}{3} = 20

For b=4b=4, we have I=0I=0 at (0,4)(0,4) and (1,4)(1,4), and I=1I=1 at both (2,4)(2,4) and (3,4)(3,4). Using periodicity, this yy-coordinate has a total of

(0+0+1+1)⋅604=30 (0+0+1+1) \cdot \frac{60}{4} = 30

For b=5b=5, we have I=0I=0 at (0,5)(0,5), (1,5)(1,5) and I=2I=2 at (2,5)(2,5), (3,5)(3,5), (4,5)(4,5). Using periodicity, this yy-coordinate has a total of

(0+0+2+2+2)⋅605=72 (0+0+2+2+2) \cdot \frac{60}{5} = 72

Adding our cases, we have 20+30+72=12220+30+72=122 ways to choose the four points. Multiplying back by the number of ways to connect the quadrilateral gives an answer of 122⋅3=366122 \cdot 3 = 366.

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.