# Combinatorics alphabet

If say I want to arrange the letters of the alphabet a,b,c,d,e,f such that e and f cannot be next to each other.

I would think the answer was $6\times4\times4\times3\times2$ as there are first 6 letters then 4 as e cannot be next to f.

Thanks.

-
What if the first letter is neither $f$ nor $e$? Then there would be $5$ choices for the second. – David Mitra Dec 26 '12 at 18:26

## 3 Answers

The $6$ numbers without any restriction can be arranged in $6!$ ways.

If we put $e,f$ together, we can arrange the $6$ numbers in $2!(5!)$ ways, as $e,f$ can arranged in $2!$ ways.

So, the required number of combinations is $6!-2(5!)$

-
$e,f$ can be together in two differ orders. – Thomas Andrews Dec 26 '12 at 18:28

Count all the ways e and f can be together. Subtract this from the total number of permutations.

-

You can, without loss of generality, choose to place $e$ first and then consider where to place $f$. However you will need to consider two cases, since if $e$ is at either end it only restricts one position and otherwise it restricts two.

The more direct way is to consider the number of ways to get what you don't want and then subtract it from the total. Of the 30 ways to arrange $e$ and $f$, 2 have distance 5, 4 have distance 4, 6 have distance 3, 8 have distance 2, and 10 have distance 1. So you should multiply the number of unrestricted arrangements by $\frac{20}{30}$ which should produce $\frac23 \cdot 6!$ which is $4 \cdot 5!$or 480.

-