Combinatorics
Counting the ways…
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Combinatorics
Counting the ways…
A combination is a set: order does not matter. Count the ordered picks, notice that every set shows up k! times, and divide — that is all nCr is.
Choose a team of 3 from 5 people, A to E. A team has no order: ABC and CBA are the same team. Start from what the last page counts — ordered picks. There are P(5, 3) = 5 × 4 × 3 = 60 of them, listed here in dictionary order.
The top fraction is the picture: 60 chips in rows of 6. The bottom one is the same number written with factorials — k! removes the order inside the set, (n − k)! the order of the ones left out.