# Sauer–Shelah lemma

In combinatorial mathematics and extremal set theory, the Sauer–Shelah lemma states that every family of sets with small VC dimension consists of a small number of sets. It is named after Norbert Sauer and Saharon Shelah, who published it independently of each other in 1972.[1][2] The same result was also published slightly earlier and again independently, by Vladimir Vapnik and Alexey Chervonenkis, after whom the VC dimension is named.[3] In his paper containing the lemma, Shelah gives credit also to Micha Perles,[2] and for this reason the lemma has also been called the Perles–Sauer–Shelah lemma and the Sauer–Shelah–Perles lemma.[4][5]

Buzaglo et al. call this lemma "one of the most fundamental results on VC-dimension",[4] and it has applications in many areas. Sauer's motivation was in the combinatorics of set systems, while Shelah's was in model theory and that of Vapnik and Chervonenkis was in statistics. It has also been applied in discrete geometry[6] and graph theory.[7]

## Definitions and statement

If ${\displaystyle \textstyle {\mathcal {F}}=\{S_{1},S_{2},\dots \}}$ is a family of sets and ${\displaystyle T}$ is a set, then ${\displaystyle T}$ is said to be shattered by ${\displaystyle {\mathcal {F}}}$ if every subset of ${\displaystyle T}$ (including the empty set and ${\displaystyle T}$ itself) can be obtained as the intersection ${\displaystyle T\cap S_{i}}$ of ${\displaystyle T}$ with some set ${\displaystyle S_{i}}$ in the family. The VC dimension of ${\displaystyle {\mathcal {F}}}$ is the largest cardinality of a set shattered by ${\displaystyle {\mathcal {F}}}$.

In terms of these definitions, the Sauer–Shelah lemma states that if ${\displaystyle {\mathcal {F}}}$ is a family of sets whose union has ${\displaystyle n}$ elements, and if the number of sets in the family, ${\displaystyle |{\mathcal {F}}|}$, obeys the inequality ${\displaystyle |{\mathcal {F}}|>\sum _{i=0}^{k-1}{\binom {n}{i}},}$ then ${\displaystyle {\mathcal {F}}}$ shatters a set of size ${\displaystyle k}$. Equivalently, if the VC dimension of ${\displaystyle {\mathcal {F}}}$ is ${\displaystyle k,}$ then ${\displaystyle {\mathcal {F}}}$ can consist of at most ${\displaystyle \sum _{i=0}^{k}{\binom {n}{i}}=O(n^{k})}$ sets, as expressed using big O notation.

The bound of the lemma is tight: Let the family ${\displaystyle {\mathcal {F}}}$ be composed of all subsets of ${\displaystyle \{1,2,\dots ,n\}}$ with size less than ${\displaystyle k}$. Then the size of ${\displaystyle {\mathcal {F}}}$ is exactly ${\textstyle \sum _{i=0}^{k-1}{\binom {n}{i}}}$ but it does not shatter any set of size ${\displaystyle k}$.[8]

## The number of shattered sets

A strengthening of the Sauer–Shelah lemma, due to Pajor (1985), states that every finite set family ${\displaystyle {\mathcal {F}}}$ shatters at least ${\displaystyle |{\mathcal {F}}|}$ sets.[9] This immediately implies the Sauer–Shelah lemma, because only ${\textstyle \sum _{i=0}^{k-1}{\tbinom {n}{i}}}$ of the subsets of an ${\displaystyle n}$-item universe have cardinality less than ${\displaystyle k}$. Thus, when ${\displaystyle |{\mathcal {F}}|>\sum _{i=0}^{k-1}{\binom {n}{i}},}$ there are not enough small sets to be shattered, so one of the shattered sets must have cardinality at least ${\displaystyle k}$.

For a restricted type of shattered set, called an order-shattered set, the number of shattered sets always equals the cardinality of the set family.[10]

## Proof

Pajor's variant of the Sauer–Shelah lemma may be proved by mathematical induction; the proof has variously been credited to Noga Alon[11] or to Ron Aharoni and Ron Holzman.[10]

