Skip to content
SPM Tuition
Additional Mathematics · Permutations and combinations

Counting arrangements with restrictions

Plain arrangements are fine, but a condition like 'must sit together' breaks your method.

When an arrangement has a condition, handle the condition first. Either group items into a block, subtract the unwanted cases, or fill the restricted position before the rest.

This lesson follows deciding whether order matters in the permutations and combinations chapter.

How do I handle items that must be together?

Glue them into one block. Five students in a row, with Amir and Bee together, becomes four objects: the block and three others.

Arrange the four objects in 4! ways, then arrange Amir and Bee inside the block in 2! ways.

The total is 4! × 2! = 24 × 2 = 48.

And items that must not be together?

Use the complement. Five students in a row have 5! = 120 arrangements in all. Subtract the 48 where Amir and Bee are together: 120 − 48 = 72.

This avoids listing every separated case. It also checks itself: 48 + 72 must equal 120.

Worked example: forming even numbers

How many 4-digit even numbers can be formed from the digits 1, 2, 3, 4, 5 and 6 if no digit is repeated?

The restriction is on the last digit, so fill it first:

  1. The last digit must be 2, 4 or 6: 3 choices.
  2. The first digit can be any of the 5 digits remaining: 5 choices.
  3. The second digit has 4 choices left, and the third has 3.

The count is 3 × 5 × 4 × 3 = 180.

If you fill the first digit first, you must ask whether it used up an even digit, and the count splits into cases. Filling the last digit first avoids the split.

The mistake that costs marks

A common slip is to write 5! × 2! for the “together” question. The block is one object, so the other items plus the block number four, not five.

Step Wrong Right
Objects to arrange 5 (the two people plus three others) 4 (the block plus three others)
Inside the block 2! 2!
Total 5! × 2! = 240 4! × 2! = 48

A quick check: the “together” count can never be more than the total of 120, and 240 is.

Check yourself

Six people stand in a row. Two particular people, P and Q, must stand at the two ends. In how many ways can this be done?

Answer

Fill the ends first. P can be at the left end and Q at the right end, or the other way round: 2 ways.

The other four people fill the four middle places in 4! = 24 ways.

The total is 2 × 24 = 48.

What to study next

Continue with counting selections with required members, where the same thinking is used for groups with no order. Use the word-problem structure worksheet to separate conditions from the main task.

If conditions in counting questions are where you get stuck, see online one-to-one Additional Mathematics tuition.

Common questions

What is the block method?

When some items must be together, treat them as one block. Arrange the block with the other items, then multiply by the number of ways to arrange the items inside the block.

How do I count arrangements where two people are not together?

Find the total arrangements, then subtract the arrangements where they are together. This complement method is usually quicker than counting the separated cases directly.

Which position do I fill first in a number-forming question?

Fill the most restricted position first, such as the last digit of an even number. Filling it last can leave you counting the wrong number of remaining choices.

Do repeated letters change these methods?

They change the final division. If some items are identical, divide by the factorial of each repeated group, as covered in the over-counting lesson.

Restricted counting depends on which condition to handle first, and a teacher working one-to-one can see your order of thinking and suggest a cleaner one.

  • Online one-to-one lessons for your child with an experienced teacher.
  • Your first class is a one-hour trial, from RM50. The fee is agreed before you book.
  • Happy with the teacher? Continue with lessons of about 1.5 hours. If not, ask for another teacher.