# Solving the counting problems using factorial, combination, and permutation concepts

**Multiplication rule of counting:** If a task can be done in n_{1 }ways and a second task, given the first task, can be done in n_{2 }ways, and a third task, given the first two tasks, can be done in n_{3 }ways and so on for k tasks, then the number of ways the k tasks can be done is (n_{1})(n_{2})...(n_{k}).

If you want to assign three security analysts to cover three different industries then the first analyst may be assigned in three ways (in any of three industries), the second analyst may be assigned in two ways (as one industry is already assigned to the first analyst), and the third analyst may be assigned in one way. So, the total number of ways they can be assigned is given by 3*2*1 = 6 ways.

The compact notation for such multiplication is called as the **factorial**. n factorial is equal to n(n-1)(n-2)....1. n factorial is denoted as n!. 0! and 1! are equal to 1.

**Labeling:** The number of ways n objects can be labeled with k different labels, with n_{1} of the first type, n_{2} of the second type and so on, with n_{1} + n_{2} + .... + n_{k} = n, is given by . This formula is also called a **multinomial formula**.

When the labeling of the objects is done with two labels only then, the **combination **formula is used.

_{n}C_{r} = n!/(n-r)!r!

When the order of the objects is important, then the **permutation** formula is used.

_{n}P_{r} = n!/(n-r)!

__Guidance for application of formulas:__

When the problem asks us to assign every member of a group of size n to n tasks, then use n factorial formula.

When the problem asks us to count the number of ways to apply one of three or more labels to each member of a group, then use the multinomial formula of labeling.

When the problem asks us to count the number of ways to choose r objects from n objects, and the order of the objects do not matter, then apply the combination formula.

When the problem asks to count the number of ways to choose r objects from n objects and the order of the objects matter, then apply the permutation formula.

Example 9: Using labeling formula |

Ten mutual funds have to be assigned to three categories A, B, and C. The categories A, B, and C will have five, three and two mutual funds respectively. In how many ways the mutual funds can be assigned to those categories? |

Example 10: Using combination and permutation formulas |

A hedge fund wants to take a position in fixed income securities from a pool of fixed income securities. The fund wants to invest is four securities out of a total of 20 securities. In many ways, this can be done: (a) when the order is important (b) when the order is not important |

Previous LOS: Updated probability using Bayes' formula