Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

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

share|improve this answer
add comment

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

share|improve this answer
    
Repetitions are clearly allowed, given the examples. –  Brian M. Scott Oct 4 '12 at 7:55
    
True, but leaving it doesn't hurt... –  draks ... Oct 4 '12 at 8:01
    
Agreed. I just wasn’t sure whether you’d noticed. –  Brian M. Scott Oct 4 '12 at 8:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.