Maths Olympiad Prep

Library / Local Mathematical Competitions /12 of 23

Local Mathematical Competitions

Combinatorics Difficulty 6.3 National Olympiad Prove it Romania

Prove that given any two permutations σ,τ∈Sn\sigma, \tau \in S_n, there exists some function f:{1,…,n}→{−1,1}f : \{1, \dots, n\} \to \{-1, 1\} such that we simultaneously have, for any indices 1≤i≤j≤n1 \le i \le j \le n,
∣∑k=ijf(σ(k))∣≤2and∣∑k=ijf(τ(k))∣≤2. \left| \sum_{k=i}^{j} f(\sigma(k)) \right| \le 2 \quad \text{and} \quad \left| \sum_{k=i}^{j} f(\tau(k)) \right| \le 2.
Dan Schwarz

Solution

We will first prove it for the even case, n=2mn = 2m. Consider the graph whose set of vertices is {1,…,2m}\{1, \dots, 2m\}, and with red edges between σ(2k−1)\sigma(2k-1) and σ(2k)\sigma(2k), and blue edges between τ(2k−1)\tau(2k-1) and τ(2k)\tau(2k), where 1≤k≤m1 \le k \le m (notice that multiple edges may occur).

Clearly, each vertex is incident with one red edge and one blue edge, hence all vertex degrees are equal to 2. Therefore the graph is the union of disjoint cycles. Moreover, each such cycle is of even length, since its edges must be of alternating colours (the graph is thus bipartite).

Define ff alternately taking values −1-1 and 11 along each of the cycles. Then the largest value any of the moduli can take is 2, when ii is even and jj is odd, since on consecutive pairs of odd/even indices the sum of the values of ff is zero, along either σ\sigma or τ\tau.

When nn is odd, prolong σ(n+1)=τ(n+1)=n+1\sigma(n+1) = \tau(n+1) = n+1 to achieve the case treated in the above.

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.