Loading...
Loading...
Combinatorics · Axiom Academy
Understanding the fundamental building block of combinatorics Definition: For any positive integer n , the factorial n! (read "n factorial") is the product of all positive integers from 1 to n : The animation below shows how 4! counts all possible arrangements of 4 distinct objects. Why does 0! equal 1? This might seem counterintuitive at first, but there are two compelling reasons: Combinatorial Argument: How many ways can you arrange zero objects? There is exactly one way : the empty arrangement. Therefore, 0! = 1. Pattern Argument: Notice the pattern as we work backward: Each factorial equals the next factorial divided by the next number. Following this pattern: 1! = 2! ÷ 2 = 2 ÷ 2 = 1 0! = 1! ÷ 1 = 1 ÷ 1 = 1 Let's compute the first several factorials to see how quickly they grow: Notice that each factorial is computed by multiplying the previous factorial by the next number: Factorials grow faster than exponential functions ! Let's compare n! with 2ⁿ: At n = 4: 4! = 24 vs 2⁴ = 16 (factorial is larger) At n = 10: 10! = 3,628,800 vs 2¹⁰ = 1,024 (factorial is much larger) At n = 20: 20! ≈ 2.4 × 10¹⁸ vs 2²⁰ ≈ 1 × 10⁶ (factorial dominates!) For large values of n, we can approximate n! using Stirling's approximation : This approximation is remarkably accurate even for modest values of n. For example, 10! = 3,628,800 while Stirling's formula gives approximately 3,598,696 (less than 1% error). n! = n × (n-1) × (n-2) × ... × 2 × 1 counts arrangements of n objects
This is the written version of the interactive lesson above. See the full Combinatorics course.