# How many strings of length 12 can we compose using letters A, B, C, and D if every letter should appear at least once?

How many strings of length 12 can we compose using letters A,B,C, and D if every letter should appear at least once?

can someone walk me through this? I believe using the concept of the sieve formula is what i am supposed to use but I can't figure out where to start, my first thought is that 12! is the total number of permutations but then I know i have to take into account that each letter must be used once but I can't get any farther

EDIT: total number of strings with no restrictions is 4^12

please if someone can walk me through that would be great

-
No, as you take each character with replacement, the number of strings is $4^{12}$. At each point you have four choices. You are right that you then deduct the ones that have only three different letters, but then you deducted the ones in AB twice, as part of ABC and ABD. –  Ross Millikan Oct 29 '12 at 4:11