Let $a, b, c, d$ be natural numbers such that $a + b + c + d = 2018$. Find the minimum value of the expression:
$$E = (a-b)^2 + 2(a-c)^2 + 3(a-d)^2+4(b-c)^2 + 5(b-d)^2 + 6(c-d)^2.$$
parmenides51 wrote:
Let $a, b, c, d$ be natural numbers such that $a + b + c + d = 2018$. Find the minimum value of the expression:
$$E = (a-b)^2 + 2(a-c)^2 + 3(a-d)^2+4(b-c)^2 + 5(b-d)^2 + 6(c-d)^2.$$
Translated from here:
We show that the minimum sought is 14.
This value is indeed reached, for example, if \(a = b = 505\) and \(c = d = 504\).
Since 2018 is not divisible by 4, the numbers \(a, b, c, d\) cannot all be equal.
If three of them are equal, then three of the squares are 0, while the other three are non-zero. Moreover, the four numbers must have the same parity, so the other squares are at least 4. Thus, \(E \geq 4 + 2 \cdot 4 \cdot 3 \cdot 4 > 14\).
If two of the numbers are equal, and the other two are different (from these two and from each other), then \(E \geq 1 + 2 + 3 + 4 + 5 = 15 > 14\).
If two of the numbers are equal, and the other two are also equal, then:
- \(a = b\), \(c = d\) implies \(E \geq 2 + 3 + 4 + 5 = 14\),
- \(a = c\), \(b = d\) implies \(E \geq 1 + 3 + 4 + 6 = 14\),
- \(a = d\), \(b = c\) implies \(E \geq 1 + 2 + 5 + 6 = 14\).
Finally, if \(a, b, c, d\) are all different in pairs, then \(E \geq 1 + 2 + 3 + 4 + 5 + 6 > 14\).