Skip to main content
OlympiadHQ

Browse · MathNet

Print

International Mathematical Olympiad

counting and probability

Problem

A -sequence is a sequence of numbers , each equal to either or . Determine the largest so that, for any -sequence, there exists an integer and indices so that for all , and
Solution
First, we prove that this can always be achieved. Without loss of generality, suppose at least terms of the -sequence are . Define a subsequence as follows: starting at , if we always include in the subsequence. Otherwise, we skip if we can (i.e. if we included in the subsequence), otherwise we include it out of necessity, and go to the next . Clearly, this subsequence will include all s. Also, for each included in the sequence, a must have been skipped, so at most can be included. Hence the sum is at least , as desired.

Next, we prove that, for the -sequence each admissible subsequence has . We say that the terms inside each curly bracket is a block. In total, there are blocks - of them hold s, and of them hold s. (The two blocks at each end hold number each, each other block holds .)

Suppose an admissible subsequence includes terms from blocks holding s. Then, in each -pair in between the -pairs, the subsequence must also include at least one . There can be at most two s included from each -block, and at least one must be included from each -block, so the sum is at most .

For , this is at most . If , one of the -blocks must be the one at the end, meaning it can only include one , so that the maximum in this case is only , not , so in this case the sum is also at most .

Hence we have shown that for any admissible subsequence, . Analogously we can show that , meaning that as desired.
Final answer
506

Techniques

Games / greedy algorithmsColoring schemes, extremal arguments