Maximising Entropy Using Lagrange Multipliers

525 Views Asked by At

I am tackling a question I have made up myself. Essentially I have found the entropy of the example that I made, I have found the maximum entropy by plotting it as a graph however I am interested instead, in finding the maximum entropy by using Lagrange multipliers.

The entropy I have is:

$$H= (x+0.1) \log(\frac{1}{x+0.1})+ (0.9-2x) \log(\frac{1}{0.9 -2x}) + x \log(\frac{1}{x}) $$

However I would like to solve this problem instead with Lagrange multipliers.

I have the constraints: $\begin{align} z +2y + 3x & = 1.9 \\ z+y+x & = 1 \end{align}$

From here I have defined the Lagrangian function as: $$\mathcal{L}(p(x),\lambda_0, \lambda_1)= - \sum p(x) \log p(x) + \lambda_0(z+y+x-1)+\lambda_1(z +2y + 3x-1.9) $$

Thus I then need to take the partial derivative of the Lagrangian with respect to the variables however first I want to know if what I have written is correct?

From plotting the graph of the entropy, I realised that the maximum entropy should be at around $H=1.5741$, so I know what sort of number I need to work towards. I'm assuming this is a simple calculation? Any help in solving it would be greatly appreciated.

1

There are 1 best solutions below

0
On

The comments seem to indicate some confusion about the nature of the problem.

From what can be reconstructed from what you’ve written in the question, it seems a lot like you started out with a probability distribution comprising three probabilities $x$, $y$ and $z$, with entropy

$$ H(x,y,z)=-x\log x-y\log y-z\log z\;, $$

and two linear constraints on $x$, $y$ and $z$, and then you used those linear constraints to express $y$ and $z$ as linear functions of $x$ and substituted them into $H(x,y,z)$ to obtain the entropy as a function of $x$, which you can then minimize as a univariate function without worrying about the constraints. If I understand correctly, you now want to rederive the same result via different route, by including the constraints in the objective function with Lagrange multipliers.

This is a valid approach, and in cases where you can’t solve the constraints explicitly it may be the only viable approach. Your Lagrangian function is correct, except for the ambiguity due to your reuse of the variable name $x$ for a dummy summation variable. Note also that you don’t need to include the constants $1$ and $1.9$ in the Lagrangian function, since they drop out upon differentiation anyway.