Olympiad Maths Prep

Library / /5 of 5

Combinatorics Difficulty 7.6 National olympiad, round 2 Prove it Turkey

We say that a 9 digit positive integer is balanced if one of its digits is 1, one of its digits is 2, ..., and one of its digits is 9. A digit sequence SS is obtained by writing alongside all balanced integers in ascending order. Find the smallest integer kk such that any two subsequences of SS each consisting of kk consecutive digits starting at different digits are different.

Solution

Answer: 17.
A subsequence of SS consisting of kk consecutive digits will be called a kk-block. First of all, let us show that there are two differently located 16-blocks such that the sequences obtained by the restriction of SS to these blocks coincide. Since the first two balanced integers are 123456789123456789 and 123456798123456798 there exists a 16-block
2345678912345679 2345678912345679
Consider the location of the balanced integer 234567891234567891. Since the next balanced integer is 234567918234567918 the 16-block constituted by the 9 digits of the first and 7 digits of the second balanced integer is again 23456789123456792345678912345679.

Now we show that there are no two differently located 17-blocks such that the sequences obtained by the restriction of SS to these blocks coincide. We start with the following

Claim: Let D1,D2D_1, D_2 be two consecutive balanced integers in SS and k8k \le 8 be an integer. Let P1P_1 and P2P_2 be numbers constituted by the first kk digits of D1D_1 and D2D_2, respectively. If the set of digits of P1P_1 and the set of digits of P2P_2 coincide then P1=P2P_1 = P_2.

Proof: Assume the contrary: suppose that the set of digits P1P_1 and P2P_2 coincide but P1P2P_1 \neq P_2. Among kk digits, let ll be the very first digit from the left when corresponding digits of P1P_1 and P2P_2 are different. Since P1P_1 and P2P_2 are consecutive, ll-th digits of P1P_1 and P2P_2 should be jj and j+1j+1, respectively. By definition, 1lk11 \le l \le k-1. Since D1D_1 and D2D_2 are consecutive, by erasing of first ll digits of D1D_1 we should get a maximal possible number and by erasing of first ll digits of D2D_2 we should get a minimal possible number. Let pp be the last digit of D1D_1. Then in D2D_2, pp should be just after j+1j+1. This contradicts with the fact that the set of digits of P1P_1 and the set of digits of P2P_2 coincide. Thus, P1=P2P_1 = P_2. \square

Suppose that there are two differently located coinciding 17-blocks, say aa and bb. Any 17-block totally contains some balanced integer, otherwise its length is at most 8+8=168+8=16. Let K1K_1 and K2K_2 be balanced integers contained in these two 17-blocks, respectively. Since 17-blocks are differently located, K1K2K_1 \neq K_2. Moreover, K1K_1 and K2K_2 should share some digits, otherwise the block would consist of at least 9+9=189+9=18 digits. Let the common part of K1K_1 and K2K_2 be u2u_2. Let albalb be the concatenation of aa and bb. Without loss of generality, let us represent K1K_1 and K2K_2 by the following concatenations: K1=u1u2K_1 = u_1|u_2 and K2=u2u3K_2 = u_2|u_3. Thus, the sequence u1u2u3u_1|u_2|u_3 is a subsequence of both aa and bb. Moreover, since both u1u_1 and u3u_3 contain digits not represented in u2u_2, u1u_1 and u3u_3 have the same length and same set of digits.

K1=u1u2K_1 = u_1|u_2 is a balanced integer starting with u1u_1. Since the next balanced integer starts as u3u_3, we get u1=u3u_1 = u_3.

The balanced integer preceding K2=u2u3K_2 = u_2|u_3 ends with u1u_1. Let us represent it as vu1v|u_1. Therefore, vu1v|u_1 and u2u3u_2|u_3 are consecutive balanced numbers. Since u1=u3u_1 = u_3, the digits of vv and u2u_2 coincide: v=u2v = u_2. Hence vu1=u2u3v|u_1 = u_2|u_3. On the other hand, two consecutive balanced integers cannot coincide, contradiction. Thus, there are no two differently located 17-blocks such that the sequences obtained by the restriction of SS to these blocks coincide. Done.

Looking for a route rather than 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 and solution reproduced as published; topic and difficulty added by this site.