at school we got task to calculate how many permutation we can get if we have 3 different letters {L, D, C}. Each time we get number of Ls, Ds, Cs that are in permutations. Question is how many permutation we can make if L and D can never be together ?
We have an example:
We have:
2 x L
3 x D
2 x C
So posible combinations are:
LLCDDDC
LLCDDCD
LLCDCDD
LLCCDDD
LCLCDDD
LCDDDCL
DDDCLLC
DDDCLCL
DDDCCLL
DDCLLCD
DDCDCLL
DCLLCDD
DCDDCLL
CLLCDDD
CDDDCLL
Result is 15
I know that you can get numer of permutation with repetitons:
total! / (r1! * r2! * r3! ...)
where total is total number of letters and r1... are repetitons of each letter
But how to get number of permutations where L and D are not togother anywhere in permutation ?