How Can Lagrange Multipliers Determine Maximum Shannon Entropy?

Click For Summary
The discussion focuses on using Lagrange multipliers to determine maximum Shannon entropy under the constraint that the sum of probabilities equals one. The Lagrangian is set up as L(x, λ) = -∑ p(x) log₂ p(x) - λ(∑ p(x) - 1). The participant is unsure about taking partial derivatives with respect to p(x) and λ, particularly regarding the summation signs. It is clarified that the partial derivatives should yield the constraint functions and that using an index for the sample space can simplify the equations. The resulting system of equations involves d+1 equations for d+1 variables, allowing for the determination of maximum entropy.
Irishdoug
Messages
102
Reaction score
16
Homework Statement
Given a random variable X with d possible outcomes and distribution p(x),prove that the Shannon entropy is maximised for the uniform distribution where all outcomes are equally likely p(x) =1/d
Relevant Equations
## H(X) = - \sum_{x}^{} p(x)log_{2}p(x) ##

##log_{2}## is used as the course is a Quantum Information one.
I have used the Lagrange multiplier way of answering. So I have set up the equation with the constraint that ## \sum_{x}^{} p(x) = 1##

So I have:

##L(x,\lambda) = - \sum_{x}^{} p(x)log_{2}p(x) - \lambda(\sum_{x}^{} p(x) - 1) = 0##

I am now supposed to take the partial derivatives with respect to p(x) and ##\lambda##, however the derivatives with respect to ##\lambda## will give 0 I believe as we have to constants, 1 and -1.

So ##\frac{\partial (- \sum_{x}^{} p(x)log_{2}p(x) - \lambda(\sum_{x}^{} p(x) - 1)) }{\partial p(x)} = -(log_{2}p(x) + \frac{1}{ln_{2}}+\lambda) = 0##

I am unsure what to do with the summation signs, and I am also unsure how to proceed from here. Can I please have some help.
 
Physics news on Phys.org
The partials with respect to ##\lambda## should recover your constraint functions since the ##\lambda## dependent terms in your Lagrangian are only ##\lambda## times your constraint functions. Also consider using an index:

Sample space is ##\{ x_1, x_2, \cdots x_d\}## and ##p_k = p(x_k)##

L(p_k, \lambda) = -\sum_{k} p_k \log_2(p_k) - \lambda C(p_k)
with ##C## your constraint function ##C(p_k) = p_1+p_2+\ldots +p_d - 1## and normalized probabilities equate to ##C=0##.

\frac{\partial}{\partial p_k} L =\frac{1}{\ln(2)} -\log_2(p_k) -\lambda \doteq 0
\frac{\partial}{\partial \lambda} L = C(p_k) \doteq 0
(using ##\doteq## to indicate application of a constraint rather than an a priori identity.)
This is your ##d+1## equation on your ##d+1## free variables ##(p_1, p_2, \ldots ,p_d, \lambda)##.
 
I want to find the solution to the integral ##\theta = \int_0^{\theta}\frac{du}{\sqrt{(c-u^2 +2u^3)}}## I can see that ##\frac{d^2u}{d\theta^2} = A +Bu+Cu^2## is a Weierstrass elliptic function, which can be generated from ##\Large(\normalsize\frac{du}{d\theta}\Large)\normalsize^2 = c-u^2 +2u^3## (A = 0, B=-1, C=3) So does this make my integral an elliptic integral? I haven't been able to find a table of integrals anywhere which contains an integral of this form so I'm a bit stuck. TerryW

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
12
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
10
Views
2K