-4
$\begingroup$

How can i calculate the number of possible PIN codes that use only numbers 0-9 and have length are there? No rules,all numbers can be same or different

$\endgroup$

closed as off-topic by TheGeekGreek, Namaste, Daniel W. Farlow, user296113, Shailesh Aug 3 '17 at 0:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – TheGeekGreek, Namaste, Daniel W. Farlow, user296113, Shailesh
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ What have have you tried so far? $\endgroup$ – platty Aug 2 '17 at 20:42
  • $\begingroup$ Hint: how many digits are there, and how do we count the ways a task can be done? $\endgroup$ – Sean Roberson Aug 2 '17 at 20:43
  • 1
    $\begingroup$ Both of those are wrong. I have no idea where either of your answers came from. $\endgroup$ – lulu Aug 2 '17 at 20:45
  • 1
    $\begingroup$ No, it isn't. first do it for length one though. $\endgroup$ – lulu Aug 2 '17 at 20:47
  • 1
    $\begingroup$ give an example of a PIN code of length one $\endgroup$ – Yanko Aug 2 '17 at 20:48
3
$\begingroup$

The key is the multiplication principle: If a task can be done in $m$ ways and another in $n$ ways, the number of ways we can do both is $mn$.

The idea is that you're choosing a digit from $0$ to $9$ and constructing a six digit PIN. We can start with the case of one digit, then two, then I'll leave it to you to extend to six.

There are only ten one-digit PINs: $0, 1, 2, 3, 4, 5, 6, 7, 8, 9$. Ten digits.

What about two? We could list them out, but let's be smart: this is the same as the concatenation of two one-digit PINs. We have ten choices for the first digit and ten for the second. How many total two-digit PINs are there? By the multiplication prinicple, this is $10 \cdot 10 = 100$. There are a hundred possible 2-digit PINs.

Can you take it from here?

$\endgroup$
  • $\begingroup$ 10 to the power of 6? $\endgroup$ – Murad Aug 2 '17 at 20:50
  • $\begingroup$ Well done. That's exactly it. $\endgroup$ – Sean Roberson Aug 2 '17 at 20:50
  • 1
    $\begingroup$ wow i'm a genius $\endgroup$ – Murad Aug 2 '17 at 20:51
  • 1
    $\begingroup$ @Murad you are the most brilliant person I have ever met. $\endgroup$ – Yanko Aug 2 '17 at 20:51
  • $\begingroup$ @yanko My math teacher tells me the same thing $\endgroup$ – Murad Aug 2 '17 at 20:52
6
$\begingroup$

Here is another way to see this

every Pin code of lenth 6 defines a number from 0 to 999,999, that is in total one million numbers.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.