IMO 2013 · Problem 6

Let \(n \geq 3\) be an integer, and consider a circle with \(n+1\) equally spaced points marked on it. Consider all labellings of these points with the numbers \(0,1,\ldots,n\) such that each label is used exactly once; two such labellings are considered to be the same if one can be obtained from the other by a rotation of the circle. A labelling is called beautiful if, for any four labels \(a<b<c<d\) with \(a+d=b+c\), the chord joining the points labelled \(a\) and \(d\) does not intersect the chord joining the points labelled \(b\) and \(c\).

Let \(M\) be the number of beautiful labellings, and let \(N\) be the number of ordered pairs \((x,y)\) of positive integers such that \(x+y\leq n\) and \(\gcd(x,y)=1\). Prove that \[ M=N+1. \]

Official text of the problem. Official problem paper (PDF)

Solution

Two chords with four distinct endpoints intersect if and only if their endpoints alternate around the circle. Thus beauty depends only on the circular order of the labels. We may work with circular orders, transferring them to equally spaced points whenever necessary.

For \(q\geq2\), let \[ \varphi(q)=\#\{r:1\leq r<q,\ \gcd(r,q)=1\}. \] Since \(\gcd(x,y)=\gcd(x,x+y)\), we have \[ N=\sum_{q=2}^{n}\varphi(q). \tag{1} \]

We first prove an upper bound for \(M\).

Say that a circular order of \(0,1,\ldots,m\) has property \(P\) if the map \[ i\longmapsto i+1,\qquad 0\leq i<m, \] preserves counterclockwise cyclic order: a counterclockwise listing of its domain is carried to a counterclockwise listing of its image.

Every beautiful labelling has property \(P\). To prove this, write \(P_i\) for the point labelled \(i\), and consider the counterclockwise arcs \[ I_i=P_iP_{i+1},\qquad 0\leq i<n. \] No one of these arcs can properly contain another. Indeed, arcs with consecutive indices cannot contain one another, because one ends at their common endpoint and the other begins there. If \(i+1<j\) and either \(I_i\) or \(I_j\) contains the other, the endpoints of the chords \[ P_iP_{j+1}\quad\text{and}\quad P_{i+1}P_j \] alternate. These chords would intersect, contradicting beauty because \[ i+(j+1)=(i+1)+j. \]

For completeness, noncontainment implies that the starting points and ending points of these arcs have the same cyclic order. Measure angles in turns and list the starting points as \[ s_1<s_2<\cdots<s_n<s_1+1. \] Let \(t_k\in(s_k,s_k+1)\) be the lifted coordinate of the corresponding ending point. If \(t_k>t_{k+1}\), then \[ s_k<s_{k+1}<t_{k+1}<t_k, \] so one arc contains the other. Similarly, \(t_n>t_1+1\) would give containment across the chosen cut. Ending points are distinct, so \[ t_1<t_2<\cdots<t_n<t_1+1. \] This proves property \(P\).

Let \(A_m\) be the number of circular orders of \(0,\ldots,m\), up to rotation, having property \(P\). We shall show that \[ A_m=A_{m-1}+\varphi(m)\qquad(m\geq3). \tag{2} \]

Deleting \(m\) from an order counted by \(A_m\) leaves an order counted by \(A_{m-1}\). Conversely, fix an order of \(0,\ldots,m-1\) having property \(P\). Its map \[ i\longmapsto i+1,\qquad 0\leq i\leq m-2, \] preserves cyclic order.

Among the points labelled \(0,\ldots,m-2\), let \(u\) and \(v\) be the immediate predecessor and successor of the point labelled \(m-1\). To extend property \(P\), the new point labelled \(m\) must lie in the counterclockwise gap from \(u+1\) to \(v+1\) among the points labelled \(1,\ldots,m-1\). This condition is also sufficient.

That gap contains either no other old point or just the point labelled \(0\). Consequently, there is exactly one possible insertion of \(m\), except when the gap contains \(0\), in which case there are exactly two.

The exceptional case occurs precisely when the permutation \[ 0\mapsto1\mapsto2\mapsto\cdots\mapsto m-1\mapsto0 \] preserves the cyclic order of all \(m\) old points. Any permutation preserving the cyclic order of all points is a rotation of their positions. If this rotation advances \(r\) positions, it is a single cycle exactly when \(\gcd(r,m)=1\).

There are exactly \(\varphi(m)\) such orders: after fixing label \(0\) at position \(0\), each permitted \(r\) uniquely places label \(i\) at position \(ir\pmod m\). Each of these orders has property \(P\), since the displayed permutation preserves cyclic order. This proves (2).

Both circular orders of \(0,1,2\) have property \(P\), so \(A_2=2\). Hence \[ A_n=2+\sum_{q=3}^{n}\varphi(q) =1+\sum_{q=2}^{n}\varphi(q) =N+1. \] Since every beautiful order has property \(P\), \[ M\leq N+1. \tag{3} \]

We now construct at least \(N+1\) distinct beautiful orders.

Let \[ \mathcal F_n= \{0,1\}\cup \left\{\frac pq:1\leq p<q\leq n,\ \gcd(p,q)=1\right\}. \] By (1), this set has \(N+2\) elements, so its consecutive elements determine \(N+1\) open intervals. Choose a real number \(\alpha\) in each interval.

For such an \(\alpha\), place the labels \(0,\ldots,n\) at the complex points \[ z_k=e^{2\pi i k\alpha}. \] These points are distinct: equality \(z_r=z_s\), with \(0\leq r<s\leq n\), would make \(\alpha\) a rational number whose reduced denominator is at most \(s-r\leq n\), contrary to its choice.

This circular order is beautiful. Indeed, \[ z_s-z_r = 2i\,e^{\pi i(r+s)\alpha}\sin\!\bigl(\pi(s-r)\alpha\bigr). \] Thus, if \(a+d=b+c\), the chords \(z_az_d\) and \(z_bz_c\) are parallel. Their supporting lines are distinct, since a line cannot contain four distinct points of a circle. Therefore the chords do not intersect. Transferring the same circular order to equally spaced points preserves this property.

It remains to show that choices from different intervals give different circular orders.

Cut the circle at label \(0\). The linear order of the remaining labels is the order of the fractional parts \[ \{\alpha\},\{2\alpha\},\ldots,\{n\alpha\}. \] For \(1\leq j\leq n\), put \[ \varepsilon_j(\alpha)= \begin{cases} 1,&\{j\alpha\}<\{(j-1)\alpha\},\\ 0,&\{j\alpha\}>\{(j-1)\alpha\}. \end{cases} \] These values are determined by the circular order. Because \(0<\alpha<1\), each step adds \(\alpha\), crossing an integer precisely when the fractional part decreases. Hence \[ \lfloor q\alpha\rfloor=\sum_{j=1}^{q}\varepsilon_j(\alpha) \qquad(1\leq q\leq n). \tag{4} \]

Suppose \(\alpha<\beta\) were chosen from different intervals and gave the same circular order. Some fraction \(p/q\in\mathcal F_n\), with \(q\leq n\), lies strictly between them. Therefore \[ \lfloor q\alpha\rfloor\leq p-1 \quad\text{and}\quad \lfloor q\beta\rfloor\geq p. \] But their identical circular orders would make all the values in (4) equal, a contradiction.

We have therefore constructed \(N+1\) distinct beautiful labellings, giving \[ M\geq N+1. \] Together with (3), this proves \[ \boxed{M=N+1}. \]

The solution was checked against the official IMO shortlist solutions.