In combinatorics, the Erdős–Ko–Rado theorem of Paul Erdős, Chao Ko, and Richard Rado is a theorem on intersecting set families. It is part of the theory of hypergraphs, specifically, uniform hypergraphs of rank r.

The theorem is as follows. Suppose that A is a family of distinct subsets of ${\displaystyle \{1,2,...,n\}}$ such that each subset is of size r and each pair of subsets has a nonempty intersection, and suppose that n ≥ 2r. Then the number of sets in A is less than or equal to the binomial coefficient

${\displaystyle {\binom {n-1}{r-1}}.}$

A family of sets may also be called a hypergraph, and when all the sets are the same size it is called a uniform hypergraph. Since every set in A has size r, ${\displaystyle A}$ is an r-uniform hypergraph.

According to Erdős (1987) the theorem was proved in 1938, but was not published until 1961 in an apparently more general form. The subsets in question were only required to be size at most r, and with the additional requirement that no subset be contained in any other.[citation needed]

## Proof

The original proof of 1961 used induction on n. In 1972, Gyula O. H. Katona gave the following short proof using double counting.

Suppose we have some such family of subsets A. Arrange the elements of {1, 2, ..., n} in any cyclic order, and consider the sets from A that form intervals of length r within this cyclic order. For example if n = 8 and r = 3, we could arrange the numbers {1, 2, ..., 8} into the cyclic order (3,1,5,4,2,7,6,8), which has eight intervals:

(3,1,5), (1,5,4), (5,4,2), (4,2,7), (2,7,6), (7,6,8), (6,8,3), and (8,3,1).

However, it is not possible for all of the intervals of the cyclic order to belong to A, because some pairs of them are disjoint. Katona's key observation is that at most r of the intervals for a single cyclic order may belong to A. To see this, note that if (a1a2, ..., ar) is one of these intervals in A, then every other interval of the same cyclic order that belongs to A separates ai and ai+1 for some i (that is, it contains precisely one of these two elements). The two intervals that separate these elements are disjoint, so at most one of them can belong to A. Thus, the number of intervals in A is one plus the number of separated pairs, which is at most (r - 1).

Based on this idea, we may count the number of pairs (S,C), where S is a set in A and C is a cyclic order for which S is an interval, in two ways. First, for each set S one may generate C by choosing one of r! permutations of S and (n − r)! permutations of the remaining elements, showing that the number of pairs is |A|r!(n − r)!. And second, there are (n − 1)! cyclic orders, each of which has at most r intervals of A, so the number of pairs is at most r(n − 1)!. Combining these two counts gives the inequality

${\displaystyle |A|r!(n-r)!\leq r(n-1)!}$

and dividing both sides by r!(n − r)! gives the result

${\displaystyle |A|\leq {\frac {r(n-1)!}{r!(n-r)!}}={n-1 \choose r-1}.}$
Two constructions for an intersecting family of r-sets: fix one element and choose the remaining elements in all possible ways, or (when n = 2r) exclude one element and choose all subsets of the remaining elements. Here n = 4 and r = 2.

## Families of maximum size

There are two different and straightforward constructions for an intersecting family of r-element sets achieving the Erdős–Ko–Rado bound on cardinality. First, choose any fixed element x, and let A consist of all r-subsets of ${\displaystyle \{1,2,...,n\}}$ that include x. For instance, if n = 4, r = 2, and x = 1, this produces the family of three 2-sets

{1,2}, {1,3}, {1,4}.

Any two sets in this family intersect, because they both include x. Second, when n = 2r and with x as above, let A consist of all r-subsets of ${\displaystyle \{1,2,...,n\}}$ that do not include x. For the same parameters as above, this produces the family

{2,3}, {2,4}, {3,4}.

Any two sets in this family have a total of 2r = n elements among them, chosen from the n − 1 elements that are unequal to x, so by the pigeonhole principle they must have an element in common.

When n > 2r, families of the first type (variously known as sunflowers, stars, dictatorships, centred families, principal families) are the unique maximum families. Friedgut (2008) proved that in this case, a family which is almost of maximum size has an element which is common to almost all of its sets. This property is known as stability.

The seven points and seven lines (one drawn as a circle) of the Fano plane form a maximal intersecting family.

## Maximal intersecting families

An intersecting family of r-element sets may be maximal, in that no further set can be added without destroying the intersection property, but not of maximum size. An example with n = 7 and r = 3 is the set of 7 lines of the Fano plane, much less than the Erdős–Ko–Rado bound of 15.

## Intersecting families of subspaces

There is a q-analog of the Erdős–Ko–Rado theorem for intersecting families of subspaces over finite fields. Frankl & Wilson (1986)

If ${\displaystyle S}$ is an intersecting family of ${\displaystyle k}$-dimensional subspaces of an ${\displaystyle n}$-dimensional vector space over a finite field of order ${\displaystyle q}$, and ${\displaystyle n\geq 2k}$, then

${\displaystyle \vert S\vert \leq {\binom {n-1}{k-1}}_{q}.}$

## Relation to graphs in association schemes

The Erdős–Ko–Rado theorem gives a bound on the maximum size of an independent set in Kneser graphs contained in Johnson schemes.[citation needed]

Similarly, the analog of the Erdős–Ko–Rado theorem for intersecting families of subspaces over finite fields gives a bound on the maximum size of an independent set in q-Kneser graphs contained in Grassmann schemes.[citation needed]