hard | discrete |

An optimist and a pessimist are examining a sequence of real numbers. The optimist remarks, ‘Oh jolly! The sum of any eight consecutive terms is positive!’ But the pessimist interjects, ‘Not so fast, the sum of any five consecutive terms is negative.’ Can they both be right? Atmost how large can this sequence be?

One easy proof is to construct rows, starting from ai, and satisfying one of the sum properties - optimist or pessimist. The column sum can follow the other property. Try making a contradiction.

11

Suppose such a sequence with terms {ai} has length 12

a1+a2+...+a5<0 a2+a3+...+a6<0 .. a8+a9+...+a12<0

Note that rows sums are negative and column sums are positive. This is contradiction to the total sum! So max length of sequence is 11. This sequence can be constructed but we wont cover the instruction. Example: 1 at positions 1,3,4,6,8,9,11 and -1.6 at positions 2,5,7,10.