# Permutation with Replacement Calculator

## Calculator Use

For a permutation replacement sample of r elements taken from a set of n distinct objects, order matters and replacements are allowed.

Calculate the permutations for P^{R}(n,r) = n^{r}. For n >= 0, and r >= 0.

If we choose r elements from a set size of n, each element r can be chosen n ways. So the entire sequence of r elements, also called a
string, can be chosen in n x n x n x n ..... x n = n^{r} ways.

- Permutation
- The number of ways to choose a sample of r elements from a set of n distinct objects where order does matter and replacements are not allowed. When n = r this reduces to n!, a simple factorial of n.
- Permutation Replacement
- The number of ways to choose a sample of r elements from a set of n distinct objects where order does matter and replacements are allowed.
- n
- the set or population
- r
- subset of n or sample set

## Permutation Replacement Formula:

### Permutation Replacement Problem 1

**Choosing Letters from an Alphabet**

If we want to choose a sequence of 2 letters from an alphabet size of 4 letters {a,b,c,d}, the number of permutations, with replacement allowed and where the order matters, is P^{R}(4,2) = 4^{2} = 16. Namely {a,a}, {a,b}, {a,c}, {a,d}, {b,a}, {b,b}, {b,c}, {b,d}, {c,a}, {c,b}, {c,c}, {c,d}, {d,a}, {d,b}, {d,c}, {d,d}.

If we want to choose a sequence of 20 letters from an alphabet size of 4 letters {a,b,c,d}, the number of permutations, with replacement allowed and where the order matters, is P^{R}(4,20) = 4^{20} = 1.0995 E+12 possible ways.

### Permutation Replacement Problem 2

**Rolling Dice**

Let's say we want to roll a die 60 times and record our sequence of 60 results such that it is our sequence of elements. Therefore, we are choosing a sequence of 60 dice rolls from a set size of 6 possible numbers for each roll, using one common six-sided die. {1,2,3,4,5,6}.

When you create your string of elements, each roll has 6 possibilities. Total possibilities is 6 for the 1st, times 6 for the 2nd, times 6 for the 3rd, ... times 6 for the 60th, or 6x6x6x6... etc.

P^{R}(6,60) = 6^{60} = 4.887367798 E+46 possible ways to create that sequence of 60 dice rolls.

#### References

For more information on permutations and combinations please see Wolfram MathWorld: Permutation.

**Cite this content, page or calculator as:**

Furey, Edward "Permutation with Replacement Calculator" at https://www.calculatorsoup.com/calculators/discretemathematics/permutationsreplacement.php from CalculatorSoup,
*https://www.calculatorsoup.com* - Online Calculators