2
$\begingroup$

I have a matrix defined by $A_{ik} = R_{ik}log(\pi_{k})$ where $R$ is a matrix having the same dimensions as $A$ and $\pi$ is a vector of the same size as any row of $A$. I wish to find the elements of $\pi$ such that the sum of all the elements of $A$ is maximized, constrained by the fact that the elements of $\pi$ must sum to $1$ (i.e. $\pi$ is a probability vector).

I know the solution is

$$\pi_{k} = \frac{1}{N}\displaystyle\sum_{i} R_{ik}$$

where $N$ is the number of rows of $A$. But how do I prove this? Ideas?

1 Answers 1

0

You want to solve $$\max \{ \sum_k (\sum_{i} R_{ik}) \log(\pi_k) : \sum_k \pi_k = 1, \pi \geq 0\}$$ This is a convex optimization problem. The Lagrangian is: $$L(\pi,\lambda,\mu) = \sum_k (\sum_{i} R_{ik}) \log(\pi_k) - \lambda( \sum_k \pi_k - 1) + \mu^T\pi$$ The KKT optimality conditions (which are necessary and sufficient) are: $$\frac{\sum_{i} R_{ik}}{\pi_k}-\lambda+\mu_k=0$$ $$\sum_k \pi_k = 1$$ $$\mu^T\pi=0$$ $$\lambda\geq 0, \mu\geq 0, \pi\geq 0$$ Since $\pi_k \neq 0$, $\mu_k=0$. So: $$\frac{\sum_{i} R_{ik}}{\lambda} = \pi_k$$ Since $\sum_k \pi_k = 1$, $\lambda = \sum_{i,k} R_{ik}$. So, $$\pi_k = \frac{\sum_{i} R_{ik}}{\sum_{i,k} R_{ik}}$$