My question is fairly simple, but I'm confused on how to solve it.
We are given a set $S = \{x_1, x_2, x_3 \ldots, x_m\}$. We need to construct a message (or vector) of length $n$ using the elements from the set $S$. Also, you can repeat values.
How many possible messages (or vectors) of length $n$ can be constructed using elements from set $S$, given that the number of times $x_i$ occurs is $n_i$ (or probability of occurrence of $x_i$ is $p_i = \frac{n_i}{n}$).
I would really appreciate any comments.