Maths Olympiad Prep

Library / /62 of 62

Combinatorics Difficulty 7.7 National Olympiad, round 2 Prove it Ukraine

Given a stripe 1×n1 \times n, n4n \ge 4. One wrote a positive integer in each cell of it (the numbers are not obliged to be equal). After under each number one writes a positive integer which is equal to the quantity of such integers in the previous row. (i.e. if 1010 was written in the previous row three times then under each of the numbers 1010 one writes 33 in the next row). After the procedure repeats.

a) Prove that after a finite number of steps the rows will not change.

b) How long can the next row differ from the previous one if n=2016n=2016 and if nn is arbitrary?

Solution

Obviously, it is possible to rearrange the numbers in each row so that they increase. Denote the initial row as 0th0^{\text{th}}, the next - 1st1^{\text{st}} and so on.

Let us describe the properties of the numbers inside rows beginning from the 1st1^{\text{st}} one.

Lemma 1. If nn occur in kk th row, then the amount of numbers "n" is divisible by nn.

Proof. Number nn occurs in the 1st1^{\text{st}} row if there are nn equal numbers in the 0th0^{\text{th}} row, say mm. Then under these nn numbers "mm" one writes a group of numbers nn. If another number ll in the 0th0^{\text{th}} row occurs nn times too, then a new group which contains nn numbers equal to nn will emerge in the 1st1^{\text{st}} row. The number nn may occur in the rows after 1st1^{\text{st}} one if there were numbers nn in the previous row and one wrote nn under them once again or there was a group of exactly nn equal numbers different from nn. Hence, their amount is divisible by nn.

Lemma 2. If there is a group of numbers "n" in the kk th row then the same number will be written under these numbers but this number is not obliged to be equal to nn.

Proof. It is an easy consequence of the property that if in the previous row there were two equal numbers then under them one should write the same numbers too.

Consider the first row. Let ll be the smallest number inside it. That means the amount of the numbers "ll" will be equal to slsl, s1s \ge 1. The other numbers are greater than ll.

If ll occur exactly ll times, then under them only one can write only numbers ll. They cannot decrease since there are exactly ll of them and they cannot increase because in this case we need ll equal numbers but there is no such group. So we can erase these numbers and consider a row with nln-l numbers. Now we can look for the smallest number in the new row.

If there is a group of ll consisting of slsl numbers, s>1s > 1, then in the next group one has to write slsl under them. Consider some mm in the 1st row such that: l<m<2ll < m < 2l. Analogously, if there are exactly mm of them then they cannot change in the lower rows. The numbers which are less then mm either do not change (and does not impact on the changes of the numbers mm) or at least two times increase, so mm cannot occur under them. So we can ignore such numbers. If there are tmtm of them then they are replaced by tmtm in the consecutive rows.

Hence in the 2nd row we need only consider the numbers which are greater or equal to 2l2l.

Analogously, if the least number in the 2nd row is l2l_2 (among the numbers which we need to consider), then in the 3rd row the least such number will be at least 2l22l_2 and so on.

It is easy to see that a number greater then nn cannot emerge in the rows. So the greatest possible number of steps is kk, for which 2kn2^k \le n. But we have to count the move from 0th to 1st row. So at most we can have k+1k+1 steps.

Let the 0th row has the following appearance:
(n1),(1),(2,2),(4,4,4),,(2k1,2k1,,2k1)2k1,(m,m,,m)m (0th row) (n-1), (1), (2, 2), (4, 4, 4), \dots, \underbrace{(2^{k-1}, 2^{k-1}, \dots, 2^{k-1})}_{2^{k-1}}, \underbrace{(m, m, \dots, m)}_{m} \text{ (0th row)}

