[Math] Arrange ‘ARRANGED’ s.t. A and N aren’t next to each other

permutations

I was looking at a solution for a question regarding permutations at this thread Arranging letters with two letters not next to each other and I thought of another question.

In how many ways can the word ARRANGED be arranged if A and N aren't next to each other ?

Do I need to take into account that there are 2 As ? Since I would need to find

Number of ways to arrange – Number of ways to arrange such that A and N are next to each other.

This is currently what I have tried:

(1) Number of ways to arrange – $\frac{8!}{2!2!} = 10080 $

(2) Number of ways to arrange st. A and N are next to each other – $ 2*\frac{7!2!}{2!2!} = 5040 $

(3) Therefore, number of ways to arrange the st. A and N aren't next to each other = 5040.

I multiplied (2) by 2 to take into account that either As can be beside N. Would this be correct?

Best Answer

Use inclusion/exclusion principle:

  • Include the total number of arrangements: $\frac{8!}{2!2!}=10080$
  • Exclude the number of arrangements containing AN: $\frac{7!}{2!}=2520$
  • Exclude the number of arrangements containing NA: $\frac{7!}{2!}=2520$
  • Include the number of arrangements containing ANA: $\frac{6!}{2!}=360$

Hence the number of arrangements without A and N next to each other is:

$$10080-2520-2520+360=5400$$