Find the number of ways of arranging n people in a straight line, if two particular people must always be separated..?

1 Answer

Ways=2x((n2)!),where x=n2y=1y

Explanation:

Let's work a few examples with a growing value of n and see if we can find a pattern. Let's assign A and Z to the two people who must be separated.

When n=3, there are 2 ways we can sit the people - AXZ and ZXA. Ordinarily, we'd be able to sit 3 people in 3!=6 ways.

When n=4, we can sit A and Z in seats 1, 3; 1, 4; and 2, 4 - which is 6 different ways. The other two people can sit in 2! = 2 ways for each of the 6 ways we can seat A and Z, which is 6×2=12 ways. Ordinarily, we could seat four people 4!=24 ways.

When n=5, we can seat A and Z in seats 1, 3; 1, 4; 1, 5; 2, 4; 2, 5; 3, 5 - which is 12 different ways. The remaining three people can sit in 3!=6 different ways, giving 12×6=72 ways. Ordinarily, we'd seat 5 people in 5!=120 ways.

When n=6, we can seat A and Z in seats 1, 3; 1, 4; 1, 5; 1, 6; 2, 4; 2, 5; 2, 6; 3, 5; 3, 6; 4, 6 - which is 20 ways. The remaining four people can sit in 4!=24 different ways, giving 20×24=480 ways. Ordinarily, we'd seat 6 people in 6!=720 ways.

What can we find from the above?

  • We can express the ways to seat the people other than A and Z as (n2)!

  • We can express the ways to seat A and Z as 2x. It's the x that is the thing we need to express that is the problem.

When:
- n=3,x=1
- n=4,x=3
- n=5,x=6
- n=6,x=10.

And so we can express x as the sum of the natural numbers from 1 to (n2):

x=n2y=1y

And that is the expression we can use to answer our question:

Ways=2x((n2)!),where x=n2y=1y

Let's give this a quick test. For n=6, we have:

2x((62)!),x=n2y=1y=1+2+3+4=10

2(10)(4!)=20×24=480

For fun, let's try n=10:

2x((102)!),x=n2y=1y=1+2+3+4+5+6+7+8=36

2(36)(8!)=72×40320=2,903,040