keisoku

Permutation with Repetition Calculator (n to the power r)

Compute permutations with repetition n^r for choosing and arranging r items from n types. Also finds the number of possible PIN codes.

Input

Calculate the permutation with repetition n to the power r, the ways to arrange r items chosen from n types when repeats are allowed. Useful for counting PIN codes and passwords.

How many kinds you can choose from (integer, 0 or more)

Number of positions to fill (integer, 0 or more)

Result

n to the power r when n = 10 and r = 4

10,000

Number of digits

5

Ordinary permutation P(n, r)

5,040

Ratio to ordinary permutation

about 1.9841 times

Comparison

Allowing repeats gives about 1.9841 times as many arrangements as the ordinary permutation.

Quick reference table for n to the power r

Values for common combinations of n and r.

n and rr = 1r = 2r = 3r = 4r = 5
n = 22481632
n = 4416642561,024
n = 66362161,2967,776
n = 88645124,09632,768
n = 10101001,00010,000100,000

In a permutation with repetition each position has n independent choices, so the total is n multiplied by itself r times, n to the power r.

How it works

  • A permutation with repetition counts the ways to choose and arrange r items from n types when the same item may be used more than once and the order matters. Each of the r positions has n independent choices, so the total is n multiplied by itself r times, written n to the power r.
  • For example, a 4 digit PIN built from the 10 digits 0 through 9 has 10^4 = 10000 possibilities. Each position may be any of the ten digits and digits may repeat, which gives this value.
  • An ordinary permutation P(n, r) does not allow reuse, so it is always smaller than n^r. This tool compares the two and shows how many times larger the repeated permutation is.
  • When r is 0 there are no items to arrange, so there is exactly one empty arrangement and we define n^0 = 1.
  • For very large results, an approximate magnitude is also shown using a mantissa and a power of 10 in scientific notation.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Permutation with Repetition Calculator (n to the power r)