A number lock has 9 different digits. A combination of three digits c an be set to open the lock. How many combinations are possible?
There are 9 possibilities each time, and 3 digits are chosen total. 9 possibilities, 3 times.
9 x 9 x 9 = 729. There are 729 different possibilities.
If repeats are allowed then there are: 9^3 =729 ways.
If repeats are not allowed, then there are: 9P3 =9 x 8 x 7 =504 ways.