# Permutations

Keywords: Permutation without Repetition with Repetition

## Permutation without Repetition

A permutation is an arrangement, or listing, of n distinct objects in which the order is important.

Total number of permutations in case of n elements:

$${P}_{n}=n\xb7(n-1)\xb7(n-2)\xb7...\xb72\xb71=n!$$

**Example:**

In case of 4 elemts: {a,b,c,d}: $$n=4,{P}_{4}=4!=4\xb73\xb72\xb71=24$$

abcd | bacd | cabd | dabc |

abdc | badc | cadb | dacb |

acbd | bcad | cbad | dbac |

acdb | bcda | cbda | dbca |

adbc | bdac | cdab | dcab |

adcb | bdca | cdba | dcba |

## Permutation with Repetition

A permutation is an arrangement, or listing, of n objects in which the order is important. The elements are repeated. Number of repetations:

$${k}_{1},{k}_{2},{k}_{3},...,{k}_{r};({k}_{1}+{k}_{2}+{k}_{3}+...+{k}_{r}\le n)$$

Total number of permutations:

$${P}_{n}^{{k}_{1},{k}_{2},{k}_{3},...,{k}_{r}}=\frac{n!}{{k}_{1}!\xb7{k}_{2}!\xb7{k}_{3}!\xb7...\xb7{k}_{r}!}$$

**Example:**

In case of 7 elemet: {a,a,a,a,b,b,c} first element repeats 4 times, second element repeats 2 times: $$n=7,{k}_{1}=4,{k}_{2}=2,{k}_{1}=1$$

Total number of permutations:

$${P}_{7}^{4,2,1}=\frac{7!}{4!\xb72!\xb71!}=105$$