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 PR(n,r) = nr. 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 = nr 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 PR(4,2) = 42 = 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 PR(4,20) = 420 = 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.
PR(6,60) = 660 = 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.