Maths Olympiad Prep

Library / /118 of 158

Combinatorics Difficulty 6.5 National Olympiad Prove it Estonia

Let nn be a positive integer such that there exists a positive integer that is less than n\sqrt{n} and does not divide nn. Let (a1,,an)(a_1, \dots, a_n) be an arbitrary permutation of 1,,n1, \dots, n. Let ai1<<aika_{i_1} < \dots < a_{i_k} be its maximal increasing subsequence and let aj1>>ajla_{j_1} > \dots > a_{j_l} be its maximal decreasing subsequence. Prove that tuples (ai1,,aik)(a_{i_1}, \dots, a_{i_k}) and (aj1,,ajl)(a_{j_1}, \dots, a_{j_l}) altogether contain at least one number that does not divide nn.

Solutions — 3

Solution 1

The first phase of the solution consists in showing that klnkl \ge n. For every i=1,,ni = 1, \dots, n, let f(i)f(i) denote the length of the longest increasing subsequence ending with aia_i, and let g(i)g(i) be the length of the longest decreasing subsequence ending with aia_i. For distinct indices i<ji < j, if ai<aja_i < a_j then f(i)<f(j)f(i) < f(j), and if ai>aja_i > a_j then g(i)<g(j)g(i) < g(j). Hence pairs of the form (f(i),g(i))(f(i), g(i)) where i=1,,ni = 1, \dots, n are all distinct, i.e., there are nn different such pairs in total. By the conditions of the problem, the largest number of the form f(i)f(i) is kk and the largest number of the form g(i)g(i) is ll. Thus the number of pairs of the form (f(i),g(i))(f(i), g(i)) is at most klkl. Consequently, nkln \le kl.

From this result, we deduce k+l2kl2nk+l \ge 2\sqrt{kl} \ge 2\sqrt{n} by AM-GM. At most one number can belong to an increasing and a decreasing subsequence simultaneously. Thus subsequences (ai1,,aik)(a_{i_1}, \dots, a_{i_k}) and (aj1,,ajl)(a_{j_1}, \dots, a_{j_l}) together contain at least 2n12\sqrt{n}-1 different natural numbers in total. By assumptions, number nn has at most n1\lfloor\sqrt{n}\rfloor-1 divisors that are not larger than n\sqrt{n}, the total number δ(n)\delta(n) of divisors of nn satisfies the inequality δ(n)2n2\delta(n) \le 2\lfloor\sqrt{n}\rfloor - 2. Consequently, subsequences (ai1,,aik)(a_{i_1}, \dots, a_{i_k}) and (aj1,,ajl)(a_{j_1}, \dots, a_{j_l}) together contain at least one number that does not divide nn.

Solution 2

The inequality klnkl \ge n can be proven also in the following way. Let us partition the permutation (a1,,an)(a_1, \dots, a_n) into decreasing subsequences using the following algorithm. The first element of each new subsequence is the first unused element in the original permutation, the next is the first following to it in the original permutation unused element smaller than it etc., until no more elements can be chosen this way. Let these subsequences be K1,,KxK_1, \dots, K_x in the order of forming.

For every z=x,x1,,2z = x, x-1, \dots, 2 and every element aja_j of KzK_z, there exists an element aia_i in Kz1K_{z-1} such that i<ji < j and ai<aja_i < a_j. Indeed, suppose the contrary. Then all elements aia_i of Kz1K_{z-1} such that i<ji < j are greater than aja_j. This means that aja_j should have been chosen into Kz1K_{z-1}, a contradiction.

Hence, starting from an arbitrary element bxb_x of KxK_x, we can choose an element bx1b_{x-1} from Kx1K_{x-1}, an element bx2b_{x-2} from Kx2K_{x-2}, etc, until b1b_1 from K1K_1, in such a way that b1<<bx1<bxb_1 < \dots < b_{x-1} < b_x. This is an increasing subsequence of length xx of the original permutation. As every element of the original permutation belongs to one of K1,,KxK_1, \dots, K_x, there exists a decreasing subsequence of length at least nx\frac{n}{x}. Now kxk \ge x and lnxl \ge \frac{n}{x} together give klxnx=nkl \ge x \cdot \frac{n}{x} = n.

Solution 3

Another algorithm can be used for partitioning the permutation (a1,,an)(a_1, \dots, a_n) into decreasing subsequences in such a way that there exists an increasing subsequence with each element representing a different part. Let the first element of each new subsequence be the largest among the unused elements, the next be the largest following to it in the original sequence unused element etc., until no more elements can be chosen this way. Let these subsequences be L1,,LyL_1, \dots, L_y in the order of forming.

For every z=y,y1,,2z = y, y-1, \dots, 2 and every aia_i from LzL_z, there exists an element aja_j from Lz1L_{z-1} such that i<ji < j and ai<aja_i < a_j. Indeed, suppose the contrary. Then all elements aja_j in Lz1L_{z-1} such that i<ji < j are smaller than aia_i. This means that aia_i should have been chosen into Lz1L_{z-1}, contradiction.

Hence, starting from an arbitrary element cyc_y of LyL_y, we can choose an element cy1c_{y-1} from Ly1L_{y-1}, an element cy2c_{y-2} from Ly2L_{y-2} etc., until c1c_1 from L1L_1, in such a way that cy<cy1<<c1c_y < c_{y-1} < \dots < c_1. The rest is as in Solution 2.

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.