# Playing with operators

1. May 2, 2004

### dapet

Determine the permutation (x_1,x_2,...,x_40) of numbers 1,2,...,40 such that the expression x_1 + x_2 / x_3 - x_4 * x_5 + x_6 / x_7 - x_8 * x_9 + ... + x_38 / x_39 - x_40
has the maximal possible value. (the operators +,/,-,* alternate regularly.) It can be generalized for 4n (where n is an arbitrary natural)?

But I must confess, that I have a lot of problems with the simpler task... I think that more than one permutation give the same maximum. I have one suggestion, but I can't prove that it belongs to the best of all.
It's based on:
let (a,b,c,d,e,f) be a permution of (1,2,3,4,5,6)
minimum of ab + cd + ef occurs for 6*1 + 2*5 + 3*4
maximum of a/b + c/d + e/f occrus for 6/1 + 5/2 + 4/3
But the generalization...

Thanks.

2. May 10, 2004

### dapet

I think that the maximum looks like:
40+(39/20)+(38/21)+...(30/29)-(1*18)-(2*17)-...-(10*9)-19 and the generalization is (according to my opinion) similar... It's easy to prove that numbers 40,39,...,30 must be in numerators of fractions for reach the maximum, but I don't know how to prove that the "position" of other numbers as optimal as possible for reach the maximum...

Thanks for each help that I really need.