Browse · MathNet
PrintInternational Mathematical Olympiad
counting and probability
Problem
Alice fills the fields of an board with numbers from to , 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 ) 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 .


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 .
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 board where in each field we will write the number of good sequences which end on the corresponding field in the original board . We will thus look for the minimal possible value of the sum of all entries in .
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 in increasing order with respect to their values in , it follows that each field not adjacent to any already filled field will receive a , 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 , that corresponding with the field with the entry in . Hence, the sum of values of fields in corresponding to wells in is at least . We will now try to minimize the sum of the non-well entries, i.e. of the entries in corresponding to the non-wells in . 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 , the sum of non-well entries will at least equal the number of pairs of adjacent fields, which is . Hence, the total minimum sum of entries in is at least . The necessary conditions for the minimum to be achieved is for there to be only one well and for no two entries in larger than to be adjacent to each other.
We will now prove that the lower limit of entries can be achieved. This amounts to finding a way of marking a certain set of squares, those that have a value of in , such that no two unmarked squares are adjacent and that the marked squares form a connected tree with respect to adjacency.
For and the markings are respectively the lone field and the L-trimino. Now, for , let for and for . We will take indices and to be arbitrary non-negative integers. For we will construct a path of marked squares in the first two columns consisting of all squares of the form where is not of the form and where is of the form or . Obviously, this path is connected. Now, let us consider the fields and . For each considered field we will mark all squares of the form for and . One can easily see that no set of marked fields will produce a cycle, that the only fields of the unmarked form and and that no two are adjacent, since the consecutive considered fields are in columns of opposite parity. Examples of markings are given for , and the corresponding constructions for and are given for .
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 in increasing order with respect to their values in , it follows that each field not adjacent to any already filled field will receive a , 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 , that corresponding with the field with the entry in . Hence, the sum of values of fields in corresponding to wells in is at least . We will now try to minimize the sum of the non-well entries, i.e. of the entries in corresponding to the non-wells in . 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 , the sum of non-well entries will at least equal the number of pairs of adjacent fields, which is . Hence, the total minimum sum of entries in is at least . The necessary conditions for the minimum to be achieved is for there to be only one well and for no two entries in larger than to be adjacent to each other.
We will now prove that the lower limit of entries can be achieved. This amounts to finding a way of marking a certain set of squares, those that have a value of in , such that no two unmarked squares are adjacent and that the marked squares form a connected tree with respect to adjacency.
For and the markings are respectively the lone field and the L-trimino. Now, for , let for and for . We will take indices and to be arbitrary non-negative integers. For we will construct a path of marked squares in the first two columns consisting of all squares of the form where is not of the form and where is of the form or . Obviously, this path is connected. Now, let us consider the fields and . For each considered field we will mark all squares of the form for and . One can easily see that no set of marked fields will produce a cycle, that the only fields of the unmarked form and and that no two are adjacent, since the consecutive considered fields are in columns of opposite parity. Examples of markings are given for , and the corresponding constructions for and are given for .
Final answer
2n^2 - 2n + 1
Techniques
Counting two waysColoring schemes, extremal arguments