Solution
= Solution
For the uniform distribution, the code in part c has
$$
\mathbb E[L(X)]=\frac1m\sum_{i=1}^m\lfloor\log_2i\rfloor<\log_2m=H(X),
$$
because every summand is at most $\log_2m$ and at least one is strictly smaller. For $m=3$, the explicit code $C(1)=\lambda$, $C(2)=0$, $C(3)=1$ has mean length $2/3<\log_2 3$.