2
$\begingroup$

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

  • 3
    Possible duplicate of [How to count the number of k-ary sequences of length n that use all elements](https://math.stackexchange.com/questions/2845763/how-to-count-the-number-of-k-ary-sequences-of-length-n-that-use-all-elements)2018-07-11

4 Answers 4