Passcode

JHY

New member
Joined
Aug 22, 2018
Messages
22
" A passcode that contains five digits and letters is to be formed. How many different passcodes can be formed from the digits 1,2,3,4 and letters V, W, X, Y, Z if the code must have at least 1 digit ?"

I assume that letters or digits and be repeated since it is not stated in the question. What I have tried is :
All possibilities - only letters are used
= 9^5 - 5^5
= 55924
Am I correct ?

What about this solution :
4C1 x 5C4 + 4C2 x 5C3 + 4C3 x 5C2 + 4C4 x 5C1 = 125
Is it correct ?

What is the correct answer ?
 
All possibilities - only letters are used
= 9^5 - 5^5
= 55924
Am I correct ? Yes, your answer of 55924 is correct.

What is the correct answer ? Helpers do not give answers on this forum.
Please see red comments above.
What do you think the correct answer is? Why?
 
Please see red comments above.
What do you think the correct answer is? Why?
Thank you very much for replying !
I also think that the correct answer is 55924 because for a passcode different ways of arrangement should be taken into account.
 
" A passcode that contains five digits and letters is to be formed. How many different passcodes can be formed from the digits 1,2,3,4 and letters V, W, X, Y, Z if the code must have at least 1 digit ?"

What about this solution :
4C1 x 5C4 + 4C2 x 5C3 + 4C3 x 5C2 + 4C4 x 5C1 = 125
Is it correct ?

What is the correct answer ?
First, write out what you are thinking: Why do you want to add those particular products?

Then, think about whether what that counts is what you want to count. In particular, what is the effect of using combinations?

Finally, think about how you might modify it to correct the deficiency you find.

(Clearly your first method is more efficient, but learning to use more complicated method is worth the effort, for problems where they might be needed -- and also as a check.)
Thank you very much for replying !
I also think that the correct answer is 55924 because for a passcode different ways of arrangement should be taken into account.
This suggests the correction you need to make.
 
" A passcode that contains five digits and letters is to be formed. How many different passcodes can be formed from the digits 1,2,3,4 and letters V, W, X, Y, Z if the code must have at least 1 digit ?"
What about this solution :
4C1 x 5C4 + 4C2 x 5C3 + 4C3 x 5C2 + 4C4 x 5C1 = 125
Is it correct ?
125 is not that large of a number. So try writing out the 125 different passcodes.
There are a few possibilities that might happen:
1) Along the way you might realize that 125 is clearly not large enough, or too large or that 125 is correct
2) After writing out all 125 you might realize that the correct answer is exactly 125 or larger than 125.
 
First, write out what you are thinking: Why do you want to add those particular products?

Then, think about whether what that counts is what you want to count. In particular, what is the effect of using combinations?

Finally, think about how you might modify it to correct the deficiency you find.

(Clearly your first method is more efficient, but learning to use more complicated method is worth the effort, for problems where they might be needed -- and also as a check.)

This suggests the correction you need to make.
I just worked out the second method fully, and realized it's more different from your second attempt than I implied. In addition to not taking order into account, you also forgot that duplicates of letters or numbers are allowed.

So if you use a sum, you need to sum over the number of digits used, from 1 to 5 (5 terms, not 4). This sum will be equivalent to the binomial expansion of your first method, which is of course far simpler.
 
Dr.Peterson,

do you agree with my answer?

\(\displaystyle 5 \times 4 \times 9^4 = 131220\)
 
First, let us agree with that the passcode is *****.

Then, we have 9 combinations (4 numbers and 5 letters). If we have the freedom to make any 5-passcode with these combinations, there are 9x9x9x9x9 different 5-passcodes.

Unfortunately, we have a restriction that at least 1 of the 5 is a number.

If the first digit is a number, we don't care about the rest, 4x9x9x9x9.

If the second digit is number, we don't care about the rest, 9x4x9x9x9.

Third, 9x9x4x9x9.

Fourth, 9x9x9x4x9.

Fifth, 9x9x9x9x4.

Final answer: 4x9x9x9x9 OR 9x4x9x9x9 OR 9x9x4x9x9 OR 9x9x9x4x9 OR 9x9x9x9x4 = 5x4x9x9x9x9
 
Final answer: 4x9x9x9x9 OR 9x4x9x9x9 OR 9x9x4x9x9 OR 9x9x9x4x9 OR 9x9x9x9x4 = 5x4x9x9x9x9
Perhaps ... if that actually meant anything.

