Chapter

Advanced Double Counting

This module develops double counting into counting pairs, triples, incidences, intersections, and inequalities through averages.
Log in to track solved progress and bookmarks.

Theory

Key Idea

Double counting means choosing one set of objects and counting it in two ways. In advanced problems, the objects are often not the original items, but pairs, triples, incidences, intersections, or paths.

The method is especially strong when direct counting is hard, but row sums equal column sums, and an average value forces the existence of a “good” object.

Basic Facts

  • If \(I=\{(x,A):x\in A\}\), then \(|I|=\sum_A |A|=\sum_x d(x)\), where \(d(x)\) is the number of sets containing \(x\).
  • Average: if a total \(S\) is distributed among \(n\) objects, then some object has value at least \(\frac Sn\).
  • The number of pairs of elements inside sets is \(\sum_A \binom{|A|}{2}\).
  • If each pair of elements can occur at most once, then \(\sum_A \binom{|A|}{2}\le\binom n2\).
  • In a graph, the sum of degrees is \(2E\).

When to Use This Method

Use it when the statement involves “each object is connected to…”, rows and columns, set systems, intersections, acquaintances, tournaments, paths of length \(2\), or proving existence through an average.

How to Recognise the Method

Look for hidden pairs: “an element belongs to a set”, “a student solved a problem”, “a vertex is incident to an edge”, or “two rows share a marked column”. If such pairs can be counted from both sides, it is very likely a double-counting problem.

Typical Mistakes

  • Counting the original objects instead of the right pairs or triples.
  • Forgetting that one object may be counted several times.
  • Using an average without converting to an integer: \(\lceil x\rceil\) or a strict estimate may be needed.
  • Confusing “at most one common element” with “exactly one common element”.
  • Proving only an identity without connecting it to the required existence statement.

Mini-Checklist

  • Name the object being counted: pairs, triples, incidences.
  • Count it “by the left objects” and “by the right objects”.
  • If an estimate is needed, replace exact counting with an inequality.
  • If existence is needed, compare with the average.
  • Check that repeated counting is intentional and controlled.

Examples

Example 1. Incidences

The most basic form of double counting.

Problem. In a class of \(24\) students, each student attends exactly \(3\) clubs. Prove that if there are \(8\) clubs, then some club has at least \(9\) students.

Solution.

Count pairs \((student, club)\) where the student attends the club. By students, there are \(24\cdot3=72\) such pairs. By clubs, the average number of students is \(\frac{72}{8}=9\). Hence some club has at least \(9\) students.

Comment. We do not need the exact distribution among clubs; the total number of incidences is enough.

Example 2. Sum of Degrees

Graphs are a natural language for many relation problems.

Problem. Prove that in every graph, the number of vertices of odd degree is even.

Solution.

The sum of all degrees equals \(2E\), where \(E\) is the number of edges, because each edge contributes \(1\) to the degrees of its two endpoints. Thus the degree sum is even. The sum of even degrees is even, so the sum of odd degrees is also even. This is possible only if the number of odd summands is even.

Comment. This double-counts pairs \((vertex, edge)\) where the vertex is incident to the edge.

Example 3. Average by Elements

Often we need to prove the existence of an element with large load.

Problem. There are \(m\) subsets of an \(n\)-element set, each of size at least \(r\). Prove that some element belongs to at least \(\left\lceil\frac{mr}{n}\right\rceil\) subsets.

Solution.

Count pairs \((x,A)\), where \(x\in A\). By sets, there are at least \(mr\) such pairs. By elements, this is the sum of \(d(x)\), where \(d(x)\) is the number of sets containing \(x\). The average \(d(x)\) is at least \(\frac{mr}{n}\), so some \(d(x)\) is at least the ceiling of this number.

Comment. This is the standard average argument.

Example 4. An Identity by Selection

A combinatorial identity is best proved by counting objects.

Problem. Prove \(\sum_{k=0}^{n} k\binom nk=n2^{n-1}\).

Solution.

Count pairs \((A,x)\), where \(A\subseteq\{1,\ldots,n\}\) and \(x\in A\). If we first choose \(A\) of size \(k\), we get \(\sum k\binom nk\). If we first choose \(x\), there are \(n\) choices, and the remaining elements of \(A\) can be chosen freely: \(2^{n-1}\) choices. Total: \(n2^{n-1}\).

Comment. The left side groups by subset size, the right side by the marked element.

Example 5. Pairs Inside Sets

Moving from elements to pairs makes the method much stronger.

Problem. There are \(m\) subsets of size \(k\) in an \(n\)-element set. Any two subsets have at most one common element. Prove \(m\binom{k}{2}\le\binom n2\).

Solution.

Count pairs \((\{x,y\},A)\), where \(x,y\in A\), \(x\ne y\). Each set \(A\) gives \(\binom{k}{2}\) pairs, so the total is \(m\binom{k}{2}\). On the other hand, any pair \(\{x,y\}\) can lie in at most one of the given sets; otherwise two sets would share two elements. Hence the number is at most \(\binom n2\).

Comment. This is a typical double-counting inequality.

Example 6. A Zero-One Table

