For the following question:
The barcode strings of a new product are created from four letters A, B, C, D and ten digits 0, 1, 2, ..., 9. No three letters may be written consecutively in a barcode string. There is no restriction on the order in which the numbers are written. Find the number of barcode strings that can be created.
The correct answer is $7.66 \cdot 10^{10}$, which I can achieve by subtracting the number of barcodes with three or four consecutive letters from the total number of barcodes.
However, I found another approach which yields a slightly different answer (which I suspect is wrong, but I can't explain why):
By calculating:
$10! \cdot 11 \cdot 10 \cdot 9 \cdot 8$ (number of barcodes with four separated letters),
$+ 10! \cdot \binom{4}{2} \cdot 2 \cdot 11 \cdot 10 \cdot 9$ (number of barcodes with two letters grouped together and the other two separated)
$+ 10! \cdot \binom{4}{2} \cdot 2 \cdot 2 \cdot 11 \cdot 10$ (number of barcodes with two pairs of letters)
I get $8.14 \cdot 10^{10}$ which suggests that I've counted some possibilities several times. Where did I make a mistake?
The answer should be -
$10! \cdot {11 \choose 4} \cdot4! + 10! \cdot 2 \cdot {4 \choose 2} \cdot {11 \choose 3} \cdot 3!+ 10! \cdot {4 \choose 2} \cdot {11 \choose 2} \cdot 2! \cdot 2!$
First term - all four alphabets are separate.
Second term - three groups of alphabets separated from each other (one group has two alphabets together)
Third term - two groups of alphabets separated from each other (each group has two alphabets together)
It is the last term where you have a mistake. we first make two ordered groups of alphabets by ${4 \choose 2}$. We then choose $2$ places for two groups out of $11$ places. We then permute both pairs within ($2! \cdot 2!$). Like other terms, we permute digits by $10! \ $.