page_title: Bell number
section_title: Set partitions
hierarchical_section_title: Bell number / Counting / Set partitions
context_page_description: In combinatorial mathematics, the Bell numbers count the possible partitions of a set. These numbers have been studied by mathematicians since the 19th century, and their roots go back to medieval Japan. In an example of Stigler's law of eponymy, they are named after Eric Temple Bell, who wrote about them in the 1930s.
  The Bell numbers are denoted Bₙ, where n is an integer greater than or equal to zero. Starting with B₀ = B₁ = 1, the first few Bell numbers are
  1, 1, 2, 5, 15, 52, 203, 877, 4140, ....
  The Bell number Bₙ counts the number of different ways to partition a set that has exactly n elements, or equivalently, the number of equivalence relations on it. Bₙ also counts the number of different rhyme schemes for n-line poems.
  As well as appearing in counting problems, these numbers have a different interpretation, as moments of probability distributions. In particular, Bₙ is the nth moment of a Poisson distribution with mean 1.
context_section_description: In general, Bₙ is the number of partitions of a set of size n. A partition of a set S is defined as a set of nonempty, pairwise disjoint subsets of S whose union is S. For example, B₃ = 5 because the 3-element set {a, b, c} can be partitioned in 5 distinct ways:
  { {a}, {b}, {c} }
  { {a}, {b, c} }
  { {b}, {a, c} }
  { {c}, {a, b} }
  { {a, b, c} }.
  B₀ is 1 because there is exactly one partition of the empty set. Every member of the empty set is a nonempty set (that is vacuously true), and their union is the empty set.  Therefore, the empty set is the only partition of itself. As suggested by the set notation above, we consider neither the order of the partitions nor the order of elements within each partition. This means that the following partitionings are all considered identical:
  { {b}, {a, c} }
  { {a, c}, {b} }
  { {b}, {c, a} }
  { {c, a}, {b} }.
  If, instead, different orderings of the sets are considered to be different partitions, then the number of these ordered partitions is given by the ordered Bell numbers.
caption: The 52 partitions of a set with 5 elements