Solution (source code)

= Solution

The source is Bernoulli when the $X_n$ are independent and identically distributed with a common law $p$ on the finite alphabet.