Maths Olympiad Prep

Library / Olimpiada Naţională de Matematică

Olimpiada Naţională de Matematică

Combinatorics Difficulty 7.3 National Olympiad, round 2 Prove it JBMO

Problem:
A permutation σ:{1,2,…,n}→{1,2,…,n}\sigma:\{1,2, \ldots, n\} \rightarrow\{1,2, \ldots, n\} is called straight if and only if for each integer k,1≤k≤n−1k, 1 \leq k \leq n-1 the following inequality is fulfilled
∣σ(k)−σ(k+1)∣≤2 |\sigma(k)-\sigma(k+1)| \leq 2
Find the smallest positive integer nn for which there exist at least 2003 straight permutations.

Solution

Solution:
The main trick is to look where nn is positioned. In that idea let us denote by xnx_{n} the number of all the straight permutations and by ana_{n} the number of straight permutations having nn on the first or on the last position, i.e. σ(1)=n\sigma(1)=n or σ(n)=n\sigma(n)=n. Also let us denote by bnb_{n} the difference xn−anx_{n}-a_{n} and by an′a_{n}^{\prime} the number of permutations having nn on the first position, and by an′′a_{n}^{\prime \prime} the number of permutations having nn on the last position. From symmetry we have that 2an′=2an′′=an′+an′′=an2 a_{n}^{\prime}=2 a_{n}^{\prime \prime}=a_{n}^{\prime}+a_{n}^{\prime \prime}=a_{n}, for all nn-s. Therefore finding a recurrence relationship for {an}n\left\{a_{n}\right\}_{n} is equivalent with finding one for {an′}n\left\{a_{n}^{\prime}\right\}_{n}.
One can simply compute: a2′=1,a3′=2,a4′=4a_{2}^{\prime}=1, a_{3}^{\prime}=2, a_{4}^{\prime}=4. Suppose that n≥5n \geq 5. We have two possibilities for the second position: if σ(2)=n−1\sigma(2)=n-1 then we must complete the remaining positions with 3,4,…,n3,4, \ldots, n thus the number of ways in which we can do that is an−1′a_{n-1}^{\prime} (because the permutation σ′:{1,2,…,n−1}→{1,2,…,n−1},σ′(k)=σ(k+1)\sigma^{\prime}:\{1,2, \ldots, n-1\} \rightarrow \{1,2, \ldots, n-1\}, \sigma^{\prime}(k)=\sigma(k+1), for all k,1≤k≤n−1k, 1 \leq k \leq n-1, is also a straight permutation).
If on the second position we have n−2,σ(2)=n−2n-2, \sigma(2)=n-2, then n−1n-1 can only be in the last position of the permutation or on the third position, i.e. σ(3)=n−1\sigma(3)=n-1 or σ(n)=n−1\sigma(n)=n-1. If σ(n)=n−1\sigma(n)=n-1, then we can only have σ(n−1)=n−3\sigma(n-1)=n-3 thus σ(3)=n−4\sigma(3)=n-4 and so on, thus there is only one permutation of this kind. On the other hand, if σ(3)=n−1\sigma(3)=n-1 then it follows that σ(4)=n−3\sigma(4)=n-3 and now we can complete the permutation in an−3′a_{n-3}^{\prime} ways (because the permutation σ′:{1,2,…,n−3}→{1,2,…,n−3},σ′(k)=σ(k+3)\sigma^{\prime}:\{1,2, \ldots, n-3\} \rightarrow\{1,2, \ldots, n-3\}, \sigma^{\prime}(k)=\sigma(k+3), for all kk, 1≤k≤n−31 \leq k \leq n-3, is also a straight permutation).
Summing all up we get the recurrence:
an′=an−1′+1+an−3′⇒an=an−1+an−3+2,∀n≥5 a_{n}^{\prime}=a_{n-1}^{\prime}+1+a_{n-3}^{\prime} \Rightarrow a_{n}=a_{n-1}+a_{n-3}+2, \forall n \geq 5
The recurrence relationship for {bn}\left\{b_{n}\right\} can be obtained by observing that for each straight permutation τ:{1,2,…,n+1}→{1,2,…,n+1}\tau:\{1,2, \ldots, n+1\} \rightarrow\{1,2, \ldots, n+1\} for which 2≤τ−1(n+1)≤n2 \leq \tau^{-1}(n+1) \leq n we can obtain a straight permutation σ:{1,2,…,n}→{1,2,…,n}\sigma:\{1,2, \ldots, n\} \rightarrow\{1,2, \ldots, n\} by removing n+1n+1. Indeed n+1n+1 is "surrounded" by nn and n−1n-1, so by removing it, nn and n−1n-1 become neighbors, and thus the newly formed permutation is indeed straight. Now, if τ−1(n)∈{1,n+1}\tau^{-1}(n) \in\{1, n+1\} then the newly formed permutation σ\sigma was counted as one of the ana_{n}-s, minus the two special cases in which nn and n−1n-1 are on the first and last positions. If τ−1(n)∉{1,n+1}\tau^{-1}(n) \notin\{1, n+1\} then certainly σ\sigma was counted with the bnb_{n}-s. Also, from any straight permutation of nn elements, not having nn and n−1n-1 in the first and last position, thus nn certainly being neighbor with n−1n-1, we can make a straight n+1n+1-element permutation by inserting n+1n+1 between nn and n−1n-1.
Therefore we have obtained the following relationship:
bn+1=an−2+bn=xn−2,∀n≥4 b_{n+1}=a_{n}-2+b_{n}=x_{n}-2, \forall n \geq 4
From (1) and (2) we get that
xn=xn−1+an−1+an−3,∀n≥5 x_{n}=x_{n-1}+a_{n-1}+a_{n-3}, \forall n \geq 5
It is obvious that {xn}n\left\{x_{n}\right\}_{n} is a "fast" increasing sequence, so we will compute the first terms using the relationships obtained above, which will prove that the number that we are looking for is n=16n=16 :
a2=2x2=3a3=4x3=6a4=8x4=12a5=12x5=22a6=18x6=38a7=28x7=64a8=42x8=104a9=62x9=164a10=92x10=254a11=136x11=388a12=200x12=586a13=294x13=878a14=432x14=1308a15=634x15=1940a16=928x16=2882 \begin{aligned} & a_{2}=2 \quad x_{2}=3 \\ & a_{3}=4 \quad x_{3}=6 \\ & a_{4}=8 \quad x_{4}=12 \\ & a_{5}=12 \quad x_{5}=22 \\ & a_{6}=18 \quad x_{6}=38 \\ & a_{7}=28 \quad x_{7}=64 \\ & a_{8}=42 \quad x_{8}=104 \\ & a_{9}=62 \quad x_{9}=164 \\ & a_{10}=92 \quad x_{10}=254 \\ & a_{11}=136 \quad x_{11}=388 \\ & a_{12}=200 \quad x_{12}=586 \\ & a_{13}=294 \quad x_{13}=878 \\ & a_{14}=432 \quad x_{14}=1308 \\ & a_{15}=634 \quad x_{15}=1940 \\ & a_{16}=928 \quad x_{16}=2882 \end{aligned}
Therefore, the smallest positive integer nn for which there exist at least 2003 straight permutations is n=16n=16.

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

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