Rows and columns often give two natural counts.

Problem. In a \(10\times10\) table, \(46\) cells are marked. Prove that some row or column contains at least \(5\) marked cells.

Solution.

Count pairs \((marked cell, line)\), where the line is a row or column containing the cell. Each marked cell lies on exactly two lines, so there are \(92\) pairs. There are \(20\) lines, so the average number of marked cells on a line is \(4.6\). Therefore some line contains at least \(5\) marked cells.

Comment. Sometimes it is better to count all rows and columns together.

Example 7. Average Intersection

Intersections of set families are counted through element degrees.

Problem. There are \(8\) three-element subsets of a \(5\)-element set. Prove that two of them intersect in at least two elements.

Solution.

Let \(d(x)\) be the number of chosen subsets containing element \(x\). Then \(\sum d(x)=8\cdot3=24\). The number of triples \((x,\{A,B\})\), where \(x\in A\cap B\), is \(\sum_x\binom{d(x)}2\). With total \(24\) over \(5\) elements, this sum is minimised by the balanced distribution \(5,5,5,5,4\), giving \(46\). There are only \(\binom82=28\) pairs of subsets. If every intersection had size at most \(1\), the sum of all pairwise intersection sizes would be at most \(28\), a contradiction.

Comment. This example combines double counting with convexity.

Example 8. Triples

Sometimes the correct object is a triple, not a pair.

Problem. Prove \(\sum_{A\subseteq[n]}\binom{|A|}{2}=\binom n2 2^{n-2}\).

Solution.

Count pairs \((A,\{x,y\})\), where \(A\subseteq[n]\) and \(x,y\in A\). If we first choose \(A\), we get the left side. If we first choose the pair \(\{x,y\}\), there are \(\binom n2\) choices, and each of the remaining \(n-2\) elements may be included or not: \(2^{n-2}\) choices.

Comment. Such identities train the choice of the object being counted.

Problems

Problems

#1.1
#1.1

Number of Odd Degrees

Double counting Grade 8 Grade 9 ★★☆☆☆

Prove that in every finite graph, the number of vertices of odd degree is even.

Details
Problem: COM-B2-M01-P001
Difficulty: Level 2 of 5
Tag: Double counting
Grade: Grade 8, Grade 9
#1.2
#1.2

A Club with Many Members

Average Grade 8 Grade 9 ★★☆☆☆

A school has \(120\) students and \(15\) clubs. Each student attends exactly \(4\) clubs. Prove that some club has at least \(32\) students.

Details
Problem: COM-B2-M01-P002
Difficulty: Level 2 of 5
Tag: Average
Grade: Grade 8, Grade 9
#1.3
#1.3

A Marked Line

Average Grade 8 Grade 9 ★★☆☆☆

In a \(12\times12\) table, \(70\) cells are marked. Prove that some row or column contains at least \(6\) marked cells.

Details
Problem: COM-B2-M01-P003
Difficulty: Level 2 of 5
Tag: Average
Grade: Grade 8, Grade 9
#1.4
#1.4

All Subsets

Double counting Grade 8 Grade 9 ★★☆☆☆

Give a combinatorial proof of \(\sum_{k=0}^{n}\binom nk=2^n\).

Details
Problem: COM-B2-M01-P004
Difficulty: Level 2 of 5
Tag: Double counting
Grade: Grade 8, Grade 9
#1.5
#1.5

A Marked Element

Double counting Grade 8 Grade 9 ★★☆☆☆

Prove \(\sum_{k=0}^n k\binom nk=n2^{n-1}\).

Details
Problem: COM-B2-M01-P005
Difficulty: Level 2 of 5
Tag: Double counting
Grade: Grade 8, Grade 9
#1.6
#1.6

An Element in Many Sets

Average Grade 9 Grade 10 ★★★☆☆

There are \(18\) subsets of a \(10\)-element set, each having at least \(4\) elements. Prove that some element belongs to at least \(8\) subsets.

Details
Problem: COM-B2-M01-P006
Difficulty: Level 3 of 5
Tag: Average
Grade: Grade 9, Grade 10
#1.7
#1.7

A Large Degree

Average Grade 9 Grade 10 ★★★☆☆

A simple graph has \(n\) vertices and more than \(\frac{(r-1)n}{2}\) edges. Prove that some vertex has degree at least \(r\).

Details
Problem: COM-B2-M01-P007
Difficulty: Level 3 of 5
Tag: Average
Grade: Grade 9, Grade 10
#1.8
#1.8

Tournament Wins

Average Grade 9 Grade 10 ★★★☆☆

In a tournament, each of \(n\) players played each other exactly once, with no draws. Prove that some player won at least \(\frac{n-1}{2}\) games, and some player won at most \(\frac{n-1}{2}\) games.

Details
Problem: COM-B2-M01-P008
Difficulty: Level 3 of 5
Tag: Average
Grade: Grade 9, Grade 10
#1.9
#1.9

Two Marked Points

Double counting Grade 9 Grade 10 ★★★☆☆

Prove the identity \(\sum_{k=0}^n \binom{k}{2}\binom nk=\binom n2 2^{n-2}\).

