Why is VCdim⁡(H)≤log⁡2∣H∣ for a finite class H, and is the bound tight?

Learning theory, VC dimension
Level L2 Elementary. Length Short. Nature Th+Mat Both.

What's being asked

Whether you can connect shattering to a counting argument on the number of hypotheses.

Key idea

Shattering d points needs 2d distinct labellings, each produced by a different hypothesis, so 2d≤∣H∣.

Steps

  1. Suppose H shatters a set C of size d. Then every one of the 2d labellings of C is produced by some h∈H.
  2. Two hypotheses that give different labellings of C are different functions. So H contains at least 2d distinct hypotheses: ∣H∣≥2d.
  3. Take log⁡2: d≤log⁡2∣H∣. This holds for every shattered set, so VCdim⁡(H)≤log⁡2∣H∣.
  4. Tightness: the class of all functions on d points has ∣H∣=2d and VC dimension d, so equality can hold. It can be very loose: thresholds on n ordered points have n+1 hypotheses on those points but VC dimension 1.

Common mistakes

How long your answer should be

3–4 sentences; about 1 minute.

Last checked on 4 December 2026.

Read this

Previous in Learning theory: In kernel ridge regression, predictions take the form f(x)=∑i=1nαik(xi,x) with weights α=(K+λI)−1y, where Kij=k(xi,xj) is the kernel matrix, y is the vector of targets, λ>0 is the regularisation parameter and I is the identity matrix. For two training points with K=(10.50.51), y=(1,0)⊤ and λ=0.5, what are α and the prediction f(x) at a new point with k(x1,x)=0.8 and k(x2,x)=0.2?
Next in Learning theory: Linear classifiers x↦sign⁡(w⋅x) with ∥w∥≤1 are trained on m=104 points with ∥x∥≤R=1. A classifier has margin at least ρ=0.1 on 95% of the training points. Using LD≤L^ρ+2Rρm+ln⁡(1/δ)2m with δ=0.05, what true-error bound do you get? What if m were four times larger?