## Permutations and Combinations

*See also: probability*

### Permutations and Combinations Calculator

The calculator below will calculate number of permutations or combinations.

Please report any error to [email protected]. Thank you.

**Permutation** is an ordered arrangement of a number of elements of a set.

Mathematically, given a set with *n* numbers of elements, the number of permutations of size *r* is denoted by ** P(n,r)** or

**or**

_{n}*P*_{r}**.**

^{n}*P*_{r}The formula is given by

P(n,r) = _{n}P_{r} = ^{n}P_{r} = | n! |

(n - r)! |

where *n*! (*n* factorial) = *n* × (*n*-1) × (*n*-2) × ... × 1 and 0! = 1.

For example, given the set of letters {a,b,c} the permutations of size 2 (take 2 elements of the set) are {a,b}, {b,a}, {a,c}, {c,a}, {b,c}, and {c,b}. Please note that the *order* is important (i.e. {a,b} is considered different from {b,a}).

The number of permutations is 6.

P(3,2) = _{3}P_{2} = ^{3}P_{2} = | 3! |

(3 - 2)! | |

= | 3 × 2 × 1 |

1! | |

= | 6 |

1 | |

= | 6 |

Another example: How many different ways are there can 5 different books be arranged on the self?

*Answer:* Here, *n* = 5 and *r* = 5.

So, ^{5}*P*_{5} = ^{5!}/_{(5-5)!} = ^{5!}/_{0!} = ^{(5 × 4 × 3 × 2 × 1)}/_{1} = 120.

As can be seen from the above example, when ** n = r**, the formula for

**.**

^{n}*P*_{r}=*n*!**Combination** is an unordered arrangement of a number of elements of a set.

Given a set with *n* numbers of elements, the number of combinations of size *r* is denoted by ** C(n,r)** or

**or**

_{n}*C*_{r}**.**

^{n}*C*_{r}The formula is given by

C(n,r) = _{n}C_{r} = ^{n}C_{r} = | n! |

r! (n - r)! |

where *n*! (*n* factorial) = *n* × (*n*-1) × (*n*-2) × ... × 1 and 0! = 1.

For example, given the set of letters {a,b,c} the combinations of size 2 (take 2 elements of the set) are {a,b}, {a,c}, and {b,c}. Please note that the *order* is not important (i.e. {b,a} is considered the same as {a,b}).

The number of combinations is 3.

C(3,2) = _{3}C_{2} = ^{3}C_{2} = | 3! |

2! (3 - 2)! | |

= | 3 × 2 × 1 |

2 × 1 × 1! | |

= | 6 |

2 | |

= | 3 |

Another example: A basket contains an apple, an orange, a pear, and a banana. How many combinations of three fruits are there?

*Answer:* Here, *n* = 4 and *r* = 3.

So, ^{4}*C*_{3} = ^{4!}/_{3!(4-3)!} = ^{(4 × 3 × 2 × 1)}/_{(3 × 2 × 1) 1!} = ^{24}/_{6} = 4.

For combination when ** n = r**, the number of combinations is always equal to 1.

*See also: probability*