Base
Every family of only one set shatters the empty set.
Step
Assume the lemma is true for all families of size less than ${\displaystyle |{\mathcal {F}}|}$ and let ${\displaystyle {\mathcal {F}}}$ be a family of two or more sets. Let ${\displaystyle x}$ be an element that belongs to some but not all of the sets in ${\displaystyle {\mathcal {F}}}$. Split ${\displaystyle {\mathcal {F}}}$ into two subfamilies, of the sets that contain ${\displaystyle x}$ and the sets that do not contain ${\displaystyle x}$. By the induction assumption, these two subfamilies shatter two collections of sets whose sizes add to at least ${\displaystyle |{\mathcal {F}}|}$. None of these shattered sets contain ${\displaystyle x}$, since a set that contains ${\displaystyle x}$ cannot be shattered by a family in which all sets contain ${\displaystyle x}$ or all sets do not contain ${\displaystyle x}$. Some of the shattered sets may be shattered by both subfamilies. When a set ${\displaystyle S}$ is shattered by only one of the two subfamilies, it contributes one unit both to the number of shattered sets of the subfamily and to the number of shattered sets of ${\displaystyle {\mathcal {F}}}$. When a set ${\displaystyle S}$ is shattered by both subfamilies, both ${\displaystyle S}$ and ${\displaystyle S\cup \{x\}}$ are shattered by ${\displaystyle {\mathcal {F}}}$, so ${\displaystyle S}$ contributes two units to the number of shattered sets of the subfamilies and of ${\displaystyle {\mathcal {F}}}$. Therefore, the number of shattered sets of ${\displaystyle {\mathcal {F}}}$ is at least equal to the number shattered by the two subfamilies of ${\displaystyle {\mathcal {F}}}$, which is at least ${\displaystyle |{\mathcal {F}}|}$.

A different proof of the Sauer–Shelah lemma in its original form, by Péter Frankl and János Pach, is based on linear algebra and the inclusion–exclusion principle.[6][8] This proof extends to other settings such as families of vector spaces and, more generally, geometric lattices.[5]

## Applications

The original application of the lemma, by Vapnik and Chervonenkis, was in showing that every probability distribution can be approximated (with respect to a family of events of a given VC dimension) by a finite set of sample points whose cardinality depends only on the VC dimension of the family of events. In this context, there are two important notions of approximation, both parameterized by a number ${\displaystyle \varepsilon }$: a set ${\displaystyle S}$ of samples, and a probability distribution on ${\displaystyle S}$, is said to be an ${\displaystyle \varepsilon }$-approximation of the original distribution if the probability of each event with respect to ${\displaystyle S}$ differs from its original probability by at most ${\displaystyle \varepsilon }$. A set ${\displaystyle S}$ of (unweighted) samples is said to be an ${\displaystyle \varepsilon }$-net if every event with probability at least ${\displaystyle \varepsilon }$ includes at least one point of ${\displaystyle S}$. An ${\displaystyle \varepsilon }$-approximation must also be an ${\displaystyle \varepsilon }$-net but not necessarily vice versa.

Vapnik and Chervonenkis used the lemma to show that set systems of VC dimension ${\displaystyle d}$ always have ${\displaystyle \varepsilon }$-approximations of cardinality ${\displaystyle O({\tfrac {d}{\varepsilon ^{2}}}\log {\tfrac {d}{\varepsilon }}).}$ Later authors including Haussler & Welzl (1987)[12] and Komlós, Pach & Woeginger (1992)[13] similarly showed that there always exist ${\displaystyle \varepsilon }$-nets of cardinality ${\displaystyle O({\tfrac {d}{\varepsilon }}\log {\tfrac {1}{\varepsilon }})}$, and more precisely of cardinality at most[6] ${\displaystyle {\tfrac {d}{\varepsilon }}\ln {\tfrac {1}{\varepsilon }}+{\tfrac {2d}{\varepsilon }}\ln \ln {\tfrac {1}{\varepsilon }}+{\tfrac {6d}{\varepsilon }}.}$ The main idea of the proof of the existence of small ${\displaystyle \varepsilon }$-nets is to choose a random sample ${\displaystyle x}$ of cardinality ${\textstyle O({\tfrac {d}{\varepsilon }}\log {\tfrac {1}{\varepsilon }})}$ and a second independent random sample ${\displaystyle y}$ of cardinality ${\textstyle O({\tfrac {d}{\varepsilon }}\log ^{2}{\tfrac {1}{\varepsilon }})}$, and to bound the probability that ${\displaystyle x}$ is missed by some large event ${\displaystyle E}$ by the probability that ${\displaystyle x}$ is missed and simultaneously the intersection of ${\displaystyle y}$ with ${\displaystyle E}$ is larger than its median value. For any particular ${\displaystyle E}$, the probability that ${\displaystyle x}$ is missed while ${\displaystyle y}$ is larger than its median is very small, and the Sauer–Shelah lemma (applied to ${\displaystyle x\cup y}$) shows that only a small number of distinct events ${\displaystyle E}$ need to be considered, so by the union bound, with nonzero probability, ${\displaystyle x}$ is an ${\displaystyle \varepsilon }$-net.[6]

In turn, ${\displaystyle \varepsilon }$-nets and ${\displaystyle \varepsilon }$-approximations, and the likelihood that a random sample of large enough cardinality has these properties, have important applications in machine learning, in the area of probably approximately correct learning.[14] In computational geometry, they have been applied to range searching,[12] derandomization,[15] and approximation algorithms.[16][17]

