For all $i \in \{1,2,\ldots,m\},$ with $m\geq 2$ we are given $S_i,f_i >0,$ Find $$0\leq p_i \leq 1,$$ and a mapping $g(\cdot)$ that maps each $S_i$ to $g(S_i)=S_j\geq S_i$, such that $$N=\sum_{i=1}^{m}(g(S_i)-S_i)p_i$$ is maximized. The constraints are $$\sum_{i=1}^m f_i=1,$$ $$\sum_{i=1}^m \tilde{f}_i \log\frac{\tilde{f}_i}{{f}_i}\leq \alpha$$ where $\tilde{f}_i=f_i (1-p_i)+\sum_{S_j\in g^{-1}(S_i)}p_j f_j$, $\alpha>0$, and $g^{-1}(\cdot)$ is the inverse mapping of $g(\cdot)$.
I can add another constraint to get rid of the inequality in the second constraint. Then, I would:
1) Fix $g(\cdot)$, use the Lagrange multiplier and find optimal values for $p_i$s in terms of $g(\cdot)$.
2) Then, optimize over $g(\cdot)$.
Are there any other easier methods?