How many permutations of $ABCDEFG$ that don't contain sequence $DEFG$ in any order?

1.4k Views Asked by At

I have to find the number of total permutations of $ABCDEFG$ that don't contain $DEFG$ together (in any order, like $DEFG$, $FGDE$, $GFED$, etc.) So far, I found the total number of permutations for the set $$ABCDEFG = 7! = 5040$$

and I figured I'd calculate the number of permutations for $$DEFG = 4! = 24$$

Then treat the subset $DEFG$ (let's call it $X$) as one element of the main set, resulting in $ABCX$ giving again $4! = 24$ permutations where $DEFG$ are together. So my result would be the number of total permutations $5040 - $(24*24)$ = 4464$ permutations.

Did I get the right answer or am I missing something? Anything you would've done differently?

2

There are 2 best solutions below

0
On BEST ANSWER

Your answer is completely correct and is the approach I thought of. There are other ways to approach the problem, but I like this one.

0
On

A bit different approach:

You have $7$ places for letters. Paint them white for $ABC$ places and black for $DEFG$ places. Total number of ways to paint the places is $\pmatrix{7 \\ 3} = 35$, for each painting there are $3! \times 4! = 144$ ways to put letters (as a self-check, $35*144 = 7!$). Your condition prohibits paintings where black places are together, easy to see there are $4$ of them. Thus, remaining $35-4 = 31$ paintings give you $31*144 = 4464$ permutations.