Maths Olympiad Prep

Library / /435 of 520

Combinatorics Difficulty 7.1 National olympiad, round 2 Find the answer

Alice fills the fields of an n×nn \times n board with numbers from 1 to n2n^{2}, each number being used exactly once. She then counts the total number of good paths on the board. A good path is a sequence of fields of arbitrary length (including 1) such that: (i) The first field in the sequence is one that is only adjacent to fields with larger numbers, (ii) Each subsequent field in the sequence is adjacent to the previous field, (iii) The numbers written on the fields in the sequence are in increasing order. Two fields are considered adjacent if they share a common side. Find the smallest possible number of good paths Alice can obtain, as a function of nn. (Serbia) Answer: 2n22n+12 n^{2}-2 n+1.

A number or a short expression. Spacing and $ signs are ignored.

Solution

We will call any field that is only adjacent to fields with larger numbers a well. Other fields will be called non-wells. Let us make a second n×nn \times n board BB where in each field we will write the number of good sequences which end on the corresponding field in the original board AA. We will thus look for the minimal possible value of the sum of all entries in BB. We note that any well has just one good path ending in it, consisting of just the well, and that any other field has the number of good paths ending in it equal to the sum of this quantity for all the adjacent fields with smaller values, since a good path can only come into the field from a field of lower value. Therefore, if we fill in the fields in BB in increasing order with respect to their values in AA, it follows that each field not adjacent to any already filled field will receive a 1, while each field adjacent to already filled fields will receive the sum of the numbers already written on these adjacent fields. We note that there is at least one well in AA, that corresponding with the field with the entry 1 in AA. Hence, the sum of values of fields in BB corresponding to wells in AA is at least 1. We will now try to minimize the sum of the non-well entries, i.e., of the entries in BB corresponding to the non-wells in AA. We note that we can ascribe to each pair of adjacent fields the value of the lower assigned number and that the sum of non-well entries will then equal to the sum of the ascribed numbers. Since the lower number is still at least 1, the sum of non-well entries will at least equal the number of pairs of adjacent fields, which is 2n(n1)2 n(n-1). Hence, the total minimum sum of entries in BB is at least 2n(n1)+1=2n22n+12 n(n-1)+1=2 n^{2}-2 n+1. The necessary conditions for the minimum to be achieved is for there to be only one well and for no two entries in BB larger than 1 to be adjacent to each other.

We will now prove that the lower limit of 2n22n+12 n^{2}-2 n+1 entries can be achieved. This amounts to finding a way of marking a certain set of squares, those that have a value of 1 in BB, such that no two unmarked squares are adjacent and that the marked squares form a connected tree with respect to adjacency. For n=1n=1 and n=2n=2 the markings are respectively the lone field and the L-trimino. Now, for n>2n>2, let s=2s=2 for n0,2mod3n \equiv 0,2 \bmod 3 and s=1s=1 for n1mod3n \equiv 1 \bmod 3. We will take indices kk and ll to be arbitrary non-negative integers. For n3n \geqslant 3 we will construct a path of marked squares in the first two columns consisting of all squares of the form (1,i)(1, i) where ii is not of the form 6k+s6 k+s and (2,j)(2, j) where jj is of the form 6k+s1,6k+s6 k+s-1, 6 k+s or 6+s+16+s+1. Obviously, this path is connected. Now, let us consider the fields (2,6k+s)(2,6 k+s) and (1,6k+s+3)(1,6 k+s+3). For each considered field (i,j)(i, j) we will mark all squares of the form (l,j)(l, j) for l>il>i and (i+2k,j±1)(i+2 k, j \pm 1). One can easily see that no set of marked fields will produce a cycle, that the only fields of the unmarked form (1,6k+s),(2+2l+1,6k+s±1)(1,6 k+s),(2+2 l+1,6 k+s \pm 1) and (2+2l,6k+s+3±1)(2+2 l, 6 k+s+3 \pm 1) and that no two are adjacent, since the consecutive considered fields are in columns of opposite parity. Examples of markings are given for n=3,4,5,6,7n=3,4,5,6,7, and the corresponding constructions for AA and BB are given for n=5n=5. !

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

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.