Can we find a minimizer of $\sum_{i=1}^ka_iw_i$ satisfying $\sum_{i=1}^kw_i=1$?

70 Views Asked by At

I've got a quite simple problem: Given $k\in\mathbb N$ and $a_1,\ldots,a_k\ge0$, I want to find $w_1,\ldots,w_k\ge0$ with $\sum_{i=1}^kw_i=1$ minimizing $\sum_{i=1}^ka_iw_i$.

Are we able to solve this? I'm not necessarily searching for a unique minimizer, but at least to find any one (if necessarily, numerically).

2

There are 2 best solutions below

4
On BEST ANSWER

Think of $w_i$ as weights of different materials and $a_i$ as their costs per unit weight. You want to buy $1$ unit of total weight at least possible cost. Put in those terms, the solution is obvious: go for the cheapest material, i.e. take $w_j = 1$ where $a_j$ is the least of $a_1, \ldots, a_k$, and $w_i = 0$ otherwise.

0
On

One possible way of approaching this problem is to define $w_i$ in terms of $k$-dimensional spherical coordinates

$$w_1=\cos^2(\theta_1)$$

$$w_2=(\sin(\theta_1)\cos(\theta_2))^2$$

$$w_3=(\sin(\theta_1)\sin(\theta_2)\cos(\theta_3)^2$$

$$\vdots$$

$$w_{k-1}=(\sin(\theta_1)\cdots\sin(\theta_{k-2})\cos(\theta_{k-1}))^2$$

$$w_k=(\sin(\theta_1)\cdots\sin(\theta_{k-2})\sin(\theta_{k-1}))^2$$

By definition, these $k-1$ variables encompass all numbers $w_i\geq 0$ and $\sum_{i=1}^k w_i=1$ except $\theta_i\in\mathbb{R}$. Thus, your problem becomes finding the minimum of a system of $k-1$ variables over the real numbers. Of course, this is not an easy problem in general, but is a much better studied problem that should already have a myriad of methods available for use.


EDIT: Totally forgot about the conditions on $a_i\geq 0$. With this, it is obvious to take $w_j=1$ for minimum min$(a_1,a_2,\dots,a_k)=a_j$. However, without this condition the above analysis still stands and might be useful for someone in the future so I will leave it up.