Enter the total number of objects (n) and the number of objects in each partition (k) into the calculator to determine the Stirling number of the second kind. This calculator helps in combinatorial mathematics to find the number of ways to partition a set of n objects into k non-empty subsets.

Stirling Number Formula

The following recursive formula is used to calculate the Stirling number of the second kind:

S(n, k) = k * S(n - 1, k) + S(n - 1, k - 1)

where:

  • S(n, k) is the Stirling number of the second kind
  • n is the total number of objects
  • k is the number of objects in each partition

To calculate the Stirling number, use the recursive formula until the base cases are reached, which are S(n, n) = 1 and S(n, 1) = 1 for any positive integer n, and S(n, k) = 0 if k > n or k = 0.

What is a Stirling Number?

The Stirling numbers of the second kind, denoted as S(n, k), represent the number of ways to partition a set of n objects into k non-empty subsets. They are used in various fields of mathematics, including combinatorics, algebra, and probability theory. The Stirling numbers have applications in solving problems related to partitions of sets, counting functions, and the distribution of objects into indistinguishable boxes.

How to Calculate Stirling Number?

The following steps outline how to calculate the Stirling Number of the second kind:


  1. First, determine the total number of objects (n).
  2. Next, determine the number of objects in each partition (k).
  3. Use the recursive formula S(n, k) = k * S(n – 1, k) + S(n – 1, k – 1) to calculate the Stirling number.
  4. Continue using the formula until the base cases are reached.
  5. Finally, obtain the Stirling Number of the second kind (S(n, k)).
  6. After calculating the result, verify your answer with the calculator above.

Example Problem:

Use the following variables as an example problem to test your knowledge.

Total number of objects (n) = 5

Number of objects in each partition (k) = 3