Olympiad Maths Prep

Track / Stage 6 / 260 of 400 #1260 of 2000

Problem 1260

National olympiad, first round
Combinatorics Difficulty 6.5 Find the answer

Find the greatest integer k2023k\leq 2023 for which the following holds: whenever Alice colours exactly kk numbers of the set {1,2,,2023}\{1,2,\dots, 2023\} in red, Bob can colour some of the remaining uncoloured numbers in blue, such that the sum of the red numbers is the same as the sum of the blue numbers.

Romania

Official solution

1. Define the problem and variables:
Let n=2023 n = 2023 and t=kmax t = k_{\max} be the required maximum. We need to find the greatest integer k2023 k \leq 2023 such that whenever Alice colors exactly k k numbers of the set {1,2,,2023}\{1, 2, \dots, 2023\} in red, Bob can color some of the remaining uncolored numbers in blue, such that the sum of the red numbers is the same as the sum of the blue numbers.

2. Sum of the set:
The sum of the first n n natural numbers is given by:
S=n(n+1)2 S = \frac{n(n+1)}{2}
For n=2023 n = 2023 :
S=202320242=20231012 S = \frac{2023 \cdot 2024}{2} = 2023 \cdot 1012

3. Condition for sums:
If Alice colors t t highest numbers, their sum should be less than half of the sum of all numbers, which is:
n(n+1)4 \frac{n(n+1)}{4}
Otherwise, Bob cannot find a subset of the remaining numbers that sums to the same value. Therefore, we need:
t(nt)+t(t+1)2n(n+1)4 t(n-t) + \frac{t(t+1)}{2} \leq \frac{n(n+1)}{4}

4. Simplify the inequality:
t(nt)+t(t+1)2n(n+1)4 t(n-t) + \frac{t(t+1)}{2} \leq \frac{n(n+1)}{4}
t2t(2n+1)+n(n+1)20 t^2 - t(2n+1) + \frac{n(n+1)}{2} \geq 0

5. Solve the quadratic inequality:
The solutions to the quadratic equation:
t2t(2n+1)+n(n+1)2=0 t^2 - t(2n+1) + \frac{n(n+1)}{2} = 0
are given by:
t1,2=(2n+1)±(2n+1)22n(n+1)2 t_{1,2} = \frac{(2n+1) \pm \sqrt{(2n+1)^2 - 2n(n+1)}}{2}
Simplifying the discriminant:
(2n+1)22n(n+1)=4n2+4n+12n22n=2n2+2n+1 (2n+1)^2 - 2n(n+1) = 4n^2 + 4n + 1 - 2n^2 - 2n = 2n^2 + 2n + 1
Thus:
t1,2=(2n+1)±2n2+2n+12 t_{1,2} = \frac{(2n+1) \pm \sqrt{2n^2 + 2n + 1}}{2}

6. **Determine the valid range for t t :**
Since tn t \leq n , we consider the smaller root:
t(2n+1)2n2+2n+12 t \leq \frac{(2n+1) - \sqrt{2n^2 + 2n + 1}}{2}
Let:
t0=(2n+1)2n2+2n+12 t_0 = \left\lfloor \frac{(2n+1) - \sqrt{2n^2 + 2n + 1}}{2} \right\rfloor

7. **Verify the maximum t0 t_0 :**
We need to show that t0 t_0 is the required maximum. We assume Alice chooses t0 t_0 numbers with sum s s . Bob needs to find some remaining numbers with sum s s or n(n+1)22s \frac{n(n+1)}{2} - 2s .

8. Bob's strategy:
Bob can write s0=a(n+1)+b s_0 = a(n+1) + b where 0bn 0 \leq b \leq n . If a1 a \geq 1 , Bob searches for pairs of numbers summing to b b or n+1+b n+1+b and colors them in blue. He then searches for pairs summing to n+1 n+1 and colors them in blue.

9. Conclusion:
By verifying the conditions and strategies, we find that the maximum t t satisfying the conditions is:
t0=(22023+1)220232+22023+12 t_0 = \left\lfloor \frac{(2 \cdot 2023 + 1) - \sqrt{2 \cdot 2023^2 + 2 \cdot 2023 + 1}}{2} \right\rfloor

The final answer is 673 \boxed{673} .

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.