Originally Posted by

**CaptainBlack** There is no variable of summation, it cannot be $\displaystyle n$ or $\displaystyle s$ as they appear on the right as well as under the summation sign. You need to look at the meanings of the symbols not the formula to see why this is true.

You are interested in messages of length $\displaystyle n$ in an alphabet with $\displaystyle s$ symbols, there are $\displaystyle s^n$ such messages.

Then as by assumption each message is equally likely:

$\displaystyle p_i=\frac{1}{s^n},\ i=1...s^n$

So the entropy becomes:

$\displaystyle H=-\sum_{i=1}^{s^n} \frac{1}{s^n} \log\left(\frac{1}{s^n}\right)=\sum_{i=1}^{s^n} \frac{1}{s^n} \log\left({s^n}\right)=s_n\left(\frac{1}{s^n} \log({s^n} )\right)$

.... $\displaystyle = \log(s^n)$

CB