# Permutations > [!warning] **Order Matters** tl;dr: | Type | Repetition Allowed? | Formula | | ---------------- | :-----------------: | ----------------------------- | | $r$-permutations | No | $\frac{n!}{(n-r)!}$ | | $r$-permutations | Yes | $n^r$ | generally: - $n$ represents the number of possibilities/options - while $r$ represents the length/number of picks/boxes > [!important]+ Distinguishable vs Indistinguishable Elements > Within the field of [[Combinatorics]], it is crucial to identify whether an element in set are **distinguishable** from the others. Failing to make this distinction can lead to inaccurate calculations (*often due to overcounting*). > > The clearest example of this is permutations involving letters of words. If a word contains the same letter multiple times, it is not accurate to say that the > [!important]+ With Replacement > Contents ## Permutations > *tl;dr > Permutations -> Order Matters > Combinations -> Order Doesn't Matter* A **permutation** is defined as an ordered arrangement of the elements of a set. ($r$-permutations is specifically the ordered arrangement of $r$ elements out of a set) Let S = {1, 2, 3}. The ordered arrangement 3, 1, 2 is a permutation of S. The ordered arrangement 3, 2 is a 2-permutation of S. > [!summary] **Permutations Theorem** > If $n$ is a positive integer and $r$ is an integer with $1 \le r \le n$, then the number of $r$-permutations of a set with $n$ elements is denoted by $P(n,r)$ > $P(n,r)=\frac{n!}{(n-r)!}$ > - (Remember that $0!=1$) ### Permutations and Factorials > Goes into detail about the reasoning behind the generalized permutation formula and how it related to factorials. > > See also: [[Recursion]] **Factorials** are a crucial tool throughout the field of combinatorics, however, they can be overkill if the amount of possible boxes is smaller than the number of options available. ![[20231128_225459.jpg|400]] > Given a set of $n$ distinct objects, a permutation of $r$ objects in an $\frac{7!}{(7-4)!}=\frac{7!}{3!}=\frac{7*6*5*4*3*2*1}{3*2*1}$ The permutations formula cancels out the $3!$ *When elements can be repeatedly used* during a permutation, there is no need to decrease the number of possibilities at each index. Because of this, it’s formula is simply: $n^r$ The value of the denominator can be used to adjust the When try all of the permutations for the letters within a word When we plug it into the generalized formula we see that this is still the case. Because the amount of boxes is identical to the number of possibilities, the denominator cancels out to become $0!$ which is equal to dividing by $1$ and can now be ignored. ### Permutations with Indistinguishable Objects When a set has duplicates (such as repeated letters in a word) > [!INFO] Title > The number of different permutations of