Maths Olympiad Prep

Library / IMO Shortlist /365 of 365

IMO Shortlist

Combinatorics Difficulty 9.2 IMO level Prove it IMO

The Imomi archipelago consists of n⩾2n \geqslant 2 islands. Between each pair of distinct islands is a unique ferry line that runs in both directions, and each ferry line is operated by one of kk companies. It is known that if any one of the kk companies closes all its ferry lines, then it becomes impossible for a traveller, no matter where the traveller starts at, to visit all the islands exactly once (in particular, not returning to the island the traveller started at).
Determine the maximal possible value of kk in terms of nn.

Solution

Answer: The largest kk is k=⌊log⁡2n⌋k=\left\lfloor\log_{2} n\right\rfloor.

We reformulate the problem using graph theory. We have a complete graph KnK_{n} on nn nodes (corresponding to islands), and we want to colour the edges (corresponding to ferry lines) with kk colours (corresponding to companies), so that every Hamiltonian path contains all kk different colours. For a fixed set of kk colours, we say that an edge colouring of KnK_{n} is good if every Hamiltonian path contains an edge of each one of these kk colours.

We first construct a good colouring of KnK_{n} using k=⌊log⁡2n⌋k=\left\lfloor\log_{2} n\right\rfloor colours.

Claim 1. Take k=⌊log⁡2n⌋k=\left\lfloor\log_{2} n\right\rfloor. Consider the complete graph KnK_{n} in which the nodes are labelled by 1,2,…,n1,2, \ldots, n. Colour node ii with colour min⁡(⌊log⁡2i⌋+1,k)\min \left(\left\lfloor\log_{2} i\right\rfloor+1, k\right) (so the colours of the first nodes are 1,2,2,3,3,3,3,4,…1,2,2,3,3,3,3,4, \ldots and the last n−2k−1+1n-2^{k-1}+1 nodes have colour kk ), and for 1⩽i<j⩽n1 \leqslant i<j \leqslant n, colour the edge ijij with the colour of the node ii. Then the resulting edge colouring of KnK_{n} is good.

Proof. We need to check that every Hamiltonian path contains edges of every single colour. We first observe that the number of nodes assigned colour kk is n−2k−1+1n-2^{k-1}+1. Since n⩾2kn \geqslant 2^{k}, we have
n−2k−1+1⩾n2+1 n-2^{k-1}+1 \geqslant \frac{n}{2}+1
This implies that in any Hamiltonian path, there exists an edge between two nodes with colour kk. Then that edge must have colour kk.

We next show that for each 1⩽i<k1 \leqslant i<k, every Hamiltonian path contains an edge of colour ii. Suppose the contrary, that some Hamiltonian path does not contain an edge of colour ii. Then nodes with colour ii can only be adjacent to nodes with colour less than ii inside the Hamiltonian path. Since there are 2i−12^{i-1} nodes with colour ii and 2i−1−12^{i-1}-1 nodes with colour less than ii, the Hamiltonian path must take the form
(i)↔(<i)↔(i)↔(<i)↔⋯↔(<i)↔(i), (i) \leftrightarrow(<i) \leftrightarrow(i) \leftrightarrow(<i) \leftrightarrow \cdots \leftrightarrow(<i) \leftrightarrow(i),
where (i)(i) denotes a node with colour ii, (<i)(<i) denotes a node with colour less than ii, and ↔\leftrightarrow denotes an edge. But this is impossible, as the Hamiltonian path would not have any nodes with colours greater than ii.

Fix a set of kk colours, we now prove that if there exists a good colouring of KnK_{n}, then k⩽⌊log⁡2n⌋k \leqslant\left\lfloor\log_{2} n\right\rfloor. For n=2n=2, this is trivial, so we assume n⩾3n \geqslant 3. For any node vv of KnK_{n} and 1⩽i⩽k1 \leqslant i \leqslant k, we denote by di(v)d_{i}(v) the number of edges with colour ii incident with the node vv.

Lemma 1. Consider a good colouring of KnK_{n}, and let ABAB be an arbitrary edge with colour ii. If di(A)+di(B)⩽n−1d_{i}(A)+d_{i}(B) \leqslant n-1, then the colouring will remain good after recolouring edge ABAB with any other colour.

Proof. Suppose there exists a good colouring together with an edge ABAB of colour ii, such that if ABAB is recoloured with another colour, the colouring will no longer be good. The failure of the new colouring being good will come from colour ii, and thus there exists a Hamiltonian path containing edge ABAB such that initially (i.e. before recolouring) ABAB is the only edge of colour ii in this path. Writing A=A0A=A_{0} and B=B0B=B_{0}, denote this Hamiltonian path by
As↔As−1↔⋯↔A1↔A0↔B0↔B1↔⋯↔Bt−1↔Bt, A_{s} \leftrightarrow A_{s-1} \leftrightarrow \cdots \leftrightarrow A_{1} \leftrightarrow A_{0} \leftrightarrow B_{0} \leftrightarrow B_{1} \leftrightarrow \cdots \leftrightarrow B_{t-1} \leftrightarrow B_{t},
where s,t⩾0s, t \geqslant 0 and s+t+2=ns+t+2=n.

