Browse · MathNet
PrintTST for BMO
Bulgaria counting and probability
Problem
Let be a natural number. King Arthur has invited knights to an audience in Camelot. Merlin the Magician arranged the knights in a list numbered from to . It turned out that any two knights with numbers are friends if and only if . The king chose a natural number and ordered Merlin to make a new list with the following requirement. For each , all friends of the knight with sequence number (in the new list) must be in positions among . Prove that the smallest , for which Merlin can fulfil Arthur's wish, satisfies the condition (Dragomir Grozev)

Solution
Let us construct a graph with vertex-set which is the set of all knights, numbered as in the first list. Two vertices are adjacent if the corresponding knights are friends. It can be seen that is a fully balanced binary tree - see fig. 1. We label each vertex with the knight's number in the first list. Let us assume the vertices can be arranged in a row as King Arthur requested, where and refers to the label of the corresponding vertex. There is a unique path in , that connects the vertex labeled as and . Clearly, , because the longest path in has length . Note that the distance between the positions of and in the new list, is at most . This means that which yields which proves the lower bound for .
Now we will arrange the vertices of in a list. Let be a natural number which will be determined later. Denote by the vertices of on the -th level, and let be the subtrees with roots in these points - see fig. 1. Each of them has exactly leaves.
We successively put in a list the vertices of as follows. First, we place the last level of vertices of , that is, its leaves. Then we put down the second to last level of and the last level of . At the -th step we place the -th level of , counting from the bottom up (fig. 1), then the -th level of (from the bottom up) and so on, and finally - the last layer of (i.e. its leaves). The number of vertices we place at the -th step is equal to We follow these steps until one of the two events happens. 1) We reach the root of . 2) We place in the list the leaves of . The first event will
happen after steps and the second one - after steps. To ensure that the second event occurs first we choose to be the largest positive integer for which .
In this situation, at the s-th step we have put the leaves of in the list. On the s + 1-th step we put in the list the remaining vertices of T. The number of all vertices in without its last level does not exceed . The number of vertices in without its last two layers does not exceed and so on. Adding the vertices of T up to its l-th level, we obtain that the number of the vertices ordered at the last step is at most since . Clearly, for any vertex , placed at position in the first steps, all of its neighbours in , that are placed after it, are in positions with numbers not exceeding . Taking into account the number of vertices added in the last step, we get that in the constructed list the condition imposed by the king holds for
This proves the upper bound. □
Now we will arrange the vertices of in a list. Let be a natural number which will be determined later. Denote by the vertices of on the -th level, and let be the subtrees with roots in these points - see fig. 1. Each of them has exactly leaves.
We successively put in a list the vertices of as follows. First, we place the last level of vertices of , that is, its leaves. Then we put down the second to last level of and the last level of . At the -th step we place the -th level of , counting from the bottom up (fig. 1), then the -th level of (from the bottom up) and so on, and finally - the last layer of (i.e. its leaves). The number of vertices we place at the -th step is equal to We follow these steps until one of the two events happens. 1) We reach the root of . 2) We place in the list the leaves of . The first event will
happen after steps and the second one - after steps. To ensure that the second event occurs first we choose to be the largest positive integer for which .
In this situation, at the s-th step we have put the leaves of in the list. On the s + 1-th step we put in the list the remaining vertices of T. The number of all vertices in without its last level does not exceed . The number of vertices in without its last two layers does not exceed and so on. Adding the vertices of T up to its l-th level, we obtain that the number of the vertices ordered at the last step is at most since . Clearly, for any vertex , placed at position in the first steps, all of its neighbours in , that are placed after it, are in positions with numbers not exceeding . Taking into account the number of vertices added in the last step, we get that in the constructed list the condition imposed by the king holds for
This proves the upper bound. □
Techniques
Graph TheoryColoring schemes, extremal argumentsAlgorithms