5
$\begingroup$

Want to put together a secret code. The code consists of 2 different digits and 3 different English letters (26 options). How many different codes can be put together?

I tried to think of it this way: $$10*9*26*25*24=1,404,000$$

Because I first choose two digits and then three letters. The answer by the book is:

$$\binom{10}{2}\binom{26}{3}*5!=14,040,000 $$

I understand why they did it, but I do not know what I'm missing to get answer similar to their own.

Thank you very much.

$\endgroup$

4 Answers 4

7
$\begingroup$

Before you can put the code together, you need to choose which spaces are going to be numbers and which spaces are going to be letters. There are $5$ spaces altogether (since you are making a code from $5$ symbols) and there are $2$ spaces for numbers. Therefore, there are $5 \choose 2$ ways to pick which spaces will be where the numbers go and which spaces will be where the letters go. Thus, your answer should be:

$${5 \choose 2}*10*9*26*25*24=14,040,000$$

$\endgroup$
2
  • $\begingroup$ OP says the answer is the value above multiplied by 5! - Where does 5! come from? Thanks in advance. $\endgroup$
    – NoChance
    Mar 26, 2016 at 18:49
  • 2
    $\begingroup$ They multiplied by $5!$ because there are that many ways one can arrange the $5$ different symbols. However, they used $5!$ because at first, they used combinations, which completely disregards order, so they put all of their ordering into the $5!$. However, the OP's solution uses permutations like $_{10}P_{2}=10*9$ and $_{26}P_{3}=26*25*24$ which orders the numbers and letters by themselves so all we need to do is decide which spaces are numbers and letters, which we do with $5 \choose 2$. $\endgroup$ Mar 26, 2016 at 18:52
3
$\begingroup$

Algebraically, $$ \binom{10}{2}\binom{26}{3}5! = \frac{10!}{2!8!}\frac{26!}{23!3!} = \frac{10\times 9 \times 26 \times 25 \times 24 \times 5!}{2!3!} = 10\times 9 \times 26 \times 25 \times 24 \times 10 . $$ Te difference is that although you considered all the possible choices of letters and digits, you forgot to consider all the possible ways to arrange the chosen items, which is $5!$.

$\endgroup$
2
$\begingroup$

Hint. You counted the codes in which the digits come first, followed by the numbers.

$\endgroup$
1
$\begingroup$

Obviously something's fishy with the first slot, as it can't be 0. Let's split the solution into 2:

1) First slot is a letter. We have 26 options for the first slot, then choose two more for letters: $\binom{4}{2} \times 25 \times 24$, then multiply by $10 \times 9$.

2) First slot is a digit: We have 9 options for it, then we choose 4 slots for the second digit: $9 \times \binom{4}{1} \times 9$ and the rest are chars. The full solution is

$$ 26 \times \binom{4}{2} \times 25 \times 24 \times 10 \times 9 +9 \times \binom{4}{1} \times 9 \times 26 \times 25 \times 24 $$

$\endgroup$
2
  • $\begingroup$ Could you please justify the 5! appearing in the OP's proposed answer - Thanks. $\endgroup$
    – NoChance
    Mar 26, 2016 at 19:10
  • $\begingroup$ You have 2 different digits and 3 different letters, i.e. 5 different symbols that you can put in any order, hence $5!$ $\endgroup$
    – Alex
    Mar 26, 2016 at 19:11

You must log in to answer this question.

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