Maths Olympiad Prep

Track / Stage 7 / 213 of 300 #2093 of 2444

Problem 2093

National Olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.5 Prove it Irish Mathematical Olympiad · Ireland

Let n3n \ge 3 be an integer. Determine, as a function of nn, the number of circular arrangements x1,x2,,xnx_1, x_2, \dots, x_n of the numbers 1,2,,n1, 2, \dots, n such that
i=1nxixi+2=2n4, \sum_{i=1}^{n} |x_i - x_{i+2}| = 2n - 4,
where the indices ii and i+2i+2 are to be interpreted modulo nn. Note that any rotation of a circular arrangement is considered to be the same circular arrangement, i.e., the circular arrangements x1,x2,x3,,xnx_1, x_2, x_3, \dots, x_n and x2,x3,,xn,x1x_2, x_3, \dots, x_n, x_1 are considered to be the same.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solutions — 2

Solution 1

Solution 1.
First consider the case when nn is odd. It is easy to see that
S=i=1nxixi+2=i=1nyiyi+1 S = \sum_{i=1}^{n} |x_i - x_{i+2}| = \sum_{i=1}^{n} |y_i - y_{i+1}|
for another circular arrangement y1,y2,,yny_1, y_2, \dots, y_n. So we can consider
S=i=1nxixi+1 S = \sum_{i=1}^{n} |x_i - x_{i+1}|
instead. Now, the numbers 11 and nn must appear somewhere on the circle. Suppose that the numbers between 11 and nn clockwise are z1,z2,,zkz_1, z_2, \dots, z_k and the numbers between 11 and nn anticlockwise are w1,w2,,wlw_1, w_2, \dots, w_l, where k+l=n2k + l = n - 2. Then
nzk+zkzk1++z11(nzk)+(zkzk1)++(z11)=n1 |n - z_k| + |z_k - z_{k-1}| + \dots + |z_1 - 1| \ge (n - z_k) + (z_k - z_{k-1}) + \dots + (z_1 - 1) = n - 1
and
nwl+wlwl1++w11(nwl)+(wlwl1)++(w11)=n1. |n - w_l| + |w_l - w_{l-1}| + \dots + |w_1 - 1| \ge (n - w_l) + (w_l - w_{l-1}) + \dots + (w_1 - 1) = n - 1.
Adding these two inequalities yields
S2n2 S \ge 2n - 2
(for later in the proof, we note that equality occurs if and only if the sequences z1,z2,,zkz_1, z_2, \dots, z_k and w1,w2,,wlw_1, w_2, \dots, w_l are in increasing order). Thus we can never have S=2n4S = 2n - 4 for odd values of nn.

Next consider the case when nn is even. Let the set of numbers appearing in the odd-indexed positions be A\mathcal{A} and let the set of numbers appearing in the even-indexed positions be B\mathcal{B}. Here A=B=n/2|\mathcal{A}| = |\mathcal{B}| = n/2.
Denote by m1m_1 and M1M_1 the minimum and maximum of A\mathcal{A}, and denote by m2m_2 and M2M_2 the minimum and maximum of B\mathcal{B}. Then, using a similar argument to the case of odd nn above, but replacing the numbers 11 and nn by m1m_1 and M1M_1, we have
i=1n/2a2ia2i+22(M1m1) \sum_{i=1}^{n/2} |a_{2i} - a_{2i+2}| \ge 2(M_1 - m_1)
and doing the same but this time for the numbers m2m_2 and M2M_2, we have
i=1n/2a2i+1a2i+32(M2m2). \sum_{i=1}^{n/2} |a_{2i+1} - a_{2i+3}| \ge 2(M_2 - m_2).
Adding these two inequalities yields
S2(M1+M2)2(m1+m2) S \ge 2(M_1 + M_2) - 2(m_1 + m_2)
It is easy to see that {m1,m2}={1,m}\{m_1, m_2\} = \{1, m\} for some mn2+1m \le \frac{n}{2} + 1 and {M1,M2}={M,n}\{M_1, M_2\} = \{M, n\} for some Mn2M \ge \frac{n}{2}. So
S2(n+M)2(1+m)=2n2+2(Mm)2n2+2(n2n21)=2n4 \begin{aligned} S &\ge 2(n + M) - 2(1 + m) = 2n - 2 + 2(M - m) \\ &\ge 2n - 2 + 2\left(\frac{n}{2} - \frac{n}{2} - 1\right) = 2n - 4 \end{aligned}
To obtain equality, without loss of generality the numbers in odd-indexed positions must be placed in increasing order from 11 to n2\frac{n}{2} (both clockwise and anticlockwise). We count the arrangements as follows. First we place 11 and n2\frac{n}{2} somewhere on a circle. Then, we choose any subset of {2,3,,n21}\{2, 3, \dots, \frac{n}{2} - 1\} to be the values placed in increasing order clockwise from 11 to n2\frac{n}{2}. After this, there is only one way to place the remaining values from 1,2,,n/21, 2, \dots, n/2 in increasing order anticlockwise from 11 to n2\frac{n}{2}. We now have a circular arrangement of the odd-indexed numbers on the circle. This can be done in 2n222^{\frac{n}{2}-2} ways. Second, we follow the same procedure for the even-indexed numbers on the circle (this can also be done in 2n222^{\frac{n}{2}-2} ways). Finally, the (odd) circular offset between the values 11 and nn can be chosen in n2\frac{n}{2} ways, giving a total of 2n222n22n2=n2n52^{\frac{n}{2}-2} \cdot 2^{\frac{n}{2}-2} \cdot \frac{n}{2} = n2^{n-5} circular arrangements.

