Solution:
We set Mn=1/2 and mn=1/(n−1). We show that Mn is the maximum possible value for the last fraction, while mn is the minimum possible value for the last fraction. The proof consists of two parts: a construction showing that these values are indeed achievable, and a verification of the optimality of these values, that is, that one cannot obtain more or less.
Construction. To obtain mn we pair at each step the two largest numbers written on the board. At the first step we pair 1/1 and 1/2, obtaining 2/3. At the second step we pair 2/3 and 1/3, obtaining 1/2. Therefore, after two steps the numbers written on the board are
21,41,51,…,n1
At this point it is easily shown by induction that at the k-th step we will have on the board the numbers
k1,k+21,k+31,…,n1
and so after n−2 steps only 1/(n−2) and 1/n will remain, and composing them gives exactly mn.
The construction for Mn is analogous, simply pairing at each step the two smallest numbers. At the first step we pair 1/n and 1/(n−1), obtaining 2/(2n−1). At the second step we pair 2/(2n−1) and 1/(n−2), obtaining 1/(n−1). Therefore, after two steps we will have on the board the numbers
11,21,…,n−41,n−31,n−11.
At this point it is easily shown by induction that at the k-th step we will have on the board the numbers
11,21,…,n−k−21,n−k−11,n−k+11.
It follows that after n−2 steps only 1/1 and 1/3 will remain, and composing them gives exactly 1/2.
Optimality. To show that one cannot obtain more than Mn or less than mn we will use the following preliminary result.
Lemma. For every pair of positive rationals a/b and c/d (reduced to lowest terms) the following inequality holds
min{ba,dc}≤ba⋄dc≤max{ba,dc}.
Moreover, either of the two equalities holds if and only if a/b=c/d.
To prove the lemma, denote by m the minimum of the two rational numbers, and by M the maximum. This means that mb≤a≤Mb and md≤c≤Md, from which it follows that
m=b+dmb+md≤b+da+c≤b+dMb+Md=M
which is exactly the inequality of the claim. The same argument shows that, if a/b=c/d, then both inequalities are strict.
Let us now show that one cannot obtain more than Mn. Consider the first number x/y that interacts with 1/1. The number x/y is the result of operations carried out starting from the fractions {1/2,1/3,…,1/n}, and therefore by the lemma it will necessarily be less than or equal to 1/2. Moreover, if x/y=1/2, then necessarily the number 1/2 has never been involved in pirate sums up to this point (if it had been involved, by the lemma such sums would have produced numbers strictly less than 1/2). We now distinguish two cases.
- If x/y<1/2, then y>2x and hence y≥2x+1. It follows that
11⋄yx=y+1x+1≤2x+2x+1=21.
- If x/y=1/2, then obviously the pirate sum with 1/1 produces as result 2/3. Consider now the number e/f that at some point interacts with 2/3. By what we observed previously we know that e/f is the result of operations carried out starting from the fractions {1/3,…,1/n}, and therefore by the lemma it will necessarily be less than or equal to 1/3. But then f≥3e≥2e+1 and therefore
32⋄fe=3+f2+e≤2e+4e+2=21
In both cases we have reduced to having only fractions less than or equal to 1/2, and therefore by the lemma all the subsequent numbers, and in particular the last one remaining, will be less than or equal to 1/2.
We show in an analogous way that one cannot obtain less than mn. Let z/w be the first number that interacts with 1/n. By the lemma we know that z/w≥1/(n−1), and that the equality sign holds if and only if the number 1/(n−1) has never been used up to this point. We now distinguish two cases.
- If z/w>1/(n−1), then w<(n−1)z and hence w≤(n−1)z−1. It follows that
n1⋄wz=n+wz+1≥nz−z+n−1z+1=n−11
- If z/w=1/(n−1), then obviously the pirate sum with 1/n produces as result 2/(2n−1). Consider now the number h/k that at some point interacts with 2/(2n−1). By what we observed previously we know that h/k is the result of operations carried out starting from the fractions {1/1,1/2,…,1/(n−2)}, and therefore by the lemma it will necessarily be greater than or equal to 1/(n−2). But then k≤h(n−2)≤h(n−1)−1 and therefore
2n−12⋄kh=2n−1+k2+h≥2n−1+h(n−1)−12+h=n−11
In both cases we have reduced to having only fractions greater than or equal to 1/(n−1), and therefore by the lemma from that moment on, and in particular at the end, there will only be numbers greater than or equal to 1/(n−1).