1
$\begingroup$

If I have a string of 4 chars, composed by 2 alphabetic chars and 2 numeric chars

Expamples:
AD98
CB77
HG47
HH33

The possible alphatic chars are:
A B C D E F G H K L M N P Q R S T U V X Y Z

The possibile numeric chars are:
2 3 4 5 6 7 8 9

How many unique codes are possibile?

2 Answers 2

0

There are $22$ possible choices for the first character. Each of them can be followed by any of the $22$ letters, so there are $22\cdot22$ possible pairs of letters at the beginning of the code. Similarly, there are $8$ possible choices for each digit, so there are $8\cdot8$ possible ways to form the two-digit part of the code. Altogether, then, there are $22\cdot22\cdot8\cdot8=30~976$ possible codes.

The general rule is that when you have to make a string of $k$ choices, and you can make the first choice in any of $n_1$ ways, the second choice in any of $n_2$ ways, and so on, there are $n_1n_2\cdots n_k$ ways to make the whole string of choices. In this problem $n_1=n_2=22$ and $n_3=n_4=8$.

0

If you allow repetitions, then it's $22^2\times 8^2$, without $22\times 21\times 8 \times 7$.

  • 0
    Agreed. I just wasn’t sure whether you’d noticed.2012-10-04