Beginner Topic 8 of 51 Theory & Discrete Math
Permutations and Combinations
Counting ordered and unordered selections.
How it works
A permutation is an ordered arrangement of items, and the number of ways to arrange r of n distinct items is n!/(n-r)!. A combination is an unordered selection, counted by the binomial coefficient n choose r, equal to n!/(r!(n-r)!). Variants include permutations with repeated elements, divided by factorials of repeat counts, and combinations with repetition, counted by stars and bars. Pascal's triangle and the binomial theorem connect them.
Step-by-step walkthrough
- Permutations count ordered selections, n! over (n-k)!
- Combinations ignore order, n! over k!(n-k)!
- Choosing 2 of 4 people in order gives 12.
- Without order it gives 6, each pair counted twice.
- Use permutations for rankings and combinations for teams.
Where it is used
Counting passwords and lottery outcomes, scheduling, generating test cases, probability calculations and algorithm analysis, such as the number of subsets 2 to the n, use these formulas.
Common pitfall
Choosing between order mattering and not mattering is the main difficulty. Factorials grow explosively, so brute-force enumeration quickly becomes infeasible. Overflow occurs when computing factorials directly; use iterative multiplication and division or Pascal's recurrence. Check the problem for identical items and restrictions.
Where it fits in the course
Permutations and Combinations is topic 8 of 51 in Theory & Discrete Math, rated Beginner. It follows Counting Principles. The next topic is Pigeonhole Principle.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Theory & Discrete Math quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Theory & Discrete Math quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Permutations and Combinations?
Where do people use Permutations and Combinations?
What is the most common mistake with Permutations and Combinations?
What should I learn before this topic?
How can I practice it?
Is Permutations and Combinations hard to learn?
How long does it take to learn Permutations and Combinations?
Which topics are related to Permutations and Combinations?
What should I study after Permutations and Combinations?
Related topics
- Counting Principles (Theory & Discrete Math)
- Pigeonhole Principle (Theory & Discrete Math)
- Proof Techniques (Theory & Discrete Math)
- Recurrence Relations (Theory & Discrete Math)