(a) The relative entropy measures the closeness of two probability distributions P and Q and is defined by
S(P∣∣Q)=∑Pilog(QiPi)=−SP−∑PilogQi,(15.30)
where SP=−∑PilogPi. Show that S(P∣∣Q)≥0 with equality if and only if Pi=Qi for all i.
(b) If i takes N values with probability Pi, then show that
S(P∣∣Q)=−SP+logN,(15.31)
where Qi=1/N for all i. Hence show that
SP≤logN,(15.32)
with equality if and only if Pi is uniformly distributed between all N outcomes.