December 6th, 2010, 1:18 pm
Hello,I would like to get some help with following brainteaser:Suppose there are fifty "1" and fifty "-1".How many way this sequence of 100 numbers can be constructed such that the subtotal is always >= 0?For example:In case of 2 numbers, there is only 1 way:1, -1In case of 4 numbers, there are 2 ways:1, 1, -1, -11, -1, 1 , -1In case of 6 numbers, there are 5 ways:1, 1, 1, -1, -1, -11, 1, -1, 1, -1, -11, 1, -1, -1, 1, -11, -1, 1, -1, 1, -11, -1, 1, 1, -1, -1In case of 8 numbers, there are 14 ways (if my calculation is correct.)But I could find a pattern to generalize it. Please help.Thank you very much.Peter