Skip to main content
OlympiadHQ

Browse · MathNet

Print

Baltic Way shortlist

Baltic Way counting and probability

Problem

Grandfather has a finite number of empty dustbins in his attic. Each dustbin is a rectangular parallelepiped with integral side lengths. A dustbin can be thrown away into another iff the side lengths of these dustbins can be set to one-to-one correspondence in such a way that the side lengths of the first dustbin are less than the corresponding side lengths of the other dustbin. No dustbin can contain two other dustbins unless the latter have been placed one into another. Grandfather wants to throw away as many dustbins as possible for saving space. He developed the following algorithm for it: find the longest chain of dustbins that can be thrown away into each other, then repeat the same with remaining dustbins, etc., until no more dustbins can be thrown away. When following this algorithm, the longest chain of dustbins to be chosen turned out to be unique at each step. Is it necessarily true that, as the result of the process, the maximal possible number of dustbins have been thrown away?
Solution
Suppose grandfather has 6 dustbins with sizes , , , , and . The first dustbin can contain the second one, the second can contain the third or the fifth, the fifth can contain the sixth. The fourth also can contain the fifth. It is impossible to throw the first and the fourth into each other, the second and the fourth into each other, the third and the fourth into each other, the third and the fifth into each other, or the third and the sixth into each other. In the longest chain of dustbins that can be thrown into each other is 4 dustbins: the sixth can be thrown into the fifth, which can be thrown into the second, which can be thrown into the first. As the remaining two dustbins cannot be thrown into each other, 3 dustbins in total are not thrown away. However, by throwing the third dustbin into the second, the second into the first, the sixth into the fifth and the fifth into the fourth, only 2 dustbins are not thrown away. Hence grandfather's algorithm does not provide an optimal solution.
Final answer
No

Techniques

Games / greedy algorithmsAlgorithmsColoring schemes, extremal arguments