Total Permutations: From Letters ABCDEFGH so that E and D are not next to each other.

60 Views Asked by At

Here's my approach and wanted to verify if it's correct:

If $|U|$ is the number of total possible permutations and $|A^c|$ is the total permutations containing the strings DE and ED.

Then $|A|$ the to total permutations where E and D are not next to each other is:

$|A|= |U|-|A^c|$

Any feedback is appreciated.

1

There are 1 best solutions below

4
On BEST ANSWER

No; your solution assumes that $E$ and $D$ are within two spaces of each other. What if the string begins with $E$ and ends with $D$? Furthermore, when you're considering mutually exclusive cases, you add, rather than multiply, so you'd be looking at $6 \times 720$, not $720^6$.

Instead, I would suggest looking at the complement. What if $E$ and $D$ are next to each other? It might be in the form $ED$ or $DE$, but you can consider these two letters as an atomic unit that can be permuted into one of $7$ places.