Calclute the probability? A random function $rand()$ return a integer between $1$ and $k$ with the probability $\frac{1}{k}$. After $n$ times we obtain a sequence $\{b_i\}_{i=1}^n$, where $1\leq b_i\leq k$.
Set $\mathbb{M}=\{b_1\}\cup\{b_2\}\cdots \cup\{b_n\}$.
I want to known the probability $\mathbb{M}\neq \{1, 2\cdots, k\}$.

Principle of inclusion and exclusion? That will do, I think, because probability that you didn't get $j$, $1\leq j \leq k $, $\quad$ is $\quad$ $( \frac{k-1}{k} )^n$ and so on ...
