More unfinished lines.

The teacher was writing a problem on the board. -

1 , 2 , , 15 , 16 \triangle_1, \triangle_2, \cdots, \triangle_{15}, \triangle_{16} are positive integers. Prove that there is a way to put the number -1, 0 or 1 in the boxes such that 1 1 + 2 2 + + 15 15 + 16 16 \square_{1}\triangle_{1} + \square_{2}\triangle_{2} + \cdots + \square_{15}\triangle_{15} + \square_{16}\triangle_{16} is divisible by \bigcirc .

"Wait, that is all?"

"Correct. Now you have to find the maximum possible number to be put in the circle and then, prove it."

"Wait, could you put zero into all of the boxes so that the total expression equals to zero. Doesn't that divisible by any number except itself?"

"I am sorry. There must have been a mistake. Putting zero into all of the boxes is not a possibility. That would be too easy to solve."


The answer is 65535.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Julian Poon
Jan 7, 2019

Amazing problem! After months of inactivity solving this was a great way to start again.

For notation's sake, I'll redefine some variables. i = a i , = N , i = b i = 1 , 0 , 1 \triangle_i = a_i, \bigcirc = N, \square_i = b_i = -1,0,1 . If S = 1 i 16 b i a i \displaystyle S = \sum_{1 \le i \le 16} b_i a_i is divisible by N N , S 0 mod N S \equiv 0 \text{ mod } N . Hence, I'll be working in mod N \text{mod }N . It should be noted that when working with mod N \text{mod }N , it is susficient to consider a i a_i ranging from 0 0 to N 1 N-1 .


Ok here's my solution:


Claim: For N > 2 16 1 N > 2^{16} - 1 , there exists a set of integers a i a_i such that no sequence of b i b_i exists such that S 0 mod N S \equiv 0 \text{ mod } N

Proof: Consider a i = 2 i 1 , 1 i 16 a_i = 2^{i-1}, 1 \le i \le 16 . Then every possible sequence c i = 0 , 1 c_i = 0,1 would lead to S = 1 i 16 c i a i \displaystyle S' = \sum_{1 \le i \le 16} c_i a_i being a unique integer from 1 S 2 16 1 1 \le S' \le 2^{16} - 1 . This can be seen from the binary representation of S S' . Note that our choice of a i a_i forces 2 16 + 1 S = 1 i 16 b i a i 2 16 1 \displaystyle -2^{16} + 1 \le S = \sum_{1 \le i \le 16} b_i a_i \le 2^{16} - 1 . In order for S 0 mod N S \equiv 0 \text{ mod } N , S = 0 S = 0 .

Now, a sequence b i b_i can be computed by an element wise subtraction of 2 sequences of c i : c i , c i c_i: c_i', c_i'' : b i = c i c i b_i = c_i' - c_i'' . Suppose S 0 = 1 i 16 c i a i , S 1 = 1 i 16 c i a i \displaystyle S_0' = \sum_{1 \le i \le 16} c_i' a_i, S_1' = \sum_{1 \le i \le 16} c_i'' a_i . Then S = 1 i 16 b i a i = S 0 S 1 \displaystyle S = \sum_{1 \le i \le 16} b_i a_i = S_0' - S_1' . In order for S = 0 S = 0 , S 0 = S 1 S_0' = S_1' . Since if c i c i c_i' \neq c_i'' , S 0 S 1 S_0' \neq S_1' , the only possible way S 0 = S 1 S_0' = S_1' is if c i = c i c_i' = c_i'' . This would mean b i = 0 b_i = 0 for all 1 i 16 1 \le i \le 16 , which isn't allowed.


This would mean that N 2 16 1 N \le 2^{16} - 1 . Here I make a bold claim:

Claim: N = 2 16 1 N = 2^{16} - 1 .

Proof: If N = 2 16 1 N = 2^{16} - 1 , then S mod N S \text{ mod } N has 2 16 2^{16} possible values, 0 S mod N 2 16 1 0 \le S \text{ mod } N \le 2^{16} - 1 . Now we have 2 cases:

Case 1: S = 0 mod N S = 0 \text{ mod } N . If this is so, then we are done! (Claim proven)

Case 2: S 0 mod N S \neq 0 \text{ mod } N . If this is so, then S mod N S \text{ mod } N can have 2 16 1 2^{16} - 1 possible values, 1 S mod N 2 16 1 1 \le S \text{ mod} N \le 2^{16}-1 . Now, each sequence c i c_i would map to a (not necessarily unique) S = 1 i 16 c i a i \displaystyle S' = \sum_{1 \le i \le 16} c_i a_i . Since there are a total of 2 16 2^{16} possible sequences c i c_i , by pigeonhole principle, there will be at least ceil ( 2 16 2 16 1 ) = 2 \text{ceil}\left(\frac{2^{16}}{2^{16} - 1}\right) = 2 , c i : c i , c i c_i: c_i', c_i'' such that S 0 S 1 mod N S_0' \equiv S_1' \text{ mod } N . As such, b i b_i can simply be constructed by taking the element-wise subtraction of the c i , c i c_i', c_i'' : b i = c i c i b_i = c_i' - c_i'' . As such, there would exist a sequence b i b_i such that S = 0 mod N S = 0 \text{ mod } N -- a contradiction. A such, case 2 is impossible.

Hence we have proven that N = 2 16 1 = 65535 N = 2^{16} - 1 = \boxed{65535} .

1 pending report

Vote up reports you agree with

×

Problem Loading...

Note Loading...

Set Loading...