Olympiad Maths Prep

Library / /15 of 19

Combinatorics Difficulty 6.8 National olympiad Prove it Mongolia

Consider an 17×4217 \times 42 table of squares. We put some balls into squares. After that, for each empty square, count the number of adjacent squares with balls, and write down that number in the empty square. Find the maximum possible value of the sum of these numbers over all empty squares.

Solution

The table cells are represented by the graph's vertices. We connect adjacent cells, corresponding to edges between graph vertices.

For example, we illustrate the 3×43 \times 4 table in the figure.

Figure 1

If a square has a ball, we color it black; if a square is empty, we color it white.

Then, the sum of the numbers in all empty squares is equal to the number of edges in the table's graph that connect vertices of opposite colors (i.e., edges between black and white vertices).

So, the problem reduces to coloring the 17×4217 \times 42 table's graph with two colors to maximize the number of edges between vertices of opposite colors.

Lemma: In a graph of squares colored with two colors, the number of edges connecting vertices of opposite colors is less than 33 per vertex for a certain type of graph, and less than 44 per vertex for another type. (This lemma holds for square graphs.)

Proof. By coloring all possibilities for four vertices in the graph, we can verify the lemma. For the last graph, with only one type of coloring, the number of edges connecting opposite colors is exactly 44.

Corollary:
{ \begin{cases} \Box \\ \Box \\ \vdots \\ \Box \end{cases}

a) For a graph with 2n2n vertices colored with two colors, the maximum number of edges connecting vertices of opposite colors is 3n23n - 2.

{n \begin{cases} \Box \\ \Box \\ \vdots \\ \Box \end{cases} \underbrace{\Box \cdots \Box}_{n}

b) For another type of graph, the maximum number of edges connecting vertices of opposite colors is 6n86n - 8.

Proof a) In the above graph, we can assume it is the union of two types of graphs: one with a single square and n2n-2 squares. By the lemma, this graph has at most 4+3(n2)=3n24 + 3(n - 2) = 3n - 2 edges connecting opposite colored vertices.

b) In this graph, we can assume it is the union of two types of graphs: one with a single \boxplus graph and n2n - 2 \boxplus graphs. By the lemma, this graph has at most 4+6(n2)=6n84 + 6(n - 2) = 6n - 8 edges connecting opposite colored vertices.

Now, solve the problem. The 17×4217 \times 42 table's graph is the union of 4217=2542 - 17 = 25 graphs.

Figure 2
Figure 3
Figure 4

Consider the 17×1717 \times 17 square graph. By the corollary part a), for 2525 graphs, the total number of edges connecting opposite colored vertices is less than 25(3172)=122525 \cdot (3 \cdot 17 - 2) = 1225.

Assume that the 17×1717 \times 17 square's graph is the union of the graphs in the figure. Then, by corollary part b), we have:
(6178)+(6168)++(628)=6152816=784. (6 \cdot 17 - 8) + (6 \cdot 16 - 8) + \dots + (6 \cdot 2 - 8) = 6 \cdot 152 - 8 \cdot 16 = 784.

Hence, the 17×4217 \times 42 table's graph has at most 1225+784=20091225 + 784 = 2009 edges connecting opposite colored vertices.

If we color the vertices in odd-numbered columns black and even-numbered columns white, then the number of edges connecting opposite colors is 20092009.

Looking for a route rather than 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.