Maths Olympiad Prep

Library / /33 of 36

, 2023

Number theory Difficulty 8.9 Shortlist Prove it Baltic Way

In the land of Flensburg there is a single, infinitely long, street with houses numbered 2,3,2, 3, \ldots The police in Flensburg is trying to catch a thief which every day moves from the house where he is currently hiding to one of its neighbouring houses.
To taunt the local law enforcement the thief reveals every day the highest prime divisor of the house he will move to.
Every Sunday the police are allowed to search a single house, and they catch the thief if they search the house he is currently occupying. Determine if the thief will be able to escape the police indefinitely or if the police has a strategy to catch the thief in finite time.

Solution

We will prove that the police are always able to catch the thief in finite time.
Let hih_i denote the house the thief stays at the ii-th night and pip_i denote the greatest prime divisor of hih_i.
The police know that he stays at different neighbouring houses every night, so hi+1hi=1|h_{i+1} - h_i| = 1 for all non-negative integers ii. Let us assume that the police are given the address of the thief's first two hiding spots, then we will prove by induction that the police can determine hih_i precisely except being unable to distinguish between houses numbered 22 and 44.

Assume the police knows hi2h_{i-2} and hi1h_{i-1}, then they know that hi=hi2h_i = h_{i-2} or hi=2hi1hi2h_i = 2h_{i-1} - h_{i-2}. In the first case they will receive pi=pi2p_i = p_{i-2} and in the latter case they will receive pip_i as the biggest prime divisor of 2hi1hi22h_{i-1} - h_{i-2}. Assume that they are unable to distinguish between these two cases, i.e., that pi=pi2p_i = p_{i-2}, which implies
pi22hi1hi2, i.e. pi22hi1, i.e. pi22, i.e. pi2=2 p_{i-2} \mid 2h_{i-1} - h_{i-2}, \text{ i.e. } p_{i-2} \mid 2h_{i-1}, \text{ i.e. } p_{i-2} \mid 2, \text{ i.e. } p_{i-2} = 2
since hi1hi2=1|h_{i-1} - h_{i-2}| = 1 implies gcd(hi1,hi2)=1\gcd(h_{i-1}, h_{i-2}) = 1. Moreover, since pi=pi2=2p_i = p_{i-2} = 2 are the biggest prime divisors of hi=2hi1hi2h_i = 2h_{i-1} - h_{i-2} and hi2h_{i-2} they must both be powers of 22. However, the only powers of two with a difference of exactly 22 are 22 and 44. Hence {hi2,2hi1hi2}={2,4}\{h_{i-2}, 2h_{i-1} - h_{i-2}\} = \{2, 4\}, i.e. hi1=2+42=3h_{i-1} = \frac{2+4}{2} = 3.

Thus, either the police will with certainty be able to determine hih_i or hi1=3h_{i-1} = 3, in which case hih_i may equal either 22 or 44. To complete the inductive step we observe that the police are always able to determine the parity of hjh_j, since it changes every day. Thus, in the future if the police know that hj[2,4]h_j \in [2, 4], then they can either determine hj=3h_j = 3 or hj{2,4}h_j \in \{2, 4\}. However, the only way for the thief to leave the interval [2,4][2, 4] is to go to house number 55, in which case the police will be alerted by receiving pj=5p_j = 5, and they can again with certainty determine hj=5h_j = 5 and hj1=4h_{j-1} = 4 preserving our inductive hypothesis.

To summarize, if the police knows both h0h_0 and h1h_1, then they can always determine hih_i with certainty until hi1=3h_{i-1} = 3. After this point they will have known the two last hiding places of the thief if he leaves the interval [2,4][2, 4], restoring the inductive hypothesis, or otherwise, if he never leaves [2,4][2, 4] be able to determine his position, up to confusion about 22 and 44 using the parity of the day.

Now, to catch the thief in finite time, they may methodically try to guess all viable pairs of (h0,h1)(h_0, h_1), i.e. h0,h1N2h_0, h_1 \in \mathbb{N}_{\ge 2} and h0h1=1|h_0 - h_1| = 1, of which there are countably many.
For each viable starting position, let us consider either the immediate Sunday or the one after that, since each week has an odd amount of days, we are certain that exactly one of these days gives us that the thief is hiding in an odd house (given our assumption on his starting position). Thus, due to our inductive hypothesis, we can precisely determine where the thief will be, and search this house.
If the thief is hiding in that house, the police wins, and if not, they will with certainty know that their guess of starting positions was incorrect, and move onto the next guess. By the above argument, each guess of initial starting positions requires at most two weeks, meaning that the police will catch the thief in finite time.

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 and solution reproduced as published; topic and difficulty added by this site.