Olympiad Maths Prep

Track / Stage 10 / 33 of 40 #1993 of 2000

Problem 1993

Hardest shortlist tier
Number theory Difficulty 9.3 Prove it BMO 2022 shortlist · Balkan Mathematical Olympiad · 2022

A hare and a tortoise run in the same direction, at constant but different speeds, around the base of a tall square tower. They start together at the same vertex, and the run ends when both return to the initial vertex simultaneously for the first time. Suppose the hare runs with speed 11, and the tortoise with speed less than 11. For what rational numbers xx is it true that, if the tortoise runs with speed xx, the fraction of the entire run for which the tortoise can see the hare is also xx?

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 solutions — 2

Solution 1

Suppose that x=pqx = \frac{p}{q} where p,qp, q are positive integers with p<qp < q and gcd(p,q)=1\gcd(p, q) = 1. Suppose that the hare takes pp minutes for a full turn about the tower. Then the tortoise takes qq minutes for a full turn. They will meet again at the same vertex pqpq minutes when the hare will make qq full turns and the tortoise will make pp full turns. In particular, the hare will overtake the tortoise exactly k=qpk = q - p times taking into account the start of the race but not the end of the race as an overtake.

The overtakes should occur at minutes 0,pqk,2pqk,,(k1)pqk0, \frac{pq}{k}, \frac{2pq}{k}, \dots, \frac{(k-1)pq}{k}. In those minutes the tortoise would have made 0,pk,2pk,,(k1)pk0, \frac{p}{k}, \frac{2p}{k}, \dots, \frac{(k-1)p}{k} full turns about the tower. Since (p,q)=1(p, q) = 1, then (p,k)=1(p, k) = 1 and therefore at these meeting points the tortoise would have in some order made some full turns about the tower plus another 0,1k,2k,,k1k0, \frac{1}{k}, \frac{2}{k}, \dots, \frac{k-1}{k} fraction of a full turn.

