Back to problem set

Disclaimer: these are my personal solutions; they have not been reviewed, so be careful relying on them as there might be errors. Some competitions may have official solutions from the contest publishers which you may wish to refer to instead if you’re looking for verified solutions.

Problem A1

A grasshopper starts at the origin in the coordinate plane and makes a sequence of hops. Each hop has length 55, and after each hop the grasshopper is at a point whose coordinates are both integers; thus, there are 1212 possible locations for the grasshopper after the first hop. What is the smallest number of hops needed for the grasshopper to reach the point (2021,2021)(2021, 2021)?

Solution

Open to see the solution; try solving it first!

Since each hop is of length 55 and only integral positions are allowed, that means the grasshopper can move in any of the following ways:

  • (0,±5)(0, \pm 5) or (±5,0)(\pm 5, 0)
  • (±3,±4)(\pm 3, \pm 4) or (±4,±3)(\pm 4, \pm 3)

The first of these is straightforward; the second group is because (3,4,5)(3, 4, 5) are the side lengths of a right triangle.

To go from (0,0)(0, 0) to (2021,2021)(2021, 2021) we need to move as efficiently as possible diagonally across both xx and yy directions, so taking alternating (3,4)(3, 4) and (4,3)(4, 3) steps moves the grasshopper closer to the goal by (7,7)(7, 7) every two steps.

Note: the alternative of using steps (5,0)(5, 0) and (0,5)(0, 5) in either order only moves us by (5,5)(5, 5) every two steps instead, which is not nearly as efficient.

Unfortunately, 20212021 is not divisible by 77, so the grasshopper will need to make some adjustments as it gets closer to the target.

Since 2021/7=288\lfloor 2021 / 7 \rfloor = 288, the grasshopper initially will need to make 2882=576288 \cdot 2 = \mathbf{576} hops (since the grasshopper needs 22 hops to move (7,7)(7, 7) diagonally), and the grasshopper will actually end up at (2887,2887)=(2016,2016)(288 \cdot 7, 288 \cdot 7) = (2016, 2016).

This puts the grasshopper (2021,2021)(2016,2016)=(5,5)(2021, 2021) - (2016, 2016) = (5, 5) away from its goal, which it can reach in 2\mathbf{2} additional hops: (5,0)(5, 0) and (0,5)(0, 5) in either order.

Thus, the total number of hops the grasshopper will need is 576+2=578576 + 2 = \boxed{578} hops.