Ripetizioni di Analisi
EN

Theory

Combinatorics

How to count the ways to make a choice without listing them all, from the fundamental counting principle and tree diagrams to ordered selections, permutations, combinations, binomial coefficients, Pascal’s triangle, and the binomial theorem, with applications to anagrams, committees, codes, and handshakes.

On this page
  1. The fundamental counting principle
  2. Ordered selections without repetition

The fundamental counting principle

Combinatorics counts the ways to make a choice without listing every possibility. Many choices consist of successive stages, such as choosing a shirt and then a pair of pants. The fundamental counting principle explains how to combine the numbers of choices at the individual stages.

Suppose a choice has successive stages. There are ways to complete the first stage and ways to complete the second, regardless of the outcome of the first. This continues through the th stage, which can be completed in ways regardless of the outcomes of the preceding stages. The complete choice can therefore be made in

ways. For example, shirts and pairs of pants make outfits, since each of the shirts can be worn with either pair of pants.

1. Tree diagram

A tree diagram represents a choice made in stages. From a starting point called the root, one branch extends for each way to complete the first stage. From the end of each of these branches, one branch extends for each way to complete the second stage, and so on. Each path from the root to a final endpoint, called a leaf, corresponds to a complete choice, so the number of choices equals the number of leaves.

For shirts , , and pairs of pants , , there are branches from the root and branches from each of these. There are therefore leaves, as the fundamental counting principle predicts.

M₁M₂M₃M₁ P₁M₁ P₂M₂ P₁M₂ P₂M₃ P₁M₃ P₂
Tree diagram of the outfits formed from shirts and pairs of pants. Each shirt has branches, giving leaves

A tree can also be used when the number of branches varies from node to node. In that case the leaves are counted branch by branch.

Choosing a meal in three stages

A restaurant offers first courses, main courses, and desserts. A meal consists of one first course, one main course, and one dessert. At each stage the number of choices is the same regardless of the preceding choices, so by the fundamental counting principle the number of meals is

If dessert is optional, the third stage has outcomes, namely one of the three desserts or no dessert. The number of meals is then .

2. The addition principle

Sometimes the possibilities fall into groups that have no cases in common. The total number of cases then equals the sum of the numbers of cases in the individual groups. In symbols, denotes the number of elements of a finite set . If and are disjoint finite sets, meaning that , then

For example, there are direct trains and buses from one city to another. A traveler who chooses a single means of transportation has options, since the same trip cannot be both a train trip and a bus trip.

Addition and multiplication in the same problem

Consider codes consisting of one, two, or three letters chosen from , , , with repetition allowed. Codes of different lengths form disjoint groups, so we count them separately and then add. For each length, each position can be filled in ways. By the fundamental counting principle, there are therefore one-letter codes, two-letter codes, and three-letter codes. By the addition principle the total number of codes is

Warning

The fundamental counting principle applies when the number of outcomes at each stage is the same regardless of the outcomes of the preceding stages. Toss a coin. If it shows heads (), roll a die; if it shows tails (), toss the coin again. The second stage has outcomes after heads and outcomes after tails, so the product gives an incorrect result. Counting the leaves of the tree branch by branch gives outcomes.

TC123456TC
There are branches after heads and after tails, giving outcomes

Groups with overlapping cases

If the two groups have cases in common, the sum counts the elements of twice. To correct the count, subtract the number of these elements once:

Among the numbers from to , the number divisible by is , the number divisible by is , and the number divisible by both, that is, by , is . Therefore the number divisible by or is .

AB1055
Numbers from to . Set contains the multiples of and set contains the multiples of . The multiples of lie in , so

Ordered selections without repetition

Many problems involve choosing some objects and arranging them in order, as when recording the top three finishers in a race. Suppose there are distinct objects and a natural number with . For objects and a selection size of , an ordered selection without repetition is a sequence of objects chosen from the objects, all distinct. Two selections are different if they contain different objects or if they contain the same objects in a different order. The number of ordered selections without repetition is denoted by .

Using the letters , , and with , the ordered selections without repetition are

so . The sequences and are distinct, since they contain the same letters in a different order.

ABCABACBABCCACB
Tree of ordered selections without repetition from , , , taking at a time. The first letter can be chosen in ways and the second from the letters that remain, so

Counting ordered selections without repetition

For , the number of ordered selections from objects taken at a time without repetition is the product of consecutive natural numbers in decreasing order, starting with :

For example, in a race with athletes, the number of possible podium finishes, that is, ordered triples of gold, silver, and bronze medalists, is . The last factor is .

Proof

Fill the positions in the sequence one at a time and apply the fundamental counting principle. The first position can be filled with any of the objects, so there are choices. The objects must be different, so objects remain for the second position, whichever object was chosen first. For the third position remain, and so on. Before filling the th position, objects have already been used, so remain. The number of outcomes at each stage is independent of the preceding choices, so by the fundamental counting principle the number of sequences is .

Three-digit numbers with distinct digits

Count the three-digit natural numbers whose digits are all different. The hundreds digit must be different from , since otherwise the number would have only two digits, so it can be chosen in ways. The tens digit differs from the hundreds digit and can be , so there are choices. The units digit differs from both digits already used, so there are choices. By the fundamental counting principle the total is

This count agrees with , since from the sequences of three distinct digits we subtract the that start with .

End of the free preview

The theory of this topic continues with 9 more sections

  1. Ordered selections with repetition
  2. Permutations of distinct objects and factorials
  3. Permutations with repeated elements
  4. Combinations without repetition
  5. Binomial coefficients and their properties
  6. Pascal’s triangle
  7. The binomial theorem
  8. Counting problems
  9. Keep studying

Full access also includes the other 5 worked examples of this topic and the solutions of the 14 practice exercises.

Unlock Maths 4th year · €29

Read the first 3 worked examples in this chapter for free.

Report a mistake

Where:

Ripetizioni di Analisi

Keep studying

With a free account, you can pick up where you left off and see your progress next time you visit.

Sign up for free

Already have an account? Sign in

Contents