Olympiad Maths Prep

Track / Stage 7 / 147 of 300 #1547 of 2000

Problem 1547

National olympiad second round; IMO P1/P4
Geometry Difficulty 7.3 Prove it

Alice is drawing a shape on a piece of paper. She starts by placing her pencil at the origin, and then draws line segments of length one, alternating between vertical and horizontal segments. Eventually, her pencil returns to the origin, forming a closed, non-self-intersecting shape. Show that the area of this shape is even if and only if its perimeter is a multiple of eight.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

1. Define the coordinates and movement rules:
Let (xi,yi)(x_i, y_i) be the coordinates of the points of the polygon, with i{1,2,,n}i \in \{1, 2, \ldots, n\}. Assume that Alice starts at the origin (0,0)(0, 0) and alternates between drawing horizontal and vertical segments of length 1. Without loss of generality, assume the first segment is horizontal. Thus, x1=y1=0x_1 = y_1 = 0.

2. Movement rules:
- For even ii, xi+1=xix_{i+1} = x_i and yi+1=yi±1y_{i+1} = y_i \pm 1.
- For odd ii, xi+1=xi±1x_{i+1} = x_i \pm 1 and yi+1=yiy_{i+1} = y_i.

Let ei,ji{1,1}e_i, j_i \in \{-1, 1\} be such that xi+1=xi+eix_{i+1} = x_i + e_i for odd ii and yi+1=yi+jiy_{i+1} = y_i + j_i for even ii.

3. Perimeter must be a multiple of 4:
Since the shape is closed and non-self-intersecting, the sum of all eie_i and jij_i must be zero. Given that there are n2\frac{n}{2} horizontal and n2\frac{n}{2} vertical segments, n2\frac{n}{2} must be even, implying nn is a multiple of 4.

4. Shoelace formula for area:
The shoelace formula for the area AA of a polygon with vertices (x1,y1),(x2,y2),,(xn,yn)(x_1, y_1), (x_2, y_2), \ldots, (x_n, y_n) is:
A=12i=1n(xiyi+1yixi+1) A = \frac{1}{2} \left| \sum_{i=1}^{n} (x_i y_{i+1} - y_i x_{i+1}) \right|
Since the shape is closed, xn+1=x1x_{n+1} = x_1 and yn+1=y1y_{n+1} = y_1.

5. Simplify the area calculation:
For even ii, xi+1=xix_{i+1} = x_i and for odd ii, yi+1=yiy_{i+1} = y_i. Thus, the terms involving xiyi+1x_i y_{i+1} and yixi+1y_i x_{i+1} simplify:
A=12odd i(xiyi+1yixi+1) A = \frac{1}{2} \left| \sum_{\text{odd } i} (x_i y_{i+1} - y_i x_{i+1}) \right|
Since xi+1=xi+eix_{i+1} = x_i + e_i and yi+1=yi+jiy_{i+1} = y_i + j_i, the area can be expressed as:
A=12odd iyiei A = \frac{1}{2} \left| \sum_{\text{odd } i} y_i e_i \right|

6. Parity of the area:
The area AA is even if and only if the sum odd iyiei\sum_{\text{odd } i} y_i e_i is even. We can assume ei=1e_i = 1 and ji=1j_i = 1 for simplicity, leading to:
A=12odd iyi A = \frac{1}{2} \left| \sum_{\text{odd } i} y_i \right|
Since yiy_i changes by ±1\pm 1 for each vertical segment, the sum odd iyi\sum_{\text{odd } i} y_i is even if and only if nn is a multiple of 8.

7. Conclusion:
Therefore, the area of the shape is even if and only if the perimeter (which is nn) is a multiple of 8.

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