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
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
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?
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.