What is the VC dimension of axis-aligned rectangles in , and how do you prove it?
Learning theory, VC dimension
Level L3 Intermediate. Length Medium. Nature Th+Mat Both.
What's being asked
Whether you can construct a shattered configuration and find an argument that rules out every set of five points.
Key idea
A "diamond" of points can be shattered, and among any points the extreme points (leftmost, rightmost, lowest, highest) force the remaining point inside their bounding box. So .
Steps
- Lower bound: take , , , . For each subset, the smallest rectangle containing it must contain no other chosen point.
- Check subsets: a single point gets a tiny rectangle. gets a thin rectangle around , which misses and since they are at . gets , which contains neither nor . Three points such as get , which excludes . All four get the big square. The empty set gets a rectangle elsewhere. So all labellings occur and .
- Upper bound: take any points. Choose up to of them as extreme: one with the smallest , one with the largest , one with the smallest and one with the largest (ties broken arbitrarily).
- At least one of the points is not chosen. It lies inside the bounding box of the chosen points.
- Consider the labelling with all chosen points positive and this extra point negative. Any rectangle containing the chosen points contains their bounding box, hence the extra point. So the labelling is impossible, no points are shattered, and .
Common mistakes
- Placing the four points in a way that cannot be shattered, for example four collinear points. A shattered set needs a good configuration (the diamond). Only one configuration is needed.
- Proving the upper bound only for one set of five points. The extremes argument works for every set.
- Forgetting the labelling of the empty set, or of the whole set.
How long your answer should be
Half a page; 4–5 minutes.
Last checked on 4 December 2026.
Read this
Previous in Learning theory: In AdaBoost each weak learner has weighted error . Using the bound on training error, how many rounds guarantee training error below ? How does the exact product of the compare with the bound?
Next in Learning theory: How do you prove the perceptron convergence theorem (Novikoff): if and some unit vector has for all , then the perceptron makes at most mistakes?