Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Count Arrangements with Repetition

When an option stays available after it is used, every position has the full set of choices. The count is the number of options multiplied by itself once per position: nrn^r.

Recognize the task

Positions are filled in order and a symbol can be used again: PIN codes, passwords, license plates, answer sheets, strings of digits or letters. Test: after you use an option once, is it still available for the next position? If yes, the count is a power, or a product when positions have different option sets.
Permutations with repetition are defined in the permutations lesson.

Two ways to do it

Power formulausual
nrn^r
Every position has the same nn options (permutation with repetition).
Position by positionmixed
m1⋅m2⋯mrm_1 \cdot m_2 \cdots m_r
When positions have different option counts, such as letters then digits, multiply the counts one by one.

Steps

StepOn 3-letter codes from A, B, C, D (letters may repeat)
1Check that order matters and repeats are allowed. ABA and AAB are different codes, and a letter may appear more than once.ordered, repetition allowed
2Count the options for each position. Every position takes any of the nn options, whatever came before.44 options in each of 33 positions
3Multiply across the positions. One factor per position.Multiplication principle ↗4⋅4⋅4=434 \cdot 4 \cdot 4 = 4^3
4Compute the power. The base is the number of options; the exponent is the number of positions.6464 codes

Worked examples

Example 1 · binary strings

two options
55 positions, each 00 or 11
n=2n = 2, r=5r = 5
25=322^5 = 32 strings
one factor 22 per position

Example 2 · license plates

mixed positions
33 letters, then 33 digits
two kinds of position
263⋅103=17,576⋅100026^3 \cdot 10^3 = 17{,}576 \cdot 1000
one power per kind
17,576,00017{,}576{,}000 plates
multiply

Example 3 · even 3-digit numbers

restricted positions
first digit 11 to 99: 99 options
no leading zero
middle digit: 1010; last digit 0,2,4,6,80, 2, 4, 6, 8: 55
even means even last digit
9⋅10⋅5=4509 \cdot 10 \cdot 5 = 450
multiply position by position
Build codes slot by slot in the permutation with repetition tool.

See it happen

Each position is an independent dial with nn settings. Turning one dial never changes the settings of the others, so every new position multiplies the number of codes by nn. That is why the count grows as a power: rr positions give n⋅n⋯n=nrn \cdot n \cdots n = n^r.

Common mistakes

Swapping base and exponent

✗ 33-letter codes from 44 letters: 34=813^4 = 81
✓ 44 options per position, 33 positions: 43=644^3 = 64

Removing used options

✗ 44-digit PINs: 10⋅9⋅8⋅7=504010 \cdot 9 \cdot 8 \cdot 7 = 5040
✓ digits may repeat: 104=10,00010^4 = 10{,}000

Ignoring a restricted position

✗ 33-digit numbers: 103=100010^3 = 1000
✓ no leading zero: 9⋅10⋅10=9009 \cdot 10 \cdot 10 = 900