How many four-digit numbers can be formed with the numbers 1, 1, 1, 2, 2, 3, 3, 4 (it means you can use 1 for three times, 2 and 3 two times, and 4 just once)?
How does a generalization of that look like?
For instance, how many $k$-digit numbers can be formed with the set of numbers $\{a_1,...,a_n\}$, where the number $a_i$ can be repeated for $b_i$ times? Assume that $10 > a_i > 0$ and $b_i > 0$.