1
$\begingroup$

For a 6-digit alphanumeric password to be constructed from numbers and uppercase letters, what logic to use and how to calculate the following?

  • Number of passwords with exactly 2 numbers

  • Number of passwords with at least 2 numbers

I am struggling with Combinatorics but have managed to understand the case with "at least one number" scenario by looking at another MathExchange post, but am totally unable to proceed with this. Other post (link below) doesn't answer it well either. Please help me with the logic and steps required so that I can have a basic working idea that I can use for similar cases (like at least/exactly 3 digits etc.). Thanks.

Reference 1 Reference 2

$\endgroup$
1
  • $\begingroup$ In case with at least one number, it's simple to understand as we take the total number of passwords possible and then subtract the number of passwords with only alphabets in them. But this one is totally different and I am unable to get any intuition. $\endgroup$
    – Thokchom
    Nov 9, 2019 at 8:48

1 Answer 1

3
$\begingroup$

There are $\binom62$ choices for the spots of the $2$ numbers.

Further the $2$ numbers take care of $10^2$ possibilities and the $4$ letters of $26^4$ possibilities .

So we find:$$\binom6210^226^4$$passwords with exactly $2$ numbers.

Based on the same principle we find:$$\sum_{k=2}^6\binom6k10^k26^{6-k}$$passwords with at least $2$ numbers.

$\endgroup$
1
  • $\begingroup$ Thanks sir. I am kinda able to understand it now, and once I finish inclusion-exclusion, I will be able to understand your formula completely. $\endgroup$
    – Thokchom
    Nov 9, 2019 at 11:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .