optimize equation by put indexes of a set's elements

52 Views Asked by At

suppose S is a set contains n elements and each element showed by Si. Si's are positive natural numbers.put indexes(1 to n) to elements of S so that y will be the lowest amount. y =∑j=1n(∑i=1j si/ sj) and s0 = 0. for example if S={1,2,3} y will be y= 1/1 + (2+1)/2+(2+1+3)/3 = 4.5 or y= 1/1 + (1+3)/3+ (1+3+2)/2 = 16/3 and for now the minimum amount of y is 4.5 and until now indexes must select like s1 = 1 and s2 = 2 and s3 = 3 which y could be minimum so that way to find indexes of S which y will be the lowest amount