I am learning permutations with repetitions, and working with the formula that $P(n,k)=n^k$. I understand the logic that with repetitions, we multiply $n$ by itself $k$ times. But in different problems, I find myself multiplying $k$ by itself $n$ times - getting the result $k^n$. So obviously I guess I'm not getting it.
Is there a simply rule to determine which set is the $n$ and which one is the $k$?
For example, the number of possibilities to divide $k$ objects into $n$ cells is $n^k$, because each object has $n$ choices. But how do I know not to turn it around, because my intuition here is actually that every cell has $k$ options, which is incorrect.
This is especially confusing because I had another exercise - "how many ways are there to put $0$ and $1$ in a row of $4$ places" - in this case, the "cells" were the $k$ and the "objects to choose from" were the $n$.
Thanks!
You can rule out the misguiding intuition by logic. For that intuition to work, it must have been the case, that the first cell can be filled in $(k+1)$ ways. (TRUE) For each such way, the second cell can also be filled in $(k+1)$ ways. Oops, that does not sound right any more does it? If the first cell has all the $k$ goods, how can the 2nd have $k$ goods too? So, you are only left with the right way to think about the problem.
For simplicity you can also use very basic examples to clear out the formula. Start by thinking of the easier counter part. "how many ways are there to put $0$ and $1$ in a row of $4$ places?" Now what is $n, k$ here? Start by thinking of the simpler question, "how many ways are there to put 0 and 1 in a row of 1 place?", the answer has to be $ 2=2^1\neq 1^2$. So, $n=2, k=1$ are identified through the simpler counterpart. For how many ways are there to put 0 and 1 in a row of 4 places, it has to be $n=2, k=4$.