Foundations of combinatorics
Combinatorics studies ways to choose and arrange elements from a given set. The choice of formula depends on whether order matters (arrangements/permutations or combinations) and whether elements can repeat.
In plain words:
The sum rule is choosing "either this or that": when the options do not overlap, we simply add their counts.
Example:
- A = 4 projects to choose from
- B = 3 essays to choose from
- You need to take ONE task from the two lists: ∣A∣+∣B∣=4+3=7 options
Main rule:
The keyword "OR" → add. The main condition is that the lists do not overlap: no option belongs to both.
In plain words:
The product rule is choosing "both this and that": if the decision consists of consecutive independent steps, we multiply the options.
Example:
- ∣A∣ = 3 kinds of soup
- ∣B∣ = 4 kinds of main course
- A meal is soup AND a main course: ∣A∣⋅∣B∣=3⋅4=12 menu options
Main rule:
The keyword "AND" → multiply. On k independent steps there are exactly n1⋅n2⋅⋯⋅nk options.
In plain words:
A permutation is "arranging all n elements in a row": order matters, we throw nothing away and repeat nothing.
Example:
- n=3 books on a shelf
- Any of the 3 can be first, any of the remaining 2 second, and the last one third
- P3=3!=3⋅2⋅1=6 ways to arrange the books
Main rule:
There are n choices for the first place, n−1 for the second, and so on. Factorials grow very fast: 6!=720.
In plain words:
An arrangement is "choosing k of n and putting them into places": the order of the chosen elements matters and there are no repeats.
Example:
- n=5 runners at the start
- k=3 prize places: first, second, third
- A53=(5−3)!5!=2120=60 ways to award the medals
Main rule:
An arrangement is a "permutation of k places": A53=5⋅4⋅3. When k=n, it turns into an ordinary permutation Pn.
In plain words:
A combination is "choosing k of n without regard to order": what matters is who makes the team, not the sequence.
Example:
- n=5 people, you need to pick k=2 duty officers
- The pairs {Ann, Boris} and {Boris, Ann} are ONE and the same pair
- C52=2!⋅3!5!=12120=10 ways to choose a pair
Main rule:
A combination is an arrangement divided by k!: the arrangements inside the chosen group "collapse". Symmetry: Cnk=Cnn−k.
In plain words:
Arrangements with repetition are "codes and passwords": the order of symbols matters, and each symbol can repeat as many times as needed.
Example:
- A combination lock: k=3 wheels, each with n=10 digits
- Any of the 10 digits can be placed on each position
- A103=103=1000 codes — from 000 to 999
Main rule:
Each of the k places has n options → nk in total. Adding one position multiplies the number of codes by n.
In plain words:
Combinations with repetition are "choosing by type, repeating allowed": for example, filling a basket so that only the kinds matter, not the order.
Example:
- n=3 kinds of filling (meat, cheese, vegetables), we bake k=4 pies
- The order of the pies does not matter, kinds may repeat
- C34=C3+4−14=C64=15 different baskets
Main rule:
The trick: the problem reduces to a combination without repetition of n+k−1 elements taken k at a time: Cnk=Cn+k−1k.
In plain words:
Permutations with repetition are "permutations with identical parts": identical elements should not be counted as different arrangements.
Example:
- The word "MAMA": in total n=4 letters, of which n1=2 letters "M" and n2=2 letters "A"
- Swapping the two "M" letters is the same arrangement
- P4(2,2)=2!⋅2!4!=424=6 different anagrams
Main rule:
Divide by the factorials of the repeats so identical elements are not counted as different. Check: n1+n2+⋯=n.