Ora

What is the Formula for the nth Bell Number?

Published in Combinatorics 3 mins read

The nth Bell number, denoted as B_n, can be expressed in several exact mathematical formulas, most commonly through a recursive relation, a summation involving Stirling numbers of the second kind, or via Dobinski's formula.

Understanding Bell Numbers

Bell numbers enumerate the number of ways a set of n distinct items can be partitioned into non-empty subsets. For example, if you have 3 items {1, 2, 3}, you can partition them in 5 ways (B₃ = 5):

  • {{1, 2, 3}} (one subset)
  • {{1}, {2, 3}} (two subsets)
  • {{2}, {1, 3}} (two subsets)
  • {{3}, {1, 2}} (two subsets)
  • {{1}, {2}, {3}} (three subsets)

Exact Formulas for the nth Bell Number

Here are the primary formulas used to define and calculate Bell numbers:

1. Recursive Formula

This formula provides a way to calculate B_n by using previously computed Bell numbers, making it very practical for sequential calculation.

  • Initial Values:
    • B₀ = 1
    • B₁ = 1
  • Recursive Relation (for n ≥ 2):
    Bn = ∑{k=0}^{n-1} B_k (n-1 choose k)*

This formula states that the nth Bell number is the sum of products of earlier Bell numbers (B_k) and binomial coefficients (n-1 choose k). It's a fundamental recurrence relation for Bell numbers.

2. Summation Formula using Stirling Numbers of the Second Kind

Another widely used and combinatorially intuitive formula expresses B_n as a sum of Stirling numbers of the second kind. A Stirling number of the second kind, S(n, k) or {n k}, counts the number of ways to partition a set of n elements into k non-empty subsets.

  • Formula:
    Bn = ∑{k=0}^{n} S(n, k)

This formula directly reflects the definition of Bell numbers as the total number of partitions of a set of n elements into any number of non-empty subsets (from 0 to n).

3. Dobinski's Formula

For a more direct, non-recursive expression that connects Bell numbers to the exponential function, Dobinski's formula is particularly notable.

  • Formula:
    B_n = (1/e) ∑_{k=0}^{∞} (k^n / k!)*

While elegant, this formula involves an infinite sum, making it more theoretical than practical for computing individual B_n values compared to the recursive or Stirling number sum methods, especially for small n.

4. Exponential Generating Function

Bell numbers can also be defined by their exponential generating function, which is a powerful tool for deriving properties and relationships.

  • Formula:
    ∑_{n=0}^{∞} (B_n / n!) x^n = e^(e^x - 1)*

This formula provides a compact representation and is crucial in advanced combinatorial analysis, rather than a direct computational method for B_n.

First Few Bell Numbers

To illustrate these formulas, here are the first few Bell numbers:

n B_n Partitions of a Set with 'n' Elements
0 1 The empty set has one partition (the empty partition).
1 1 {{1}}
2 2 {{1,2}}, {{1},{2}}
3 5 {{1,2,3}}, {{1},{2,3}}, {{2},{1,3}}, {{3},{1,2}}, {{1},{2},{3}}
4 15 (e.g., {{1,2,3,4}}, {{1,2,3},{4}}, {{1,2},{3,4}}, etc.)
5 52
6 203

Practical Insights and Applications

Bell numbers appear in various fields due to their fundamental nature in counting partitions:

  • Combinatorics: They count the number of possible rhyme schemes for a poem with n lines, or the number of ways to factorize a square-free number into n prime factors.
  • Probability Theory: They are related to the moments of the Poisson distribution.
  • Computer Science: Bell numbers can be relevant in algorithms for clustering data or solving partitioning problems.