Let (S,R)(S, R) be a set system, where SS is a set and RR is a collection of subsets in SS.

Definition. Given (S,R)(S, R), X⊂SX \subset S is shattered by RR if,

∀X′⊂X, ∃R′∈R,  such that X′=S∩R′. \forall X' \subset X,\, \exists R' \in R,\, \text{ such that } X' = S \cap R'.

Definition. The VC dimension of (S,R)(S, R) is the maximum cardinality of some X⊂SX \subset S that is shattered by RR.

Note: If we view (S,R)(S, R) as a classification problem, i.e., SS is a set of points and RR a set of functions, the VC dimension dd is the maximum size of a subset XX in which RR could separate arbitrary set points from the rest. In some sense, it measures how complex a separation plane RR could form.

Definition. Given a nonnegative integer nn and dd, we define (n≤d)=∑i=0d(ni)\binom{n}{\le d} = \sum_{i = 0}^{d} \binom{n}{i}

Lemma. If (S,R)(S, R) has VCVC dimension dd, then ∣R∣≤(n≤d)|R| \le \binom{n}{\le d}, where ∣S∣=n|S| = n.

Proof. Let X⊂SX \subset S be the set that has size dd and is shattered by RR. Define R∣XR|X as {R′∩X∣R′∈R}\{R' \cap X | R' \in R \}. It is obvious that (X,R∣X)(X, R|X) has VC dimension dd. Also, the number of subset of XX is given by

2d=(d≤d)=∣ R∣X ∣ 2^d = \binom{d}{\le d} = |\ R|X\ |

Now we will show this lemma by induction. Label the elements in S−XS - X in arbitrary order as {xd+1,xd+2,...,xn}\{ x_{d + 1}, x_{d + 2}, ..., x_{n} \}. Define XiX_i = X∪{xd+1,xd+2,...,xd+i}X \cup \{x_{d+1}, x_{d + 2}, ..., x_{d+i} \} for 0≤i≤n−d0 \le i \le n - d, where X0=XX_0 = X. So ∣Xi∣=d+i|X_i| = d + i. We will show that ∣R∣Xi∣≤(d+i≤d)|R | X_i| \le \binom{d + i} {\le d} holds.

Suppose the assumption holds for R∣XiR|X_i, now consider R∣Xi+1R|X_{i + 1}. The elements rr in R∣XiR|X_{i} can be divided into

  1. D1={r∣r∈R∣Xi+1,r∪xd+1∈R∣Xi+1}D_1 = \{ r | r \in R | X_{i + 1}, r \cup x_{d + 1} \in R|X_{i + 1} \}.
  2. D2={r∣r∉R∣Xi+1,r∪xd+1∈R∣Xi+1}D_2 = \{ r | r \notin R | X_{i + 1}, r \cup x_{d + 1} \in R|X_{i + 1} \}.
  3. D2={r∣r∈R∣Xi+1,r∪xd+1∉R∣Xi+1}D_2 = \{ r | r \in R | X_{i + 1}, r \cup x_{d + 1} \notin R|X_{i + 1} \}.

We can verify that ∣R∣Xi∣=∣D1∣+∣D2∣+∣D3∣|R|X_i | = |D_1| + |D_2| + |D_3|, ∣R∣Xi+1∣=2∣D1∣+∣D2∣+∣D3∣|R|X_{i + 1}| = 2|D_1| + |D_2| + |D_3|.

We show that ∣D1∣≤(d+i≤d−1)|D_1| \le \binom{d + i}{\le d - 1}. This is because the VC dimension of (Xi,D1)(X_i, D_1) is at most d−1d - 1. Otherwise, suppose Y⊂XiY \subset X_i is shattered by D1D_1 and ∣Y∣=d|Y| = d. It is apparent Y∪xd+1Y \cup x_{d + 1} is shattered by R∣Xi+1R|X_{i + 1} in Xi+1X_{i + 1}. A contradiction.

Therefore,

∣R∣Xi+1∣=∣D1∣+∣R∣Xi∣≤(d+i≤d−1)+(d+i≤d)=∑j=0d−1(d+ij)+∑j=0d(d+ij)=∑j=1d(d+ij−1)+∑j=1d(d+ij)+(d+i0)=∑j=1d(d+i+1j)+(d+i+10)=∑j=0d(d+i+1j)=(d+i+1≤d). \begin{aligned} |R | X_{i + 1}| & = |D_1| + |R | X_{i}| \\ & \le \binom{d + i}{\le d - 1} + \binom{d + i}{\le d} \\ & = \sum_{j = 0}^{d - 1} \binom{d + i}{j} + \sum_{j = 0}^{d}\binom{d +i}{j} \\ & = \sum_{j = 1}^{d} \binom{d + i}{j - 1} + \sum_{j = 1}^{d}\binom{d +i}{j} + \binom{d + i}{0} \\ & = \sum_{j = 1}^d \binom{d + i + 1}{j} + \binom{d + i +1}{0} \\ & = \sum_{j = 0}^d \binom{d + i + 1}{j} \\ & = \binom{d + i + 1}{\le d}. \end{aligned}