Two from Five
In how many ways can \(2\) students be chosen from \(5\)?
The order of selection does not matter.
Ordered selection gives \(5\cdot4=20\) ways, but each pair is counted twice. Answer: \(10\).
Chapter
Theory
A combination is a selection of objects without regard to order. If the order of selection is not part of the answer, sequential counting usually overcounts. The number of ways to choose \(k\) objects from \(n\) is denoted by \(\binom{n}{k}\).
In olympiad combinatorics, combinations are more than a formula. They encode objects: positions of ones, vertices of a polygon, boundaries of a rectangle, elements of a subset, or places for dividers.
If an object is completely determined by a set of chosen elements, use combinations. If it is determined by positions of special symbols, choose positions. If the condition says “not consecutive”, write the chosen numbers as \(a_1<\cdots If a formula looks algebraic, ask: what does the left-hand side count, and what does the right-hand side count?
Examples
A team does not depend on the order of selection.
Problem. In how many ways can \(3\) students be chosen from \(8\)?
If we choose in order, we get \(8\cdot7\cdot6\), but each team of three is counted \(3!\) times. Therefore the answer is \(8\cdot7\cdot6/3!=56\).
Comment. This is \(\binom{8}{3}\).
Sometimes it is easier to choose what remains.
Problem. In how many ways can \(4\) books be chosen from \(10\) if one specified book must be chosen?
The specified book is already chosen. We must choose \(3\) more books from the remaining \(9\). Answer: \(\binom{9}{3}=84\).
Comment. There is no need to consider the position of the specified book.
Complement counting shortens casework.
Problem. From \(5\) boys and \(4\) girls, a team of \(3\) is chosen. How many teams contain at least one girl?
There are \(\binom{9}{3}=84\) teams in total. Teams with no girls: \(\binom{5}{3}=10\). Therefore the answer is \(84-10=74\).
Comment. The words “at least” often suggest complement counting.
The same set can be counted according to whether a special element is present.
Problem. Prove \(\binom{n}{k}=\binom{n-1}{k}+\binom{n-1}{k-1}\).
Choose a \(k\)-element subset from an \(n\)-element set and fix one element \(x\). Either \(x\) is not chosen: then choose all \(k\) elements from the other \(n-1\). Or \(x\) is chosen: then choose the remaining \(k-1\) from the other \(n-1\). This gives the identity.
Comment. This proof is more memorable than the formula.
Dividers encode distribution.
Problem. How many positive solutions does \(x+y+z=10\) have?
First put \(1\) into each variable. There remain \(7\) units to distribute among \(3\) variables. This is encoded by two dividers among \(9\) positions, so the answer is \(\binom{9}{2}=36\).
Comment. One may also think of a string of ones and two dividers.
A shift removes the required gaps.
Problem. How many \(3\)-element subsets of \(\{1,\ldots,10\}\) contain no consecutive numbers?
Let the chosen numbers be \(a_1
Comment. This is the standard technique for forbidding adjacency.
Split by the type of selected objects.
Problem. How many teams of \(4\) can be chosen from \(6\) boys and \(5\) girls if the team must contain exactly \(2\) girls?
Choose \(2\) girls from \(5\) and \(2\) boys from \(6\). These choices are independent. Answer: \(\binom{5}{2}\binom{6}{2}=10\cdot15=150\).
Comment. Typical selection from two groups.
Combinations help us understand layer sizes.
Problem. Why do any \(7\) subsets of a four-element set contain two subsets one of which contains the other?
All \(16\) subsets can be split into \(6\) inclusion chains: one long chain from \(\varnothing\) to the full set, three chains of length \(3\), and two singleton chains in the middle layer. By the pigeonhole principle, \(7\) chosen subsets hit the same chain twice, and any two sets in a chain are comparable.
Comment. This previews future ideas about chains and antichains.
Problems
In how many ways can \(2\) students be chosen from \(5\)?
The order of selection does not matter.
Ordered selection gives \(5\cdot4=20\) ways, but each pair is counted twice. Answer: \(10\).
How many nonempty subsets does a set of \(4\) elements have?
All subsets minus the empty set.
There are \(2^4=16\) subsets. One is empty, so \(15\) are nonempty.
How many \(3\)-element subsets does a set of \(7\) elements have?
This is \(\binom{7}{3}\).
We get \(\binom{7}{3}=7\cdot6\cdot5/3!=35\).
Explain why \(\binom{10}{3}=\binom{10}{7}\).
Choosing \(3\) elements determines the \(7\) not chosen.
Each choice of \(3\) elements corresponds to the choice of the \(7\) elements not taken. This is a bijection, so the numbers are equal.
How many binary strings of length \(6\) contain exactly two ones?
Choose the positions of the two ones.
Choose \(2\) positions out of \(6\). Answer: \(\binom{6}{2}=15\).
From \(5\) girls and \(4\) boys, a team of \(3\) is chosen with exactly \(2\) girls. How many choices are there?
Choose the girls and the boy independently.
Choose the girls in \(\binom{5}{2}=10\) ways and the boy in \(4\) ways. Total: \(40\).
From \(5\) girls and \(4\) boys, a team of \(4\) is chosen. How many teams contain at least two girls?
Split into \(2,3,4\) girls.
We get \(\binom{5}{2}\binom{4}{2}+\binom{5}{3}\binom{4}{1}+\binom{5}{4}=10\cdot6+10\cdot4+5=105\).
How many diagonals does a convex \(12\)-gon have?
Choose a pair of vertices and subtract sides.
Any two vertices determine a segment: \(\binom{12}{2}=66\). Among these are \(12\) sides. Therefore there are \(66-12=54\) diagonals.
In a group of \(10\) students, \(3\) are top students. In how many ways can a team of \(4\) be chosen so that it contains at least one top student?
All teams minus teams without top students.
Total: \(\binom{10}{4}=210\). Without top students, choose \(4\) from the other \(7\): \(\binom{7}{4}=35\). Answer: \(175\).
How many \(3\)-element subsets of \(\{1,2,\ldots,10\}\) contain no consecutive numbers?
Use the shift \(b_i=a_i-(i-1)\).
Let \(a_1
How many nonnegative solutions does \(x+y+z=8\) have?
Use \(8\) ones and \(2\) dividers.
The string consists of \(8\) ones and \(2\) dividers, \(10\) symbols total. Choose the divider positions: \(\binom{10}{2}=45\).
How many positive solutions does \(x+y+z=10\) have?
First subtract \(1\) from each variable.
Let \(x'=x-1\), \(y'=y-1\), \(z'=z-1\). Then \(x'+y'+z'=7\) in nonnegative variables. Answer: \(\binom{9}{2}=36\).
Prove combinatorially that \(\binom{n}{k}=\binom{n-1}{k}+\binom{n-1}{k-1}\).
Fix one special element.
Count \(k\)-element subsets of an \(n\)-element set. The special element is either not chosen: \(\binom{n-1}{k}\), or chosen: \(\binom{n-1}{k-1}\). The sum of these disjoint cases gives all subsets.
Prove that the number of ways to choose \(3\) people from \(m\) boys and \(n\) girls is \(\binom{m}{3}+\binom{m}{2}\binom{n}{1}+\binom{m}{1}\binom{n}{2}+\binom{n}{3}\).
Split by the number of boys in the team.
A team of \(3\) can contain \(3,2,1,0\) boys. These cases are disjoint. In each case choose the required number of boys and girls, giving the stated sum.
How many \(6\)-element subsets of \(\{1,\ldots,12\}\) contain no consecutive numbers?
Use the shifting formula for \(k=6\).
For chosen \(a_1<\cdots
How many \(4\)-element subsets of \(\{1,\ldots,20\}\) contain at least one multiple of \(5\)?
Subtract subsets with no multiples of \(5\).
Total: \(\binom{20}{4}=4845\). There are \(16\) numbers not divisible by \(5\), so subsets with no multiple of \(5\): \(\binom{16}{4}=1820\). Answer: \(3025\).
From \(6\) boys and \(5\) girls, a team of \(5\) is chosen. How many teams have more boys than girls?
Possible numbers of boys are \(3,4,5\).
Cases: \(3\) boys and \(2\) girls: \(\binom{6}{3}\binom{5}{2}=200\); \(4\) boys and \(1\) girl: \(\binom{6}{4}\binom{5}{1}=75\); \(5\) boys: \(\binom{6}{5}=6\). Total: \(281\).
There are \(9\) marked points on a circle. How many triangles with vertices among these points can be formed?
Any three points on a circle form a triangle.
Choose \(3\) vertices from \(9\). Answer: \(\binom{9}{3}=84\).
How many nonnegative integer solutions does \(x+y+z=12\) have if \(x\ge2\), \(y\ge3\)?
Set \(x'=x-2\), \(y'=y-3\).
Let \(x'=x-2\), \(y'=y-3\). Then \(x'+y'+z=7\), all variables nonnegative. The number of solutions is \(\binom{9}{2}=36\).
There are \(10\) red and \(8\) blue balls. In how many ways can \(5\) balls be chosen with at least \(3\) red balls?
Split into \(3,4,5\) red balls.
Cases: \(3\) red and \(2\) blue: \(\binom{10}{3}\binom{8}{2}=3360\); \(4\) red and \(1\) blue: \(\binom{10}{4}\binom{8}{1}=1680\); \(5\) red: \(\binom{10}{5}=252\). Total: \(5292\).
Prove combinatorially that \(C(r,r)+C(r+1,r)+\cdots+C(n,r)=C(n+1,r+1)\).
Count \((r+1)\)-element subsets by their largest element.
Consider all \((r+1)\)-element subsets of \(\{1,\ldots,n+1\}\). There are \(C(n+1,r+1)\). If the largest element is \(t+1\), where \(r\le t\le n\), then the other \(r\) elements are chosen from the first \(t\) elements: \(C(t,r)\) ways. Summing over \(t\) gives the left side.
How many \(5\)-element subsets of \(\{1,\ldots,15\}\) contain \(1\) and contain no consecutive numbers?
If \(1\) is chosen, \(2\) is forbidden.
After choosing \(1\), choose \(4\) more numbers from \(\{3,\ldots,15\}\) with no adjacency. This is an interval of length \(13\). The number of ways to choose \(4\) nonconsecutive elements from \(13\) is \(\binom{13-4+1}{4}=\binom{10}{4}=210\).
From \(8\) boys and \(7\) girls, a team of \(6\) is chosen. How many teams have at least \(2\) boys and at least \(2\) girls?
Split by the number of boys: \(2,3,4\).
The possibilities are \(2\) boys and \(4\) girls, \(3\) and \(3\), \(4\) and \(2\). We get \(\binom{8}{2}\binom{7}{4}+\binom{8}{3}\binom{7}{3}+\binom{8}{4}\binom{7}{2}=28\cdot35+56\cdot35+70\cdot21=4410\).
Prove that among any \(7\) subsets of \(\{1,2,3,4\}\), there are two such that one contains the other.
Split all \(16\) subsets into \(6\) inclusion chains.
It is enough to split all subsets into \(6\) chains, because then \(7\) chosen subsets hit one chain twice by the pigeonhole principle. For example, take the chains \(\varnothing\subset\{1\}\subset\{1,2\}\subset\{1,2,3\}\subset\{1,2,3,4\}\); \(\{2\}\subset\{2,3\}\subset\{2,3,4\}\); \(\{3\}\subset\{1,3\}\subset\{1,3,4\}\); \(\{4\}\subset\{1,4\}\subset\{1,2,4\}\); and the singleton chains \(\{2,4\}\), \(\{3,4\}\). Any two sets in one chain are comparable by inclusion.
Ladders