Maths Olympiad Prep

Library / /2 of 9

, 2018

Combinatorics Difficulty 7.9 National olympiad, round 2 Prove it Saudi Arabia

Find all positive integers kk such that there exists some permutation of (1,2,,1000)(1,2, \ldots, 1000) namely (a1,a2,,a1000)\left(a_{1}, a_{2}, \ldots, a_{1000}\right) and satisfy aii=k\left|a_{i}-i\right|= k for all i=1,1000i=1,1000.

Solution

Note that k=1k=1 is an answer since we can choose a permutation with a2i1=2ia_{2i-1}=2i, a2i=2i1a_{2i}=2i-1.

Now we take k>1k>1, denote S0,S1,S2,,Sk1S_{0}, S_{1}, S_{2}, \ldots, S_{k-1} as the subsets of {1,2,3,,1000}\{1,2,3, \ldots, 1000\} and all elements of SiS_{i} are congruent to ii modulo kk. We have:
- The number of elements of StS_{t} is mt=1000tkm_{t}=\left\lceil\frac{1000-t}{k}\right\rceil.
- Since ai=i±ka_{i}=i \pm k and aii(modk)a_{i} \equiv i \pmod{k}, two numbers aia_{i} and ii belong to same subset.

Denote t=x1<x2<<xmtt=x_{1}<x_{2}<\ldots<x_{m_{t}} as elements of StS_{t} then they form an arithmetic progression with formula xi=t+(i1)kx_{i}=t+(i-1)k for 1imt1 \leq i \leq m_{t}.

Put yi=axiy_{i}=a_{x_{i}} for 1imt1 \leq i \leq m_{t} then yixi=axixi=k\left|y_{i}-x_{i}\right|=\left|a_{x_{i}}-x_{i}\right|=k which implies that y1<y2<<ymty_{1}<y_{2}<\ldots<y_{m_{t}} is a permutation of x1<x2<<xmtx_{1}<x_{2}<\ldots<x_{m_{t}}.

Set ri=xitk+1r_{i}=\frac{x_{i}-t}{k}+1, si=yitk+1s_{i}=\frac{y_{i}-t}{k}+1 for 1imt1 \leq i \leq m_{t} then ri=ir_{i}=i and sii=1\left|s_{i}-i\right|=1.

We have
i=1mtrisi+i=1mtri+si=2i=1mtmax{ri,si} \sum_{i=1}^{m_{t}}\left|r_{i}-s_{i}\right|+\sum_{i=1}^{m_{t}}\left|r_{i}+s_{i}\right|=2 \sum_{i=1}^{m_{t}} \max \{r_{i}, s_{i}\}
so mt+2i=1mtri=2i=1mtmax{ri,si}m_{t}+2 \sum_{i=1}^{m_{t}} r_{i}=2 \sum_{i=1}^{m_{t}} \max \{r_{i}, s_{i}\} and mtm_{t} is even. By the similar definition for i=0,1,,k1i=0,1, \ldots, k-1, we have m0m1mk1m_{0} \leq m_{1} \leq \ldots \leq m_{k-1} are all even and
m0mk1=[1000k][1000(k1)k]1. m_{0}-m_{k-1}=\left[\frac{1000}{k}\right]-\left[\frac{1000-(k-1)}{k}\right] \leq 1 .
Hence, m0,m1,,mk1m_{0}, m_{1}, \ldots, m_{k-1} are all equal and even. This can happen when k1000k \mid 1000 and 1000k\frac{1000}{k} is an even number. It is easy to check that we can construct such a permutation satisfying these kk.

Therefore, kk is a divisor of 500500.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

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