0
$\begingroup$

I am trying to solve minimization problem with these conditions. Given all pair of n users, I want to minimize all f(A) - f(B) pairs for distinct n users. Since I only need the difference, it will be absolute value of f(A) - f(B) for all pairs. f(A) is an integer value at time t and this value is a summation of f(A) at time t-1 and absolute value of t^ - c. t^ is what I want to minimize and c will be an integer value).

Pairwise set is chosen by n choose 2 (nC2). Is their any solution that I can use to solve this problem? Also, can I model this problem to be a minimization problem which is a summation of all f(A) - f(B) for distinct pairs?

  • 0
    Presumably $f(A)$ represents some value for user $A$. What restrictions are there on the values? If you make them all the same, the sum will be zero. Do the values have to be distinct integers? Do you take the absolute value of the differences? If not, how do you choose the order for the subtraction? Please explain your question better.2017-02-08
  • 0
    @RossMillikan _f(A)_ and _f(B)_ are integer values and they are distinct. I will take the absolute value of the difference. I will update the question.2017-02-08

1 Answers 1

0

Clearly you minimize it by having all the numbers over the minimum range, so it might as well be $1$ to $n$. Then you are asking for $$\sum_{i=1}^{n-1}\sum_{j=i+1}^n(j-i)=\sum_{i=1}^{n-1}\frac 12(i+1+n)(n-i)-i(n-i)\\ =\sum_{i=1}^{n-1}\frac 12n^2-\frac 12i^2+\frac n2+\frac i2-in\\ =\frac 12(n^2(n-1)-\frac 16n(n+1)(2n+1)+n(n-1)+\frac 12n(n-1)-\frac 12(n-1)n^2)\\=\frac{n^3}{12}+\frac {n^2}4-\frac {5n}6$$