Suppose if I have a lock, in which there are 8 different numbers. The numbers are allowed the repeat. I'm wondering how many possible combinations are there for the lock?
$\endgroup$
1 Answer
$\begingroup$
For each position you have 8 possibilities and you have 8 position so the answer is $8^8$.
If you have a lock with $n$ positions and $k$ possible numbers then the answer would be $k^n$.