Combinatorics

Introduction

Combinatorics is the branch of mathematics that deals with arrangements of a set of objects, given a set of conditions. If an operation consists of two steps, of which the first can be done in n1 ways and for each of these the second can be done in n2 ways, then the number of ways of doing both steps is:

n1 * n2

If an operation consists of k steps, of which the first can be done in n1 ways and for each of these the second step can be done in n2 ways, for each of these the third step can be done in n3 ways and so forth, then the number of ways of doing all steps is:

n1 * n2 * n3 * n4 * . . . * nk

Use

Example

The number of different outfits that can be assembled from 4 pairs of trousers and 6 jumpers is:

4 x 6 = 24

Example

An item is to be chosen from each of four different bins containing 4, 3, 5 and 4 items respectively. The total number of ways that the items can be selected is:

4 x 3 x 5 x 4 = 240