How to formally represent the optimal solution to this problem $\min {\sum_c {n_c^2}}\;s.t.\sum_c{n_c}=n$

36 Views Asked by At

The objective is $$\mathop {\min }\limits_{{n_c} \in N} \sum\limits_{c = 1}^C {n_c^2}\\ s.t.\sum\limits_{c = 1}^C {{n_c}} = n $$ where $N$ is non-negative integer.

I guess the optimal solution is $n_c=\frac{n}{C}$ for each $c$. However, it is possible $C$ is not divisible by $n$.

So, I have two problems:

  1. how to formally represent the optimal solution to this problem?
  2. how to prove the solution is optimal?
1

There are 1 best solutions below

2
On BEST ANSWER

Your intuition is correct. For the continuous problem, you can invoke properties of convex minimization problems or just show directly that any other feasible solution can be improved. Suppose $n_i \not= n_j$ for some $i,j$. Then show that $$n_i^2+n_j^2 > \left(\frac{n_i+n_j}{2}\right)^2 + \left(\frac{n_i+n_j}{2}\right)^2.$$

A similar argument applies to the integer case, for which every optimal solution satisfies $n_c\in\{\lfloor n/C\rfloor,\lceil n/C\rceil\}$ for all $c$. To determine the number $L$ of values that should be at their lower bounds, solve $$L \lfloor n/C\rfloor + (C-L)\lceil n/C\rceil = n$$ for $L$.