# Combinatorics/Rule of product

The **rule of product**^{‡} is easy to state if one is counting choices or outcomes based on two choices:

**a**ways of doing (or counting) something and

**b**ways of doing or counting something else, then the total number of ways to count (or do) both thins is

**a·b**.

## Tree diagrams[edit | edit source]

**Question:** Under what conditions can this rule be iterated, for example by concluding that there are **a·b·c** possible outcomes if we observe **a** options at the first step, followed by **b**, and then by **c** options.

**Figure 1**illustrates a successful effort to establish that there are 3!=6 way to order the three integers, The counting starts with, **a=3**, choices. But, since we assume that each integer is included one and only one time, the next step gives us only, **b=2,** options. Finally there is only one choice left **(c=1)** after the first two integers are selected. Counting the items in the leftmost column of **Figure 1**, we see that the number of of **permutations** of 123 is, **3!=3·2·1=6.** The number of permutations for **n** objects is **n!** EDIT THIS

It is not always this easy to apply the rule of product to a tree diagram. In the next section we illustrate this using two tree diagrams that model the same problem. The rule of product is not very useful in analyizing the simplest tree diagram. But a more complex tree diagram can be used to derive formulas involving combinations and multinomial????

### Calculating 5-choose-3[edit | edit source]

The tree diagram of **Figure 2**shows that the answer is 10 (if you count the words in the left-most column.) Unfortunately the diagram is too chaotic to yield much insight to the general formula if more letters are involved. **Figure 3**is also chaotic, and much larger. But this tree-diagram can be used to solve for the general case. Before we show how **Figure 3**can do that, let us first carefully examine it.

**First circle.** Begin at the center, with , which is the symbol for how many way three objects can be chosen from five distinguishable objects. The answer is obtained by counting the ten dotted lines leading from that symbol. The first circle documents all ten outcomes^{[1]} associated with 5-chose-3.

**Second circle.** Next, we count how many different words could be created if we declare the to Rs to be not identical. In other words, we count the words that can be created from the multiset,

{R_{1},R_{2},C,C,C} .

Since there are 2 ways to add subscripts to the pair of Rs, the rule of product informs us that this second circle contains twice as many outcomes.^{[2]}

### Mississippi[edit | edit source]