Counting codes with 1-2 identical letters and 1-4 identical digits

3 replies · 3K views · last reply
22990atinesh
Messages
143
Reaction score
1

Homework Statement


A code consists of at-most two identical letters followed by at-most four identical digits. The code must have atleast one letter and one digit. How many distinct codes can be generated using letters A-Z and digits 1-9.

Homework Equations

The Attempt at a Solution



//One letter followed by one or more digits
##26 \times 10 + 26 \times 10 \times 10 + 26 \times 10 \times 10 \times 10 + 26 \times 10 \times 10 \times 10 \times 10 + ##

//two letters followed by one or more digits
##26 \times 26 \times 10 + 26 \times 26 \times 10 \times 10 + 26 \times 26 \times 10 \times 10 \times 10 + 26 \times 26 \times 10 \times 10 \times 10 \times 10##

But the ans is too big it doesn't matches with the result. What can be correct answer
 
Your question says identical letters and digits.
So the variables in question are:
Choice of letter (26)
Number of identical letters (2)
Choice of digit (9)
Number of identical digits (4).

Doing it this way, I get an answer that is less that 2000. What are you comparing against?
 
Two letter cases are still just 26 x 10 ... not 26 x 26 x 10 ... , since the two letters are identical.
 
22990atinesh said:
using letters A-Z and digits 1-9.
There are only 9 digits to choose from.