Arrangements with restrictions

有限制条件的排列

How do you count arrangements with restrictions?

Bind neighbours into one block; place the others first and insert into the gaps for non-adjacent; fill special positions first.

SkillKP000802

Sign in to read the whole lesson, with 1 interactive aid, 11 exercises

Sign in / Sign up

Mastery goals

  • Can count arrangements with elements required to be adjacent (bundling), non-adjacent (gap insertion) or in fixed positions
  • Can use complements for restrictions such as 'not first'

Example 4

How many three-digit numbers with no repeated digits can be formed from the 10 digits 0–9?

Analysis: Of the 10 digits 0–9, 0 cannot be in the hundreds place, while the other 9 digits can be in any place, so 0 is a special element. In general, we can start by thinking about where the special element can go.

Solution 1: As in Figure 6.2-5, since the hundreds digit of a three-digit number cannot be 0, the task can be done in two steps. Step 1: decide the hundreds digit; take 1 of the 9 digits 1–9: ways. Step 2: decide the tens and units digits; take 2 of the remaining 9 digits: ways. By the multiplication principle, the number of such three-digit numbers is

hundredstensunitsA₉¹ waysA₉² ways
Figure 6.2-5 The hundreds digit can be taken in ways, and the tens and units digits in ways.

Solution 2: As in Figure 6.2-6, the three-digit numbers we want fall into three classes. Class 1: numbers in which no digit is 0; take 3 of the 9 digits 1–9: ways. Class 2: numbers whose units digit is 0; take 2 of the remaining 9 digits for the hundreds and tens places: ways. Class 3: numbers whose tens digit is 0; take 2 of the remaining 9 digits for the hundreds and units places: ways.

By the addition principle, the number of such three-digit numbers is

Solution 3: The number of permutations of 3 digits chosen from the 10 digits 0–9 is , and among them the number with 0 in the hundreds place is . The difference is the number of three-digit numbers with no repeated digits that can be formed from these 10 digits, so the number we want is

A counting problem like Example 4 can be solved in different ways when looked at from different angles. Solution 1 starts from the requirement that the hundreds digit cannot be 0 and completes the task "take 3 of the 10 digits to form a three-digit number with no repeated digits" with the multiplication principle; Solution 2 classifies by whether 0 appears and where it appears, and completes the task with the addition principle.

hundredstensunits1–90–90–9
The three places of a three-digit number: the hundreds digit can only be one of 1–9, while the tens and units digits can be any of 0–9.

Related points

All points in this topic

Cite this page: Arrangements with restrictions · KnowledgeTree (知识树), https://www.knowledgetree.world/en/kp/KP000802