If I have $r$ items and I am making $n$ distinct choices with replacement, then there are $r^{n}$ possible selections. However, how could I count with the added constraint that each of the $r$ items must be selected at least once?
This problem implies that I want to count all $r^n$ possibilities, but I want to exclude cases where any of the $r$ items were selected zero times. That is, if I have items $(r_1,r_2,r_3)$ and choices $(n_1,n_2,n_3,n_4,n_5)$, the following would be a VALID selection because each $i$ was chosen at least once: $\{r_1:\{n_1,n_2,n_3\}, r_2:\{n_4\}, r_3:\{n_5\}\}$. However, the following would be INVALID to include: $\{r_1:\{n_1,n_2,n_3\}, r_2:\{n_4,n_5\}, r_3:\{\}\}$ because $r_3$ was not chosen.
I'd like to use this as a step in a derivation for another question.