Olympiad Maths Prep

Track / Stage 8 / 116 of 180 #1816 of 2000

Problem 1816

IMO Shortlist mid-range; USAMO P2/P5
Combinatorics Difficulty 8.6 Prove it Baltic Way 2023 Shortlist · Baltic Way · 2023

Let nn be a positive integer. Each cell of an n×nn \times n table is coloured in one of kk colours where every colour is used at least once. Two colours AA and BB are said to touch each other, if there exists a cell coloured in AA sharing a side with a cell coloured in BB. The table is coloured in such a way that each colour touches at most 2 other colours. What is the maximal value of kk?

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

k=2n1k = 2n-1 when n2n \neq 2 and k=4k = 4 when n=2n = 2.
k=2n1k = 2n - 1 is possible by colouring diagonally as shown in the figure below and when n=2n = 2, k=4k = 4 is possible by colouring each cell in a unique colour.
Figure 1

We consider the graph, where each node represents a colour and two nodes are linked, if the colours they represent touch. This graph is connected and since each colour touches at most 2 colours every node has at most degree 2. This means that the graph is either one long chain or one big cycle.
Figure 2

We now look at the case when nn is odd. Consider the cell in the center of the table. From this cell we can get to any other cell by passing through at most n1n-1 cells. Therefore from the node representing this cell, we can get to any node through at most n1n-1 edges. But if the graph has 2n2n or more nodes, then for every node there is a node which is more than n1n-1 edges away. So we must have k2n1k \le 2n-1 for all odd nn.

When nn is even we consider the 4 center cells. If they all have a different colour, then they form a 4-cycle in the graph, meaning the graph has only 4 nodes. If two of the center cells have the same colour, then from this colour you will be able to get to all other cells passing through at most n1n-1 cells. By same the arguments as in the odd case, we get kmax(2n1,4)k \le \max(2n-1, 4) for even nn.

So overall we have k2n1k \le 2n-1 for n2n \ne 2 and k4k \le 4 for n=2n = 2 as desired.

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