Aptitude Math Drill

Standing next to each other

Two particular people must, or must not, stand next to each other.

Practise this type

Target 50 s per question · Word problems

What this type asks

Two particular people must, or must not, stand next to each other. The single idea of treating them as one block solves most of these.

At a glance

AreaWord problems
Target time (practice yardstick)50 s per question
Options5 options; wrong ones come from common mistakes
LevelsEasy, medium, hard (bigger numbers and more steps)

Formula

  • adjacent = (n−1)! × 2
  • not adjacent = n! − (n−1)! × 2

How to solve it

Glue the two into a block, line up the n−1 items, and multiply by 2 for swapping inside the block. For "not adjacent", subtract from all arrangements.

Worked example

6 people including A and B stand in a line. In how many ways are A and B next to each other?

Answer: 240 ways

  1. Treat A and B as one block: 5! = 120 lines of 5 items, times 2 orders inside the block.
  2. Next to each other: 120 × 2 = 240

The usual mistake

Forgetting the factor 2 inside the block is the most common slip; an option equal to (n−1)! is the trap.

Saving time

Another route for "not adjacent": line up the others first and drop the two into the gaps. Getting the same number both ways settles it.

Four practice questions (easy, medium, medium, hard)

1. 6 people including A and B stand in a line. In how many ways are A and B next to each other?

  1. 480 ways
  2. 48 ways
  3. 120 ways
  4. 240 ways
  5. 300 ways
Show answer and solution

Answer: ④ 240 ways

  1. Treat A and B as one block: 5! = 120 lines of 5 items, times 2 orders inside the block.
  2. Next to each other: 120 × 2 = 240

2. 5 people including A and B stand in a line. In how many ways are A and B next to each other?

  1. 12 ways
  2. 53 ways
  3. 24 ways
  4. 48 ways
  5. 72 ways
Show answer and solution

Answer: ④ 48 ways

  1. Treat A and B as one block: 4! = 24 lines of 4 items, times 2 orders inside the block.
  2. Next to each other: 24 × 2 = 48

3. 6 people including A and B stand in a line. In how many ways are A and B next to each other?

  1. 48 ways
  2. 120 ways
  3. 480 ways
  4. 240 ways
  5. 288 ways
Show answer and solution

Answer: ④ 240 ways

  1. Treat A and B as one block: 5! = 120 lines of 5 items, times 2 orders inside the block.
  2. Next to each other: 120 × 2 = 240

4. 5 people including A and B stand in a line. In how many ways are A and B not next to each other?

  1. 120 ways
  2. 96 ways
  3. 72 ways
  4. 65 ways
  5. 48 ways
Show answer and solution

Answer: ③ 72 ways

  1. Treat A and B as one block: 4! = 24 lines of 4 items, times 2 orders inside the block.
  2. Next to each other: 24 × 2 = 48
  3. Not next to each other: all 5! − 48 = 120 − 48 = 72

The practice button makes new questions of this type every time.

Related types

Questions and answers are generated by code and checked twice. This is type practice, not a copy of any organisation's exam.