In the initial colouring, we observe the following.
- The edge B0AsB_{0}A_{s} must have colour ii, since otherwise the path
A0↔A1↔⋯↔As−1↔As↔B0↔B1↔⋯↔Bt−1↔Bt A_{0} \leftrightarrow A_{1} \leftrightarrow \cdots \leftrightarrow A_{s-1} \leftrightarrow A_{s} \leftrightarrow B_{0} \leftrightarrow B_{1} \leftrightarrow \cdots \leftrightarrow B_{t-1} \leftrightarrow B_{t}
has no edges of colour ii.
- Similarly, the edge A0BtA_{0}B_{t} must have colour ii.
- For each 0⩽p<s0 \leqslant p<s, at least one of the edges B0ApB_{0}A_{p} and A0Ap+1A_{0}A_{p+1} must have colour ii, since otherwise the path
As↔⋯↔Ap+2↔Ap+1↔A0↔A1↔⋯↔Ap−1↔Ap↔B0↔B1↔⋯↔Bt A_{s} \leftrightarrow \cdots \leftrightarrow A_{p+2} \leftrightarrow A_{p+1} \leftrightarrow A_{0} \leftrightarrow A_{1} \leftrightarrow \cdots \leftrightarrow A_{p-1} \leftrightarrow A_{p} \leftrightarrow B_{0} \leftrightarrow B_{1} \leftrightarrow \cdots \leftrightarrow B_{t}
has no edges of colour ii.
- Similarly, for each 0⩽q<t0 \leqslant q<t, at least one of the edges A0BqA_{0}B_{q} and B0Bq+1B_{0}B_{q+1} must have colour ii.

In the above list, each edge A0XA_{0}X appears exactly once and also each edge B0XB_{0}X appears exactly once (where A0B0A_{0}B_{0} and B0A0B_{0}A_{0} are counted separately). Adding up the contributions to di(A)+di(B)d_{i}(A)+ d_{i}(B), we obtain
di(A)+di(B)⩾(s+1)+(t+1)=n. d_{i}(A)+d_{i}(B) \geqslant(s+1)+(t+1)=n .
This contradicts our assumption that di(A)+di(B)⩽n−1d_{i}(A)+d_{i}(B) \leqslant n-1.

Our strategy now is to repeatedly recolour the edges using Lemma 1 until the colouring has a simple structure. For a node vv, we define m(v)m(v) to be the largest value of di(v)d_{i}(v) over all colours ii.

Lemma 2. Assume we have a good colouring of KnK_{n}. Let A,BA, B be two distinct nodes, and let jj be the colour of edge ABAB where 1⩽j⩽k1 \leqslant j \leqslant k. If
- m(A)⩾m(B)m(A) \geqslant m(B) and
- m(A)=di(A)m(A)=d_{i}(A) for some i≠ji \neq j,
then after recolouring edge ABAB with colour ii, the colouring remains good.

Proof. Note that
dj(A)+dj(B)⩽(n−1−m(A))+m(B)⩽n−1, d_{j}(A)+d_{j}(B) \leqslant(n-1-m(A))+m(B) \leqslant n-1,
and so we may apply Lemma 1.

Lemma 3. Assume we have a good colouring of KnK_{n}. Let SS be a nonempty set of nodes. Let A∈SA \in S be a node such that m(A)⩾m(B)m(A) \geqslant m(B) for all B∈SB \in S, and choose 1⩽i⩽k1 \leqslant i \leqslant k for which di(A)=m(A)d_{i}(A)=m(A). Then after recolouring the edge ABAB with colour ii for all B∈SB \in S distinct from AA, the colouring remains good.

Proof. We repeatedly perform the following operation until all edges ABAB with B∈SB \in S have colour ii :
> choose an edge ABAB with B∈SB \in S that does not have colour ii, and recolour it with colour ii.
By Lemma 2, the colouring remains good after one operation. Moreover, m(A)m(A) increase by 1 during an operation, and all other m(B)m(B) may increase by at most 1 . This shows that m(A)m(A) will remain maximal amongst m(B)m(B) for B∈SB \in S. We will also have di(A)=m(A)d_{i}(A)=m(A) after the operation, since both sides increase by 1 . Therefore the operation can be performed repeatedly, and the colouring remains good.

We first apply Lemma 3 to the set of all nn nodes in KnK_{n}. After recolouring, there exists a node A1A_{1} such that every edge incident with A1A_{1} has colour c1c_{1}. We then apply Lemma 3 to the set of nodes excluding A1A_{1}, and we obtain a colouring where
- every edge incident with A1A_{1} has colour c1c_{1},
- every edge incident with A2A_{2} except for A1A2A_{1}A_{2} has colour c2c_{2}.
Repeating this process, we arrive at the following configuration:
- the nn nodes of KnK_{n} are labelled A1,A2,…,AnA_{1}, A_{2}, \ldots, A_{n},
- the node AiA_{i} has a corresponding colour cic_{i} (as a convention, we also colour AiA_{i} with cic_{i} ),
- for all 1⩽u<v⩽n1 \leqslant u<v \leqslant n, the edge between AuA_{u} and AvA_{v} has colour cuc_{u},
- this colouring is good.

