Arrangements with Repetition
Worked example: Four-digit PIN → 10000 codes — press Try an example to run it live, then adjust anything.
Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value. Try different units for next level excitement!
Arrangements with Repetition explained
When each position is filled independently from the same n options and repeats are allowed, the count is n multiplied by itself r times. A four-digit PIN gives 10⁴ = 10,000 possibilities; an eight-character password from 95 printable ASCII characters gives 95⁸ ≈ 6.6 × 10¹⁵. Solved for r, the formula answers the security question directly: to exceed a billion possibilities with a 26-letter alphabet you need r = ln(10⁹)/ln 26 ≈ 6.4, so seven letters.
Exponentials of this kind are why the Enigma machine was formidable — its plugboard and rotor settings ran to about 1.6 × 10²⁰ configurations — and why Bletchley Park had to attack structure rather than count. The trap is applying when repeats are forbidden: three distinct digits give 10 × 9 × 8 = 720 codes, not 1000. Also keep the roles straight — for a 4-digit PIN it is 10⁴ = 10,000, not 4¹⁰ = 1,048,576.
Arrangements with Repetition formula
- = Number of possible sequences
- = Choices per position
- = Number of positions
Missing one of these? Work it out first, then come back
- Number of possible sequences — Exponential Growth, Exponential Decay
- Number of positions — Exponential Growth, Exponential Decay