Details
Problem: COM-B2-M01-P009
Difficulty: Level 3 of 5
Tag: Double counting
Grade: Grade 9, Grade 10
#1.10
#1.10

Common Marked Columns

Double counting Grade 9 Grade 10 ★★★☆☆

In a \(6\times6\) table, exactly \(3\) cells are marked in each row. Prove that there are two columns that are marked together in at least two rows.

Details
Problem: COM-B2-M01-P010
Difficulty: Level 3 of 5
Tag: Double counting
Grade: Grade 9, Grade 10
#1.11
#1.11

Two Sets with Large Intersection

Average Grade 9 Grade 10 ★★★☆☆

There are \(8\) three-element subsets of a \(5\)-element set. Prove that two of them have at least two common elements.

Details
Problem: COM-B2-M01-P011
Difficulty: Level 3 of 5
Tag: Average
Grade: Grade 9, Grade 10
#1.12
#1.12

Many Solved Problems

Average Grade 9 Grade 10 ★★★☆☆

At an olympiad, there are \(30\) participants and \(6\) problems. Each participant solved at least \(3\) problems. Prove that some problem was solved by at least \(15\) participants.

Details
Problem: COM-B2-M01-P012
Difficulty: Level 3 of 5
Tag: Average
Grade: Grade 9, Grade 10
#1.13
#1.13

Almost Disjoint Blocks

Sets Grade 9 Grade 10 ★★★★☆

In an \(n\)-element set, \(m\) subsets of size \(k\) are chosen. Any two chosen subsets have at most one common element. Prove that \(m\binom{k}{2}\le\binom n2\).

Details
Problem: COM-B2-M01-P013
Difficulty: Level 4 of 5
Tag: Sets
Grade: Grade 9, Grade 10
#1.14
#1.14

Rows with Limited Intersections

Rows Columns Grade 9 Grade 10 ★★★★☆

In an \(n\times n\) table, exactly \(r\) cells are marked in each row. Any two columns are marked together in at most one row. Prove that \(n\binom r2\le\binom n2\).

Details
Problem: COM-B2-M01-P014
Difficulty: Level 4 of 5
Tag: Rows Columns
Grade: Grade 9, Grade 10
#1.15
#1.15

Paths of Length Two

Double counting Grade 10 Grade 11 ★★★★☆

In a graph, the vertex degrees are \(d_1,\ldots,d_n\). Prove that the number of unordered paths of length \(2\) is \(\sum_{i=1}^n\binom{d_i}{2}\).

Details
Problem: COM-B2-M01-P015
Difficulty: Level 4 of 5
Tag: Double counting
Grade: Grade 10, Grade 11
#1.16
#1.16

Common Solved Problems

Average Grade 10 Grade 11 ★★★★☆

There are \(21\) students and \(10\) problems. Each student solved at least \(6\) problems. Prove that two students solved at least \(4\) common problems.

Details
Problem: COM-B2-M01-P016
Difficulty: Level 4 of 5
Tag: Average
Grade: Grade 10, Grade 11
#1.17
#1.17

Large Intersection Among Many Sets

Double counting Grade 10 Grade 11 ★★★★☆

In a \(20\)-element set, \(30\) subsets of size \(6\) are chosen. Prove that two of them intersect in at least two elements.

Details
Problem: COM-B2-M01-P017
Difficulty: Level 4 of 5
Tag: Double counting
Grade: Grade 10, Grade 11
#1.18
#1.18

Generalisation to \((t+1)\)-Subsets

Sets Grade 10 Grade 11 ★★★★★

Suppose \(m\) subsets of size \(k\) are chosen in an \(n\)-element set. Any two chosen subsets have at most \(t\) common elements. Prove that \(m\binom{k}{t+1}\le\binom{n}{t+1}\).

Details
Problem: COM-B2-M01-P018
Difficulty: Level 5 of 5
Tag: Sets
Grade: Grade 10, Grade 11
#1.19
#1.19

Many Paths of Length Two

Double counting Grade 10 Grade 11 ★★★★★

A graph has \(n\) vertices and \(m\) edges. Prove that the number of length-\(2\) paths is at least \(n\binom{\frac{2m}{n}}{2}\), where \(\binom{x}{2}=\frac{x(x-1)}2\). Explain why this implies: if the average degree is greater than \(r\), then some vertex lies in more than \(\binom r2\) length-\(2\) paths as the middle vertex.

Details
Problem: COM-B2-M01-P019
Difficulty: Level 5 of 5
Tag: Double counting
Grade: Grade 10, Grade 11
#1.20
#1.20

Strong Intersection Through an Average

Double counting Grade 10 Grade 11 ★★★★★

Let \(A_1,\ldots,A_m\) be subsets of an \(n\)-element set, each of size at least \(r\). Prove that there exist two sets \(A_i,A_j\) such that

\[\left|A_i\cap A_j\right|\ge \frac{r(mr-n)}{n(m-1)}.\]

Details
Problem: COM-B2-M01-P020
Difficulty: Level 5 of 5
Tag: Double counting
Grade: Grade 10, Grade 11

Ladders

No published ladders were found.
Next Chapter