Combinations: Selecting Groups
The fundamental concept of a combination is choosing *r* objects from a set of *n* distinct objects without regard to order. This is often represented as 'n choose r,' written as ⁿCᶱ or (n over r). The formula for calculating combinations is: ⁿCᶱ = n! / (r! * (n-r)!)
Here, ‘!’ denotes the factorial function – the product of all positive integers up to a given number. For example, 5! = 5 * 4 * 3 * 2 * 1 = 120.
ⁿCᶱ = n! / (r! * (n-r)!)
Permutations: Arranging Items
Permutations involve arranging *r* objects from a set of *n* distinct objects, where order matters. This is denoted as ⁿPᶱ or (n per r). The formula for calculating permutations is: ⁿPᶱ = n! / (n-r)!
Consider the arrangement of three books on a shelf. There are 3! = 6 possible arrangements (ABC, ACB, BAC, BCA, CAB, CBA).
ⁿPᶱ = n! / (n-r)!
Distinguishing Combinations and Permutations
The key difference lies in order. If the order of selection matters, use permutations. If only the selection itself is important, use combinations.
Example: Selecting a committee of 3 people from a group of 5 (combination – order doesn’t matter). Selecting a president, vice-president, and secretary from a group of 5 (permutation – order does matter).
Applications of Combinatorics
Combinatorial principles are used extensively in probability theory, statistics, computer science (algorithms and data structures), and cryptography.
Calculating the number of possible passwords or the efficiency of sorting algorithms relies heavily on understanding combinations and permutations.
Frequently asked questions
What is a factorial?
The factorial of a non-negative integer *n*, denoted by *n!*, is the product of all positive integers less than or equal to *n*. For example, 5! = 5 * 4 * 3 * 2 * 1.
Can I use permutations when I only need to select a group?
No. Permutations are used for arranging items, while combinations are used for selecting groups where order doesn't matter. Always check if the order of selection is relevant.
What happens when r = n in combination calculations?
When *r* equals *n*, you are choosing all *n* elements from a set of *n* elements. The formula becomes ⁿCᶱ = n! / (n! * 0!) = 1, representing only one possible selection – the entire set.
Try it live
Everything above runs in your browser — open SPH Fluid and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open SPH Fluid simulation