Claim 2. For every colour ii, there exists a 1⩽p⩽n1 \leqslant p \leqslant n such that the number of nodes of colour ii amongst A1,…,ApA_{1}, \ldots, A_{p} is greater than p/2p / 2.

Proof. Suppose the contrary, that for every 1⩽p⩽n1 \leqslant p \leqslant n, there are at most ⌊p/2⌋\lfloor p / 2\rfloor nodes of colour ii. We then construct a Hamiltonian path not containing any edge of colour ii. Let Ax1,…,AxtA_{x_{1}}, \ldots, A_{x_{t}} be the nodes with colour ii, where x1<x2<⋯<xtx_{1}<x_{2}<\cdots<x_{t}, and let Ay1,Ay2,…,AysA_{y_{1}}, A_{y_{2}}, \ldots, A_{y_{s}} be the nodes with colour different from ii, where y1<y2<⋯<ysy_{1}<y_{2}<\cdots<y_{s}. We have s+t=ns+t=n and t⩽⌊n/2⌋t \leqslant\lfloor n / 2\rfloor, so t⩽st \leqslant s. We also see that yj<xjy_{j}<x_{j} for all 1⩽j⩽t1 \leqslant j \leqslant t, because otherwise, A1,A2,…,AxjA_{1}, A_{2}, \ldots, A_{x_{j}} will have jj nodes of colour ii and less than jj nodes of colour different from ii. Then we can construct a Hamiltonian path
Ax1↔Ay1↔Ax2↔Ay2↔Ax3↔⋯↔Axt↔Ayt↔Ayt+1↔⋯↔Ays A_{x_{1}} \leftrightarrow A_{y_{1}} \leftrightarrow A_{x_{2}} \leftrightarrow A_{y_{2}} \leftrightarrow A_{x_{3}} \leftrightarrow \cdots \leftrightarrow A_{x_{t}} \leftrightarrow A_{y_{t}} \leftrightarrow A_{y_{t+1}} \leftrightarrow \cdots \leftrightarrow A_{y_{s}}
that does not contain an edge with colour ii. This contradicts that the colouring is good.

So for every colour ii, there has to be an integer pip_{i} with 1⩽pi⩽n1 \leqslant p_{i} \leqslant n such that there are more than pi/2p_{i} / 2 nodes assigned colour ii amongst A1,…,ApiA_{1}, \ldots, A_{p_{i}}. Choose the smallest such pip_{i} for every ii, and without loss of generality assume
p1<p2<⋯<pk p_{1}<p_{2}<\cdots<p_{k}
Note that the inequalities are strict by the definition of pip_{i}.

Then amongst the nodes A1,…,ApiA_{1}, \ldots, A_{p_{i}}, there are at least ⌈(pj+1)/2⌉\left\lceil\left(p_{j}+1\right) / 2\right\rceil nodes of colour jj for all 1⩽j⩽i1 \leqslant j \leqslant i. Then
pi⩾⌈p1+12⌉+⌈p2+12⌉+⋯+⌈pi+12⌉. p_{i} \geqslant\left\lceil\frac{p_{1}+1}{2}\right\rceil+\left\lceil\frac{p_{2}+1}{2}\right\rceil+\cdots+\left\lceil\frac{p_{i}+1}{2}\right\rceil .
This inductively shows that
pi⩾2i−1 p_{i} \geqslant 2^{i}-1
for all 1⩽i⩽k1 \leqslant i \leqslant k, and this already proves n⩾2k−1n \geqslant 2^{k}-1.

It remains to show that n=2k−1n=2^{k}-1 is not possible. If n=2k−1n=2^{k}-1, then all inequalities have to be equalities, so pi=2i−1p_{i}=2^{i}-1 and there must be exactly 2i−12^{i-1} nodes of colour ii. Moreover, there cannot be a node of colour ii amongst A1,A2,…,Api−1A_{1}, A_{2}, \ldots, A_{p_{i-1}}, and so the set of nodes of colour ii must precisely be
A2i−1,A2i−1+1,…,A2i−1 A_{2^{i-1}}, A_{2^{i-1}+1}, \ldots, A_{2^{i}-1}
Then we can form a Hamiltonian path
A2k−1↔A1↔A2k−1+1↔A2↔A2k−1+2↔A3↔…↔An, A_{2^{k-1}} \leftrightarrow A_{1} \leftrightarrow A_{2^{k-1}+1} \leftrightarrow A_{2} \leftrightarrow A_{2^{k-1}+2} \leftrightarrow A_{3} \leftrightarrow \ldots \leftrightarrow A_{n},
which does not contain an edge of colour kk. This is a contradiction, and therefore n⩾2kn \geqslant 2^{k}.

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.