We apply the OR operator not to numbers, but to events. And the number of ways to do A OR B is only the sum of the ways to make A and the ways to make B if A and B are mutually exclusive. That is not true of the five cases you are listing.

That is, you are over-counting, because if, say, the first and second digits are both digits, then it is counted as part of both your first and second terms.

As a less important comment:
First, let us agree with that the passcode is *****.

Then, we have 9 combinations (4 numbers and 5 letters). If we have the freedom to make any 5-passcode with these combinations, there are 9x9x9x9x9 different 5-passcodes.
I'm not sure what "*****" means; presumably you mean "a sequence of five symbols with repetition allowed". But you are using the word "combination" in a very misleading way that I would avoid. There are not 9 combinations; rather, there are 9 symbols to be used to make a sequence.
 
If you want to do it this way, then you should be saying that the 1st (and possibly last) number is in the 1st position OR the 1st number is in the 2nd position OR ....
Otherwise, as pointed out by Dr Peterson, you are double counting!
 
Perhaps ... if that actually meant anything.

We apply the OR operator not to numbers, but to events. And the number of ways to do A OR B is only the sum of the ways to make A and the ways to make B if A and B are mutually exclusive. That is not true of the five cases you are listing.

That is, you are over-counting, because if, say, the first and second digits are both digits, then it is counted as part of both your first and second terms.

As a less important comment:

I'm not sure what "*****" means; presumably you mean "a sequence of five symbols with repetition allowed". But you are using the word "combination" in a very misleading way that I would avoid. There are not 9 combinations; rather, there are 9 symbols to be used to make a sequence.
You are right Dr.Peterson. My interpretation to the the problem was completely wrong.


If you want to do it this way, then you should be saying that the 1st (and possibly last) number is in the 1st position OR the 1st number is in the 2nd position OR ....
Otherwise, as pointed out by Dr Peterson, you are double counting!
I was over-thinking.


I have just realized that the OP got the correct answer in a beautiful smart way. The answer also reminded me by the idea of elimination. It is very useful in problems such this one.
 
I'll now show a valid method that is probably what the OP was trying for in the second attempt.

Since you need at least one digit, there is either 1 digit and 4 letters, or 2 and 3, or 3 and 2, or 4 and 1, or 5 and 0.

However many digits there are, say [imath]d[/imath], there are [imath]{5\choose d}[/imath] ways to choose where they go, and [imath]4^d[/imath] ways to place the digits in those [imath]d[/imath] places, and [imath]5^{5-d}[/imath] ways to place the letters in the remaining [imath]5-d[/imath] places. Thus, the total is

[math]{5\choose1}4^15^4+{5\choose2}4^25^3+{5\choose3}4^35^2+{5\choose4}4^45^1+{5\choose5}4^55^0=12500+20000+16000+6400+1024=55924[/math]
As I said, this is just the binomial expansion of [imath](4+5)^5-5^5[/imath].
 
I admit that this is a genius way to think and solve the problem. I have always thought the binomial expansion is \(\displaystyle (a + b)^n\).

is it also called binomial expansion when we subtract from the expansion? Like this:

\(\displaystyle (a + b)^n - c^n\)
 
I admit that this is a genius way to think and solve the problem. I have always thought the binomial expansion is \(\displaystyle (a + b)^n\).

is it also called binomial expansion when we subtract from the expansion? Like this:

\(\displaystyle (a + b)^n - c^n\)
I said, "the binomial expansion of \(\displaystyle (a + b)^n - c^n\)". Expand the part of that expression that is a binomial power, namely \(\displaystyle (a + b)^n\), and you get what I showed. Isn't that the obvious meaning of what I said? Doing something more with the result doesn't make it not an expansion, does it?

What you are saying, literally, is that \(\displaystyle (a + b)^n\), in unexpanded form, is an expansion, which makes no sense, so I presume that isn't what you mean.
 
I said, "the binomial expansion of \(\displaystyle (a + b)^n - c^n\)". Expand the part of that expression that is a binomial power, namely \(\displaystyle (a + b)^n\), and you get what I showed. Isn't that the obvious meaning of what I said? Doing something more with the result doesn't make it not an expansion, does it?

What you are saying, literally, is that \(\displaystyle (a + b)^n\), in unexpanded form, is an expansion, which makes no sense, so I presume that isn't what you mean.
I am sorry Dr.Peterson. I meant the binomial expansion is used to expand \(\displaystyle (a + b)^n\).

And you are right about the binomial expansion of \(\displaystyle (a + b)^n - c^n\) should be directly understood to expand the unexpanded term which is \(\displaystyle (a + b)^n\).
 
Top