[Math] How Many License Numbers Consist of $4$ digits and $4$ letters, where one letter or digit is repeated

combinatorics

If license numbers consist of four letters and four numbers how many different licenses can be created having at least one letter or digit repeated?

$$26 \cdot 26 \cdot 26 \cdot 26 \cdot 10 \cdot 10 \cdot 10 \cdot 10 = 4569760000$$

Is this right?

Best Answer

Assuming the licences are of the form $\text{LLLLNNNN}$ where $\text{L}$ and $\text{N}$ denote letters and numbers respectively:

Number of licences with no letters or numbers repeated:

$26\cdot 25\cdot 24\cdot 23\cdot 10\cdot 9\cdot 8\cdot 7$.

So, number of licences with at least one letter or number repeated:

$\text{Total number of licences} - 26\cdot 25\cdot 24\cdot 23\cdot 10\cdot 9\cdot 8\cdot 7$.

Where the total number of licences is $26^4\cdot 10^4$ which is what you calculated.


Assuming the letters and numbers can appear in any order:

You can obtain this answer by multiplying the answer obtained above by $\dfrac{8!}{4!4!}$ which is the number of permutations of $8$ things in which $4$ objects are of one kind and $4$ objects are of the other kind. This is the same as the answer given by Omnitic.


Please note that as pointed out by Omnitic, the following does not restrict the number of letters and digits to $4$:

Assuming the numbers or letters can be filled in any order (and are not restricted to be $4$):

The licences have $8$ places which can be filled in with a number or a letter. Thus each place can have one of $26+10=36$ values.

Now, number of licences with no letters or numbers repeated: $36\cdot 35\cdot 34\cdot\cdot\cdot 30\cdot29$.

So, number of licences with at least one letter or number repeated:

$\text{Total number of licences} - 36\cdot 35\cdot 34\cdot\cdot\cdot 30\cdot29$

The total number is given by $36^8$.