# Permutation Formula

The permutation formula describes the possible permutations of r elements out of a group of n elements where order does matter.

## Example

If we have four animals the possible combinations of four choose three is:

The set of four animals:

{🦕,🐓,🦎,🐟}

There are twenty-four possible permuations of four choose three:

- [🦕,🐓,🦎]
- [🦕,🦎,🐓]
- [🐓,🦎,🦕]
- [🦎,🐓,🦕]
- [🦎,🦕,🐓]

- [🦕,🐓,🐟]
- [🦕,🐟,🐓]
- [🐓,🐟,🦕]
- [🐟,🐓,🦕]
- [🐟,🦕,🐓]

- [🦕,🐟,🦎]
- [🦕,🦎,🐟]
- [🐟,🦎,🦕]
- [🦎,🐟,🦕]
- [🦎,🦕,🐟]

- [🐟,🐓,🦎]
- [🐟,🦎,🐓]
- [🐓,🦎,🐟]
- [🦎,🐓,🐟]
- [🦎,🐟,🐓]

Note that the order does matter. The permutation [🦕,🐓,🦎] is different form [🐓,🦕,🦎], because although they contain the same elements, they have different ordering.

## Example

This example shows the possible permutations of four choose two using the permutation formula.

The set of four animals:

{🐢,🐥,🐖,🐋}

There are twelve possible permuations of four choose two:

- [🐢,🐥]
- [🐢,🐖]
- [🐢,🐋]
- [🐥,🐖]
- [🐥,🐋]
- [🐖,🐋]

- [🐥,🐢]
- [🐖,🐢]
- [🐋,🐢]
- [🐖,🐥]
- [🐋,🐥]
- [🐋,🐖]