An eccentric mathematician has a ladder with $ n$ rungs that he always ascends and descends in the following way: When he ascends, each step he takes covers $ a$ rungs of the ladder, and when he descends, each step he takes covers $ b$ rungs of the ladder, where $ a$ and $ b$ are fixed positive integers. By a sequence of ascending and descending steps he can climb from ground level to the top rung of the ladder and come back down to ground level again. Find, with proof, the minimum value of $ n,$ expressed in terms of $ a$ and $ b.$
Problem
Source: IMO ShortList 1990, Problem 13 (IRE)
Tags: number theory, relatively prime, recurrence relation, counting, Frobenius, IMO Shortlist
17.08.2008 04:03
02.03.2013 01:14
tjhance wrote: Now suppose there exists a cycle for this mathematician, such that he can start at one rung and end up back at that rung, and consider the smallest such cycle. If he makes $ x$ ascending steps and $ y$ descending steps, then $ xa=yb$. We assume $ a$ and $ b$ are relatively prime here, so the minimum possible value of $ x$ is $ b$, But, what if such a cycle doesn't exist?
22.05.2018 14:27
yunustuncbilek wrote: tjhance wrote: Now suppose there exists a cycle for this mathematician, such that he can start at one rung and end up back at that rung, and consider the smallest such cycle. If he makes $ x$ ascending steps and $ y$ descending steps, then $ xa=yb$. We assume $ a$ and $ b$ are relatively prime here, so the minimum possible value of $ x$ is $ b$, But, what if such a cycle doesn't exist? Eventually,if he wants to get back
19.11.2021 12:57
Solved with Aayuu We claim that the answer is $\boxed{a+b-\gcd (a,b)}$. By bezout's lemma we may find $x,y \geq 0$ with $ax-by=\gcd(a,b)$. Then we have $b(y+1)-a(x-1)=a+b-\gcd(a,b)$, and it is clear that we can perform such a sequence of moves (if we are ever "stuck" then we would have $ka<b$ which is obviously impossible). This shows that the answer works. Suppose now that we have $n<a+b-1$. Considering all the moves in total, we have $ax=by$ for some $x,y \in\mathbb{Z}$, which implies that we move down atleast $a$ times and similarly move up atleast $b$ times. Since $\gcd(a,b)=1$, $b \cdot k$ (for $k \in \{0,1,\dots,a-1\})$ forms a complete residue system modulo $a$, so we would necessarily have the height be $b-1 \pmod a$ at some point. But since $n<a+b-1$, we have no legal move at this point which is obviously a contradiction. This completes the proof and we are done. $\blacksquare$
26.04.2023 01:00
The answer is $a + b - \gcd(a,b)$. We will only solve the case where $\gcd(a,b) = 1$ because the general answer follows by a suitable homothety on the ladder. In other words, we will assume $\gcd(a,b)=1$ and show the answer is $a+b-1$. To prove $n=a+b-1$ is possible, we use the following algorithm to ascend to the top of the ladder (the descent is symmetric). The mathematician goes up by $a$ if possible. Otherwise he goes down by $b$; this must be possible since there are at least $n-(a-1)=b$ rungs below him. To show this works, note that if the mathematician ever visits the same rung twice, then he must have had at least $a$ descents (and at least $b$ ascents). Since $\gcd(a,b)=1$, this means the mathematician visited a rung in every residue class modulo $a$. But if they had visited the rung which was $b-1 \pmod a$, then they reach the top of the ladder. We now prove that $n < a+b-1$ isn't possible by contradiction. Given a trip with total displacement $0$, again, this means that the mathematician took at least $a$ descents and $b$ ascents, and hit every residue class modulo $a$ or $b$. WLOG, let's assume $a \ge b$, and consider the rung $n-a+1$. It is the only rung which is $n-1 \pmod a$, so it must have been visited but there are no legal moves from this rung, a contradiction.