I have encountered two problems that are almost identical. Consider this: $12$ basketballs numbered 1 through 12 are thrown at random into 20 boxes. I want to know the total number of possible outcomes (assume order matters). The answer is $20^{12}$. In the other problem (which I do not need to mention), follows the same pattern and the answer is also $n^k$, where $n$ is the number of slots and $k$ is the number of objects I have. I came up with the $n^k$ conclusion by myself.
I am just wondering, why is this the number of possible outcomes?
Here are my efforts to understand it:
I Googled the problem, but I got no results.
I wanted to confirm that this $n^k$ conclusion is true. I did a simpler example of 2 objects and 4 slots and the result was matching the $n^k$ form.
I tried to use the multiplication principle (the counting one). We can say this: first stage throw all balls each basketball gets into a different box. It is
Perms(20, 12)
. Well, there is no a second stage. If I want to "add" more ways, I need to use the counting principle again in another context. Let us say make two balls in each box... etc. It is just a crazy overhead counting.I tried to make an analogy with the problem of rolling two six-sided fair dice where the total outcomes of the pair they make is $6^6$. But it did not click with this basketball problem.
Notes:
You can throw more than one basketball (at random) into one box.
This problem was encountered in a "probability stuff" context. I was able to go through the numerator but not this one.