Combinatorics is the mathematics of counting arrangements and selections without listing them one by one. The two questions that decide almost every basic problem are: does order matter? and can items repeat? If order matters, you are counting permutations; if it does not, you are counting combinations.
The engine behind both is the fundamental counting principle: if one choice can be made in ways and a second independent choice in ways, the pair can be made in ways.
The Fundamental Counting Principle
Multiply the number of options at each independent stage. A cafe with sandwiches and drinks offers
different meals. The principle extends to any number of stages: a -digit PIN where each digit can be – has possibilities, because repetition is allowed and each position is an independent choice.
When the question joins separate cases with "or" instead of stages with "and," you add instead of multiply.
Factorials: The Building Block
The factorial counts the ways to arrange distinct items in a row:
For example, , so five books can be ordered on a shelf in ways. By definition , which keeps the formulas below consistent.
Permutations: When Order Matters
A permutation is an ordered arrangement. The number of ways to arrange items chosen from distinct items is:
Each position is filled by the counting principle: options for the first slot, for the second, and so on for slots. Rankings, race finishes, passwords without repeated characters, and seating orders are all permutation problems.
Combinations: When Order Does Not Matter
A combination is a selection where only membership counts. The number of ways to choose items from is:
It is the permutation count divided by , because each unordered group of items was counted times — once per internal ordering. Committees, pizza toppings, lottery draws, and hands of cards are combination problems.
Permutation vs Combination at a Glance
| Question to ask | Permutation | Combination |
|---|---|---|
| Does order matter? | Yes | No |
| Typical wording | arrange, rank, schedule, line up | choose, select, pick, group |
| Formula | ||
| Example | Gold, silver, bronze from runners | Any qualifiers from runners |
| Count for , |
The same and give a much larger permutation count — order multiplies the possibilities by here.
Worked Example: Electing Club Officers (Permutation)
A club with members elects a president, a vice president, and a treasurer. No one can hold two offices. How many outcomes are there?
Order matters because the three positions are different. Using the permutation formula with and :
There are possible officer slates. Notice you never need the full value of — the cancels, leaving just three factors.
Worked Example: Choosing a Committee (Combination)
The same club instead forms a -person committee with equal roles. Now order does not matter, so divide out the internal orderings:
There are possible committees. Comparing the two examples makes the core idea concrete: the only difference between and is whether the three selected people are distinguishable by role.
Common Combinatorics Mistakes
The most frequent error is using a permutation when the problem is a combination, or the reverse. Test yourself with the wording: "arrange" and "rank" signal order; "choose" and "select" usually do not.
A second mistake is forgetting repetition. Choosing items from with repetition allowed and order mattering gives , not . A 4-character code over letters has options, far more than .
Students also double count when cases overlap. If you count "hands with at least one ace" by picking an ace first and then any four cards, hands with two aces get counted twice; the complement method avoids this.
Finally, adding when you should multiply: stages connected by "and then" multiply, while mutually exclusive cases connected by "or" add.
Where Combinatorics Is Used
Counting is the backbone of probability: the chance of an event with equally likely outcomes is favorable count over total count, and both counts usually come from permutations or combinations. The values are exactly the coefficients in the binomial theorem, they fill Pascal's triangle, and they appear in statistics through the binomial distribution. Beyond math class, combinatorics drives password security estimates, tournament scheduling, network design, and algorithm analysis.
Check Your Understanding
Decide before computing: a librarian picks of novels to display in a row in the front window. Is that a permutation, a combination, or both stages combined? Work it out, then verify your reasoning step by step with a math solver if the two-stage answer — choose, then arrange — does not land at .
Frequently Asked Questions
- What is the difference between a permutation and a combination?
- A permutation is an ordered arrangement, while a combination is a selection where order does not matter. Electing a president and vice president from a group is a permutation because the roles differ. Choosing two equal committee members is a combination. With the same group sizes, the permutation count is always larger, by a factor of r factorial.
- What does the exclamation mark mean in combinatorics?
- The exclamation mark denotes a factorial. The expression n factorial means the product of all whole numbers from n down to 1, so 5 factorial equals 120. It counts the ways to arrange n distinct items in a row. By convention, 0 factorial equals 1, which keeps the permutation and combination formulas consistent in edge cases.
- When do you multiply and when do you add in counting problems?
- Multiply when choices happen in stages connected by the idea of and then, such as picking a sandwich and then a drink. Add when the problem splits into separate cases connected by or that cannot happen together, such as choosing either a 2-topping or a 3-topping pizza. Most errors come from adding stages or multiplying overlapping cases.
- How do you know if repetition is allowed in a counting problem?
- Check whether the same item can be used twice. PIN codes and passwords usually allow repeated symbols, giving n to the power r outcomes. Seating people, ranking runners, or dealing cards cannot repeat items, so you use permutation or combination formulas instead. If the problem is silent, physical objects typically cannot repeat while symbols typically can.
- What is combinatorics used for in real life?
- Combinatorics underlies probability calculations, since most chances are a favorable count divided by a total count. It also estimates password strength, counts lottery odds, schedules tournaments, designs experiments in statistics, and analyzes how long algorithms take. The binomial coefficients from combinations also appear in Pascal's triangle and the binomial theorem.
Need help with a problem?
Upload your question and get a verified, step-by-step solution in seconds.
Open GPAI Solver →