Thus the answer to the question is 00 if nn is odd, and n2n5n2^{n-5} if nn is even.

Solution 2

Solution 2.
For all integers k>0k > 0, we let xn+k:=xkx_{n+k} := x_k. We define a new circular arrangement by setting a1=x1a_1 = x_1, a2=x3a_2 = x_3, and more generally, ak=x2k1a_k = x_{2k-1}. If nn is odd, say n=2m1n = 2m-1, we find that am=xna_m = x_n, am+1=x2a_{m+1} = x_2, etc. and we obtain a new circular arrangement a1,a2,,ana_1, a_2, \dots, a_n of the numbers 1,2,,n1, 2, \dots, n. If nn is even, say n=2mn = 2m, we find am=xn1a_m = x_{n-1}, am+1=x1a_{m+1} = x_1 and the circular arrangement a1,a2,,ama_1, a_2, \dots, a_m (we may call it the a-cycle) contains only half of the numbers 1,2,,n1, 2, \dots, n. We then define a second circular arrangement (the b-cycle) by bk=x2kb_k = x_{2k} for k=1,2,,mk = 1, 2, \dots, m. The circular arrangement b1,b2,,bmb_1, b_2, \dots, b_m contains those numbers from 1,2,,n1, 2, \dots, n which are not in the a-cycle. With this new notation, we find that
i=1nxixi+2=i=1naiai+1if n is odd,(21) \sum_{i=1}^{n} |x_i - x_{i+2}| = \sum_{i=1}^{n} |a_i - a_{i+1}| \quad \text{if } n \text{ is odd,} \quad (21)
i=1nxixi+2=i=1maiai+1+i=1mbibi+1if n=2m is even.(22) \sum_{i=1}^{n} |x_i - x_{i+2}| = \sum_{i=1}^{m} |a_i - a_{i+1}| + \sum_{i=1}^{m} |b_i - b_{i+1}| \quad \text{if } n = 2m \text{ is even.} \quad (22)
To facilitate the counting required for the problem, we prove the following lemma.

Lemma. If m2m \ge 2 and a1,a2,,ama_1, a_2, \dots, a_m is a circular arrangement of mm distinct positive integers, where we let am+i=aia_{m+i} = a_i for i>0i > 0, then
S(a):=i=1maiai+12m2 S(a) := \sum_{i=1}^{m} |a_i - a_{i+1}| \geq 2m - 2
with equality only possible when a1,a2,,ama_1, a_2, \dots, a_m consists of mm consecutive numbers (not necessarily in their natural order) and the largest two numbers are direct neighbours in the cycle.