(1,1),(2,2),(4,4,4),,(2k1,2k1,,2k1)2k1,(m,m,,m)m (1st row) (1, 1), (2, 2), (4, 4, 4), \dots, \underbrace{(2^{k-1}, 2^{k-1}, \dots, 2^{k-1})}_{2^{k-1}}, \underbrace{(m, m, \dots, m)}_{m} \text{ (1st row)}
(2,2,2,2),(4,4,4,4),,(2k1,2k1,,2k1)2k1,(m,m,,m)m (2nd row) (2, 2, 2, 2), (4, 4, 4, 4), \dots, \underbrace{(2^{k-1}, 2^{k-1}, \dots, 2^{k-1})}_{2^{k-1}}, \underbrace{(m, m, \dots, m)}_{m} \text{ (2nd row)}
(4,4,4,4,4,4,4),,(2k1,2k1,,2k1)2k1,(m,m,,m)m (3rd row) (4, 4, 4, 4, 4, 4, 4), \dots, \underbrace{(2^{k-1}, 2^{k-1}, \dots, 2^{k-1})}_{2^{k-1}}, \underbrace{(m, m, \dots, m)}_{m} \text{ (3rd row)}
(2 k-1 , 2 k-1 , , 2 k-1 ) 2 k , (m, m, , m) m (k-1 th row)\text{(2 k-1 , 2 k-1 , , 2 k-1 ) 2 k , (m, m, , m) m (k-1 th row)}
(2 k, 2 k, , 2 k) 2 k , (m, m, , m) m (k th row)\text{(2 k, 2 k, , 2 k) 2 k , (m, m, , m) m (k th row)}

Now let us understand why the condition m=2kn=2im = 2^k - n = 2^i is important. If there is a group consisting of 2i2^i then there is a group of the numbers 2i2^i, which will give a group of 2i+12^{i+1} in the next row. So in the described process the numbers change as: 2021222i2^0 \to 2^1 \to 2^2 \to \dots \to 2^i, in the next step the numbers will not change and the changes will last shorter.

For instance if there are 5 numbers in the beginning then we will have the following estimates: 22=4<52^2 = 4 < 5, so the answer is at most 3 steps. But if we consider the 0th row as 1; 4; 2; 2; 5 we will get the following 1st row: 1; 1; 2; 2; 1, 2nd row: 3; 3; 2; 2; 3. The same situation is if n=2s+1n = 2^s + 1.

Analogously if n=2s+2n = 2^s + 2, because in this case either a group of two equal numbers will emerge or there will be two distinct numbers in the 0th row. The last case when we cannot increase the amount of numbers - n=2s+4n = 2^s + 4. Here we have that if 4 decomposed into several integer summands then one of this summands would be equal to some power of 2. In this case there will emerge a group of three one's in the first row. So we do not need 2kn2^k \le n, but 32k1n3 \cdot 2^{k-1} \le n. Now we are going to determine for which nn it is possible. 32k1n=2k+43 \cdot 2^{k-1} \le n = 2^k + 4. Then 2k142^{k-1} \le 4, or k3k \le 3. So for n=5n=5, n=6n=6 and n=12n=12. For n=5n=5 we have already seen that it is impossible, for n=6n=6 we have the following situation in 0th row: 1;2;2;2;5;61;3;3;3;1;13;3;3;3;3;36;6;6;6;6;61; 2; 2; 2; 5; 6 \rightarrow 1; 3; 3; 3; 1; 1 \rightarrow 3; 3; 3; 3; 3; 3 \rightarrow 6; 6; 6; 6; 6; 6, Analogously if n=12n=12.

In case of 2i82^i \ge 8 it suffices to take instead of (m,m,...,mm)(\underbrace{m, m, ..., m}_{m}) in the basic example two groups: (s,s,...,ss)(\underbrace{s, s, ..., s}_{s}) and (t,t,...,tt)(\underbrace{t, t, ..., t}_{t}), where s=2i11s = 2^{i-1}-1 and t=2i1+1t = 2^{i-1}+1, which will not change during the whole procedure and will not interfere with the basic example.

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: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.