Permutation or Combination help

99 Views Asked by At

Am I wrong in using 6! -1 For this problem: An iPhone password is a 6-digit number. How many different possible passwords are there if each number can only be used once, and 0 cannot be in the first digit? What is the correct way to solve this problem?

3

There are 3 best solutions below

0
On

Approach using the rule of product. This should have been learned before you ever even heard the phrases permutation or combination and is one of the tools used in deriving the formulas for those.

Paraphrased, the rule of product says that if you want to count how many outcomes a scenario has and if you can uniquely describe each outcome via a sequence of steps such that the number of available options available at each step doesn't change based on earlier choices (though the specific options available may change) then the total number of outcomes is the product of the number of options available at each step.

Your steps here are:

  • Pick the number used for the first digit. (It can be any of $1,2,3,4,5,6,7,8,9$ for a total of $9$ options, noting that zero wasn't allowed as the first choice).
  • Pick the number used for the second digit. (It can be $0$ or any of the choices available last time except for whatever was picked for the first digit for a total of $9$ choices)
  • Pick the number used for the third digit. (It can be any of the digits except for what was picked in either of the first two steps)
  • $\vdots$
  • Pick the number used for the sixth digit.

Multiply the number of options available for each step to get the final total.

2
On

You have 9 ways to fill first password gap(1 to 9), then for the second password gap you have 9 ways again(0 to 8) and for filling the third password gap, you have 7 ways and so. Result is: 9*9*8*7*6*5 = 136080

0
On

We have six choices to make. Going from left to right there are $9$ choices for the first digit since we are excluding $0$. However, for the next digit we can choose a $0$ and so once again there are $9$ choices. This is where the factorial comes in since repetition is not allowed. So there are $8$ choices, then $7$, then $6$, and finally $5$ for the last digit. This means there are $9*9*8*7*6*5= 136080$ such passwords.