Combining the counting principles

两个计数原理的综合运用

How do the two counting principles combine?

Disjoint cases add; sequential steps multiply; most real problems nest one inside the other.

SkillKP000791

Sign in to read the whole lesson, with 3 more worked examples, 9 exercises

Sign in / Sign up

Mastery goals

  • Can decide when to classify (add) and when to proceed in steps (multiply)
  • Can solve problems requiring both principles

The addition principle and the multiplication principle both answer the question of how many different ways there are to do a task. The difference is this: the addition principle deals with problems of "sorting into types": the ways are independent of one another, and any one of them alone gets the task done; the multiplication principle deals with problems of "steps": the ways in the steps depend on one another, and the task is done only when every step has been done.

Type 1: m waysType 2: n waysStep 1: m waysStep 2: n ways
Top: the addition principle; taking either the upper or the lower route gets the task done. Bottom: the multiplication principle; the task is done only when both parts have been travelled.

Example 5

To name a program module, characters are used. The first character must be one of the letters to or to , and the last two characters must be digits from to . At most how many program modules can be named?

Analysis: The task is "name one program module". It can be done in three steps: step , choose the first character; step , choose the middle character; step , choose the last character. The first character further splits into two types.

Solution: By the addition principle, the number of different choices for the first character is

The last two characters are chosen from to ; since digits may repeat, each has different choices.

By the multiplication principle, the number of different names is

so at most program modules can be named.

Summing up When using the two counting principles, the most important thing is to analyse two points carefully before starting to calculate: (1) what the "task" to be done is; (2) whether we need to sort into types or to go in steps.

Sorting into types must be done "with no overlaps and no omissions". After sorting, count each type separately, and finally add them by the addition principle to get the total.

Going in steps must be done "with complete steps", that is, the task is done only when all the steps have been done. After splitting into steps, work out the number of ways for each step, and finally multiply these numbers by the multiplication principle to get the total.

Related points

All points in this topic

Cite this page: Combining the counting principles · KnowledgeTree (知识树), https://www.knowledgetree.world/en/kp/KP000791