Lah Numbers

The Lah numbers count the number of ways to partition a list of elements into disjoint, nonempty subsets, where the order of elements in a subset is significant. This is in contrast to the Stirling numbers of the second kind, which count such partitions where the order of elements in a subset does not matter, and Stirling numbers of the first kind, which consider the cycles of a permutation. This Demonstration illustrates the different partitions that Lah numbers count.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


Snapshot 1: counts the number of ways to partition elements into only one list. Because the order of elements in the list is significant, and there are ways to order elements, .
Snapshot 2: Similarly, because there is only one way to partition elements into nonempty subsets (the order of the subsets themselves does not matter).
Snapshot 3: The Lah numbers can be computed recursively; by comparing Snapshot 1 and Snapshot 3, it is apparent that and are related.
[1] J. Riordan, Introduction to Combinatorial Analysis, New York: John Wiley, 1958 pp. 43–44.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+