Proof. We use induction on m2m \ge 2. If m=2m = 2, we have
S(a)=i=12aiai+1=2a1a22 S(a) = \sum_{i=1}^{2} |a_i - a_{i+1}| = 2|a_1 - a_2| \ge 2
with equality only if a2=a1±1a_2 = a_1 \pm 1. If m>2m > 2, after 'rotating' the cycle we can assume that ama_m is the largest number in the cycle. Let the cycle aa' be obtained from the cycle aa by removing ama_m, i.e. ai=aia'_i = a_i for i=1,2,,m1i = 1, 2, \dots, m-1 but am=a1a'_m = a'_1. We then have
S(a)am1amama1=S(a)am1a1 S(a) - |a_{m-1} - a_m| - |a_m - a_1| = S(a') - |a_{m-1} - a_1|
which implies, because am>am1a_m > a_{m-1} and am>a1a_m > a_1,
S(a)S(a)=2amam1a1am1a1={2(amam1)if am1>a12(ama1)if am1<a1. S(a) - S(a') = 2a_m - a_{m-1} - a_1 - |a_{m-1} - a_1| = \begin{cases} 2(a_m - a_{m-1}) & \text{if } a_{m-1} > a_1 \\ 2(a_m - a_1) & \text{if } a_{m-1} < a_1. \end{cases}
We have ama11a_m - a_1 \ge 1 as well as amam11a_m - a_{m-1} \ge 1, and by inductive hypothesis, S(a)2m4S(a') \ge 2m - 4, hence S(a)2m4+2=2m2S(a) \ge 2m - 4 + 2 = 2m - 2 with equality only if S(a)=2m4S(a') = 2m - 4 and either a1a_1 or am1a_{m-1} is equal to am1a_m - 1. In particular, in case of equality, the cycle aa' consists of consecutive numbers and its largest number is am1a_m - 1. The lemma follows. \square

A direct consequence of the Lemma is that for odd nn we have
i=1nxixi+22n2>2n4 \sum_{i=1}^{n} |x_i - x_{i+2}| \ge 2n - 2 > 2n - 4
and so f(n)=0f(n) = 0 for odd nn, where f(n)f(n) is the number of circular arrangements that satisfy the conditions of the problem.

Let now n=2mn = 2m be even. From the Lemma we now obtain i=1nxixi+2=S(a)+S(b)2m2+2m2=2n4\sum_{i=1}^{n} |x_i - x_{i+2}| = S(a)+S(b) \ge 2m-2+2m-2 = 2n-4. To achieve equality, both cycles, aa and bb, need to consist of consecutive numbers. One of these two cycles contains the numbers 1,2,,m1, 2, \dots, m, the other the numbers m+1,m+2,,2mm+1, m+2, \dots, 2m.
The Lemma allows us to count the number of cycles aa that consist of the numbers 1,2,,m1, 2, \dots, m (or any other mm consecutive numbers) for which S(a)=2m2S(a) = 2m-2. Let g(m)g(m) be this number. Then g(2)=1g(2) = 1 as there is only one cycle of length two. For m2m \ge 2, the lemma implies that after removing the number mm from aa, we are left with a cycle aa' that consists of the numbers 1,2,,m11, 2, \dots, m-1 and which satisfies S(a)=2m4S(a') = 2m-4. Moreover, there are exactly two cycles aa which lead to the same aa', namely the two that are obtained by fitting in mm immediately before or after m1m-1 in aa'. Hence g(m+1)=2g(m)g(m+1) = 2g(m) for m2m \ge 2 and it follows by induction that g(m)=2m2g(m) = 2^{m-2}.

To determine f(n)f(n) for n=2mn = 2m even, we may assume that x1=a1=1x_1 = a_1 = 1 so that we don't have to deal with rotational symmetry any more. From the above it then follows that the a-cycle consists of 1,2,,m1, 2, \dots, m and the b-cycle of m+1,m+2,,2mm+1, m+2, \dots, 2m. As seen above, there are g(m)=2m2g(m) = 2^{m-2} possibilities for the a-cycle. There are the same number of possible b-cycles, but when we merge the two to the full cycle x1=a1,x2=b1,x3=a2,x4=b2,,xn1=am,xn=bmx_1 = a_1, x_2 = b_1, x_3 = a_2, x_4 = b_2, \dots, x_{n-1} = a_m, x_n = b_m, a rotated b-cycle gives a different result. Therefore, we need to multiply by mm, which is the number of possibilities to choose which element of the b-cycle will become x2x_2. This gives
f(n)=mg(m)2=m22m4=n2n5for even n=2m. f(n) = m g(m)^2 = m 2^{2m-4} = n 2^{n-5} \quad \text{for even } n = 2m.
Thus the answer to the question is 00 if nn is odd, and n2n5n2^{n-5} if nn is even.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.