# How many combinations for this door lock?

A door lock has 4 different numbers to choose from 1, 2, 3 and 4. To open the door one have to dial in a 6 digit code with the numbers mentioned. Repetitions are necessary and allowed.

How many possible combinations are there for this door lock?

For every digit you have $4$ possibilities, so the total is:
$$4\cdot4\cdot4\cdot4\cdot4\cdot 4=4^6$$
• I'm afraid your teacher is wrong. If you can use just the digits $\{1,2,3,4\}$ and you must to place then in $6$ spots then the answer is $4^6$. Are you not missing any information? – Arnaldo Mar 20 '17 at 13:34
• @AgnarHolst: Imagine a smaller question. You can use just the digits $\{1,2\}$ and the code has $3$ digits. The possibilities are $\{(1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1),(2,1,2),(2,2,1),(2,2,2)\}$. It means $2^3$ possibilities. – Arnaldo Mar 20 '17 at 13:39