Kozma & Moran (2013) use generalizations of the Sauer–Shelah lemma to prove results in graph theory such as that the number of strong orientations of a given graph is sandwiched between its numbers of connected and 2-edge-connected subgraphs.[7]

## References

1. ^ Sauer, N. (1972), "On the density of families of sets", Journal of Combinatorial Theory, Series A, 13: 145–147, doi:10.1016/0097-3165(72)90019-2, MR 0307902.
2. ^ a b Shelah, Saharon (1972), "A combinatorial problem; stability and order for models and theories in infinitary languages", Pacific Journal of Mathematics, 41: 247–261, doi:10.2140/pjm.1972.41.247, MR 0307903, archived from the original on 2013-10-05.
3. ^ Vapnik, V. N.; Červonenkis, A. Ja. (1971), "The uniform convergence of frequencies of the appearance of events to their probabilities", Akademija Nauk SSSR, 16: 264–279, MR 0288823.
4. ^ a b Buzaglo, Sarit; Pinchasi, Rom; Rote, Günter (2013), "Topological hypergraphs", in Pach, János (ed.), Thirty Essays on Geometric Graph Theory, Springer, pp. 71–81, doi:10.1007/978-1-4614-0110-0_6.
5. ^ a b Cambie, Stijn; Chornomaz, Bogdan; Dvir, Zeev; Filmus, Yuval; Moran, Shay (2020), "A Sauer–Shelah–Perles lemma for lattices", Electronic Journal of Combinatorics, 27 (4): P4.19, arXiv:1807.04957, doi:10.37236/9273.
6. ^ a b c d Pach, János; Agarwal, Pankaj K. (1995), Combinatorial geometry, Wiley-Interscience Series in Discrete Mathematics and Optimization, New York: John Wiley & Sons Inc., p. 247, doi:10.1002/9781118033203, ISBN 0-471-58890-3, MR 1354145.
7. ^ a b Kozma, László; Moran, Shay (2013), "Shattering, Graph Orientations, and Connectivity", Electronic Journal of Combinatorics, 20 (3), P44, arXiv:1211.1319, Bibcode:2012arXiv1211.1319K, MR 3118952.
8. ^ a b Gowers, Timothy (July 31, 2008), "Dimension arguments in combinatorics", Gowers's Weblog: Mathematics related discussions, Example 3.
9. ^ Pajor, Alain (1985), Sous-espaces ${\displaystyle l_{1}^{n}}$ des espaces de Banach, Travaux en Cours [Works in Progress], vol. 16, Paris: Hermann, ISBN 2-7056-6021-6, MR 0903247. As cited by Anstee, Rónyai & Sali (2002).
10. ^ a b Anstee, R. P.; Rónyai, Lajos; Sali, Attila (2002), "Shattering news", Graphs and Combinatorics, 18 (1): 59–73, doi:10.1007/s003730200003, MR 1892434.
11. ^ Kalai, Gil (September 28, 2008), "Extremal Combinatorics III: Some Basic Theorems", Combinatorics and More.
12. ^ a b Haussler, David; Welzl, Emo (1987), "${\displaystyle \varepsilon }$-nets and simplex range queries", Discrete and Computational Geometry, 2 (2): 127–151, doi:10.1007/BF02187876, MR 0884223.
13. ^ Komlós, János; Pach, János; Woeginger, Gerhard (1992), "Almost tight bounds for ${\displaystyle \varepsilon }$-nets", Discrete and Computational Geometry, 7 (2): 163–173, doi:10.1007/BF02187833, MR 1139078.
14. ^ Blumer, Anselm; Ehrenfeucht, Andrzej; Haussler, David; Warmuth, Manfred K. (1989), "Learnability and the Vapnik–Chervonenkis dimension", Journal of the ACM, 36 (4): 929–965, doi:10.1145/76359.76371, MR 1072253.
15. ^ Chazelle, B.; Friedman, J. (1990), "A deterministic view of random sampling and its use in geometry", Combinatorica, 10 (3): 229–249, doi:10.1007/BF02122778, MR 1092541.
16. ^ Brönnimann, H.; Goodrich, M. T. (1995), "Almost optimal set covers in finite VC-dimension", Discrete and Computational Geometry, 14 (4): 463–479, doi:10.1007/BF02570718, MR 1360948.
17. ^ Har-Peled, Sariel (2011), "On complexity, sampling, and ${\displaystyle \varepsilon }$-nets and ${\displaystyle \varepsilon }$-samples", Geometric approximation algorithms, Mathematical Surveys and Monographs, vol. 173, Providence, RI: American Mathematical Society, pp. 61–85, ISBN 978-0-8218-4911-8, MR 2760023.