What is the difference between a combination and a permutation?
A permutation is an ordered arrangement and a combination is an unordered selection. If you draw three cards from a deck and care which one came first, second, and third, you are counting permutations — ace-king-queen and queen-king-ace are different. If you only care which three cards you ended up holding, you are counting combinations — those two draws yield the same hand. Formally, the number of permutations of k items from n is P(n, k) = n! / (n − k)!, and the number of combinations is C(n, k) = n! / (k!(n − k)!). The two formulas differ by the k! that counts the orderings of each chosen subset, so P(n, k) is always k! times larger than C(n, k).
How do I know whether order matters in my problem?
Ask whether swapping two of the chosen items produces a different outcome that the problem treats as distinct. If yes, use permutations; if no, use combinations. Race finish positions (gold, silver, bronze) are permutations because the medals are different. A committee of three people is a combination because the committee has the same members regardless of who you named first. Passwords and PINs are permutations because 1234 and 4321 unlock different accounts. Lottery numbers drawn into a single bin are combinations because the ticket wins whether you wrote them in ascending order or scrambled. When in doubt, list a small case by hand and check whether your count matches the formula.
What changes when selection is with replacement instead of without?
Without replacement each item can be chosen at most once, which is the default for the standard P(n, k) and C(n, k) formulas. With replacement the same item can be chosen repeatedly, which inflates the counts. Permutations with replacement are simply n^k, because every one of the k positions has all n options available. Combinations with replacement use the stars-and-bars formula C(n + k − 1, k), which counts multisets — for example, the number of ways to choose 3 scoops from 5 ice cream flavors when repeats are allowed is C(5 + 3 − 1, 3) = C(7, 3) = 35. Real-world cues: drawing cards without putting them back is without replacement, while rolling the same die k times is with replacement.
Why do combinatorics formulas use factorials, and how big do they get?
The factorial n! = n × (n − 1) × ... × 1 counts the number of ways to arrange n distinct items in a line, which is the building block for both permutation and combination counts. Factorials grow extremely fast — 10! is already 3,628,800, 20! exceeds 2.4 × 10^18, and 70! overflows a standard 64-bit double-precision float. This is why calculators must cancel common factors before multiplying. For C(100, 3), evaluating 100! / (3! × 97!) directly is wasteful, but rewriting it as (100 × 99 × 98) / (3 × 2 × 1) = 161,700 is fast and exact. Most well-written combinatorics tools use this cancellation or log-factorials internally.
What are real-world lottery odds, and what does combinatorics tell me?
Pick-6 style lotteries are pure combination problems because the order of the drawn balls does not matter for matching. In a 6 of 49 lottery the odds of matching all six are 1 in C(49, 6) = 13,983,816, or about 1 in 14 million. Powerball uses 5 of 69 white balls plus 1 of 26 red, so jackpot odds are 1 / (C(69, 5) × 26) = 1 / (11,238,513 × 26) ≈ 1 in 292 million. Mega Millions is currently 5 of 70 plus 1 of 25, giving roughly 1 in 302 million. Two practical takeaways: buying multiple tickets only helps linearly (10 tickets is still about 1 in 30 million for Powerball), and the expected return of a lottery ticket is almost always negative once taxes and split jackpots are factored in.
How does Pascal's triangle relate to combinations?
Pascal's triangle is a literal lookup table for combinations: the entry in row n, position k (zero-indexed) equals C(n, k). Row 5 reads 1, 5, 10, 10, 5, 1, which are exactly C(5, 0) through C(5, 5). The triangle's defining rule — each entry is the sum of the two entries above it — is the combinatorial identity C(n, k) = C(n − 1, k − 1) + C(n − 1, k), which has a clean proof: a chosen subset of size k from n either includes the n-th element (then choose the remaining k − 1 from n − 1) or excludes it (then choose all k from the first n − 1). The triangle also encodes the binomial theorem, since the row-n entries are the coefficients in the expansion of (a + b)^n.
Are there constraints on n and k that I need to respect?
Both n and k must be non-negative integers, and k must be less than or equal to n for the standard (without-replacement) formulas. Edge cases are well-defined and worth remembering: C(n, 0) = 1 because there is exactly one way to choose nothing (the empty set), C(n, n) = 1 because there is one way to choose everything, P(n, 0) = 1 by convention, and 0! = 1 so the formulas stay consistent. If your problem produces a non-integer n, a negative k, or k > n, the standard count is undefined or zero, and you should re-examine whether the problem requires a different model such as multinomials, permutations of multisets, or combinations with replacement.
When should I use a multinomial coefficient instead of a binomial coefficient?
Use a multinomial when you are partitioning n items into more than two distinguishable groups of fixed sizes. The formula n! / (k_1! × k_2! × ... × k_m!) counts the number of ways to split n distinct items into groups of sizes k_1, k_2, ..., k_m, where the group sizes must sum to n. For example, dealing a 52-card deck into four 13-card hands is 52! / (13!)^4 ≈ 5.36 × 10^28. The binomial C(n, k) is the special two-group case where the groups have sizes k and n − k. Multinomials also count the number of distinct rearrangements of a word with repeated letters — MISSISSIPPI has 11! / (1! × 4! × 4! × 2!) = 34,650 distinct arrangements.