Maximizing a function with constant sum of parameters

191 Views Asked by At

For integers $x_1,\cdots, x_n$, I want to maximize $F(x_1,\cdots, x_n)$ so that $\sum_i x_i \le K$ where $K$ is a positive integer. It is a very special case of Integer Programming. Is that easy to solve for any non-trivial class of functions? For instance when $F(\cdot)$ is linear or concave?

Edit

For linear $F(\cdot)$, I noticed that the answer would be to assign the whole $K$ to the $x_i$ with maximum weight.