Case 1: Suppose kk is odd. We claim that the 0,1k,2k,,k1k0, \frac{1}{k}, \frac{2}{k}, \dots, \frac{k-1}{k} fractions of a full turn correspond, in some order to 0,1k,2k,,k1k0, \frac{1}{k}, \frac{2}{k}, \dots, \frac{k-1}{k} fractions of a side. To see this, given i=0,1,,k1i = 0, 1, \dots, k-1, note that if j14ik<j4\frac{j-1}{4} \le \frac{i}{k} < \frac{j}{4} for some j=1,2,3,4j = 1, 2, 3, 4 then the meeting point is on the jj-th side at a fraction of 4(ikj14)=4ik(j1)k4(\frac{i}{k} - \frac{j-1}{4}) = \frac{4i-k(j-1)}{k} of the side. No two such fractions can be equal. Indeed if
4ik(j1)k=4ik(j1)k \frac{4i - k(j - 1)}{k} = \frac{4i' - k(j' - 1)}{k}
then 4(ii)=k(jj)4(i' - i) = k(j' - j) and since (for i>ii' > i say) jj{1,2,3}j' - j \in \{1, 2, 3\}, then 2k2|k, a contradiction.

Now if the hare meets the tortoise at a fraction of ik\frac{i}{k} of the side, then the tortoise can see the hare for kikp4\frac{k-i}{k} \cdot \frac{p}{4} minutes. I.e. the time it takes the hare to reach the endpoint of the side. Furthermore, if ii is large enough, it is possible for the tortoise to also reach the endpoint before the hare reaches the next endpoint and thus see the hare for a little bit more. The tortoise takes kikq4\frac{k-i}{k} \cdot \frac{q}{4} minutes to reach the endpoint. The hare takes 2kikp4\frac{2k-i}{k} \cdot \frac{p}{4} minutes in total to reach the next endpoint. So the tortoise can see the hare for another
(2ki)pq(ki)4k=p4+(pq)(ki)4k=p+ik4 \frac{(2k - i)p - q(k - i)}{4k} = \frac{p}{4} + \frac{(p - q)(k - i)}{4k} = \frac{p + i - k}{4}
minutes, provided that this is non-negative. So the total meeting time is
p4(1k+2k++kk)+14(1+2++(p1))=p(k+1)8+(p1)p8=pq8 \frac{p}{4} \left( \frac{1}{k} + \frac{2}{k} + \dots + \frac{k}{k} \right) + \frac{1}{4} (1 + 2 + \dots + (p-1)) = \frac{p(k+1)}{8} + \frac{(p-1)p}{8} = \frac{pq}{8}
minutes. So we need x=18x = \frac{1}{8} which is accepted as k=7k = 7 is odd in this case.

Case 2: Suppose k=2rk = 2r where rr is odd. We claim that the 0,1k,2k,,k1k0, \frac{1}{k}, \frac{2}{k}, \dots, \frac{k-1}{k} fractions of a full turn correspond, in some order to 0,0,1r,1r,,r1r,r1r0, 0, \frac{1}{r}, \frac{1}{r}, \dots, \frac{r-1}{r}, \frac{r-1}{r} fractions of a side. The proof is similar to Case 1 with the meeting points being at fractions 4ik(ji)k=2ir(ji)r\frac{4i-k(j-i)}{k} = \frac{2i-r(j-i)}{r} of the sides. Two of these fractions are equal if and only if 4(ii)=k(jj)4(i' - i) = k(j' - j) which (for i>ii' > i say) can occur when j=j+2j' = j + 2 and i=i+ri' = i + r.

If they meet at a fraction of ir\frac{i}{r} of the side, the tortoise meets that hare for rirp4\frac{r-i}{r} \cdot \frac{p}{4} minutes plus possibly another
(2ri)pq(ri)4r=p4+(pq)(ri)4r=p+2i2r4 \frac{(2r - i)p - q(r - i)}{4r} = \frac{p}{4} + \frac{(p - q)(r - i)}{4r} = \frac{p + 2i - 2r}{4}
minutes provided this is non-negative. So (noting that pp is odd in this case) the tortoise can see the hare for
2p4(1r+2r++rr)+24(1+3++(p2))=p(r+1)4+(p1)28 \frac{2p}{4} \left( \frac{1}{r} + \frac{2}{r} + \dots + \frac{r}{r} \right) + \frac{2}{4} \left( 1 + 3 + \dots + (p-2) \right) = \frac{p(r+1)}{4} + \frac{(p-1)^2}{8}
minutes. This is equal to
p(2r+2)+(p1)28=p(qp+2)+(p1)28=pq+18 \frac{p(2r + 2) + (p - 1)^2}{8} = \frac{p(q - p + 2) + (p - 1)^2}{8} = \frac{pq + 1}{8}
minutes. So we need
pq=x=18+18pq    8p2=pq+1    p=1,q=7. \frac{p}{q} = x = \frac{1}{8} + \frac{1}{8pq} \implies 8p^2 = pq + 1 \implies p = 1, q = 7.
Thus x=17x = \frac{1}{7} which is accepted since k=62(mod4)k = 6 \equiv 2 \pmod{4}.

Case 3: Suppose k=4sk = 4s. Similarly to Cases 1 and 2, the 0,1k,2k,,k1k0, \frac{1}{k}, \frac{2}{k}, \dots, \frac{k-1}{k} fractions of a full turn correspond, in some order to 0,0,0,0,1s,1s,1s,1s,,s1s,s1s,s1s,s1s0, 0, 0, 0, \frac{1}{s}, \frac{1}{s}, \frac{1}{s}, \frac{1}{s}, \dots, \frac{s-1}{s}, \frac{s-1}{s}, \frac{s-1}{s}, \frac{s-1}{s} fractions of a side.
If they meet at a fraction of is\frac{i}{s} of the side, the tortoise meets that hare for sisp4\frac{s-i}{s} \cdot \frac{p}{4} minutes plus possibly another
pq=x=18+38pq    8p2=pq+3    p3 \frac{p}{q} = x = \frac{1}{8} + \frac{3}{8pq} \implies 8p^2 = pq + 3 \implies p|3
This gives the solutions p=1,q=5p = 1, q = 5 and p=3,q=23p = 3, q = 23 giving x=15x = \frac{1}{5} and x=323x = \frac{3}{23} which are both accepted.

Solution 2

If we run the process in reverse, the dynamics are the same except that the tortoise can see the hare at some time in the reversed process precisely if the hare could see the tortoise at the same time in the original process. From this observation, the proportion of the race for which the tortoise can see the hare is precisely half the proportion of the race for which the two runners are on the same side of the square. It suffices to show that this proportion is:

(a) 14\frac{1}{4}, when pqp-q is odd;
(b) 14+14pq\frac{1}{4} + \frac{1}{4pq} when pqp-q is even but not divisible by 4;
(c) 14+34pq\frac{1}{4} + \frac{3}{4pq} when 4pq4 \mid p-q.

The proof can then be completed exactly as in Solution 1 to get that x=18,17,15,323x = \frac{1}{8}, \frac{1}{7}, \frac{1}{5}, \frac{3}{23}.

To streamline the argument, we assume that the square (always meaning the boundary) has side length pqpq units, and that in a time-step, the tortoise moves pp units, and the hare moves qq units. Note that a runner can only be at the vertex of the square at the start or end of a step. We say that a vertex of the square is on the side of the square that lies clockwise from the vertex, and we refer to that as the side's associated vertex. So every point on the square is on exactly one 'side'.

Now, we index all points on the square by their distance from the vertex associated to the side containing that point. So each label occurs exactly four times. So, after nn steps of the process, we study the indices of T and H's current locations, which must have the form (ap,bq)(ap, bq) for a{0,1,,q1}a \in \{0, 1, \dots, q-1\} and b{0,1,,p1}b \in \{0, 1, \dots, p-1\}. Thus the total distances travelled by T and H have the forms
ap+mpq,bq+mpq,respectively, m,mN ap + mpq, \quad bq + m'pq, \quad \text{respectively, } m, m' \in \mathbb{N}
which means that the number of steps nn satisfies
n=a+mq=b+mp.(1) n = a + mq = b + m'p. \qquad (1)
T and H are on the same side of the square precisely when 4mm4 \mid m' - m and are on the same side or on opposite sides of the square precisely when 2mm2 \mid m' - m, equivalently when 2m+m2 \mid m' + m.

Now, after pqpq steps, both runners are again at a vertex of the square. We return to the case distinction introduced earlier.

(a) Here, the two vertices are adjacent. Therefore, for any time 0t<pq0 \le t < pq, T and H are on the same side of the square at exactly one of the times {t,t+pq,t+2pq,t+3pq}\{t, t + pq, t + 2pq, t + 3pq\}. It follows that across the entire run, T and H will be on the same side exactly 14\frac{1}{4} of the time.

(c) Here, the two vertices are the same. It then suffices to study the proportion of times the runners are on the same side before timestep pqpq. Note that by the Chinese Remainder Theorem, every (a,b)[0,q1]×[0,p1](a, b) \in [0, q-1] \times [0, p-1] occurs exactly once as the indexing of the runners' locations (ap,bq)(ap, bq) for n=0,,pq1n = 0, \dots, pq-1. But, from (1),
ab=mpmq(mm)p(mod4). a - b = m'p - mq \equiv (m' - m)p \pmod{4}.
Since pp is odd, 4mm4 \mid m' - m precisely if 4ab4 \mid a - b. So it suffices to enumerate
K(p,q):={(a,b)[0,q1]×[0,p1]:4ab}. K(p, q) := \left| \left\{ (a, b) \in [0, q-1] \times [0, p-1] : 4 \mid a-b \right\} \right|.
By considering the number of times each congruence class appears for aa and for bb, we find, for pq1p \equiv q \equiv 1:
K(p,q)=p+34×q+34+3(p14×q14), K(p, q) = \frac{p+3}{4} \times \frac{q+3}{4} + 3 \left( \frac{p-1}{4} \times \frac{q-1}{4} \right),
and for p1,q3p \equiv 1, q \equiv 3,
K(p,q)=p+34×q+14+2(p14×q+14)+p14×q34. K(p, q) = \frac{p+3}{4} \times \frac{q+1}{4} + 2 \left( \frac{p-1}{4} \times \frac{q+1}{4} \right) + \frac{p-1}{4} \times \frac{q-3}{4}.
In both cases, a calculation shows K(p,q)pq=14+34pq\frac{K(p,q)}{pq} = \frac{1}{4} + \frac{3}{4pq}, with an obvious symmetric argument for p3,q1p \equiv 3, q \equiv 1.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.