Set partition

version (6.56 KB) by Bruno Luong
List all partitions a set n elements


Updated Sat, 12 Dec 2020 16:44:33 +0000

View License

A set of of n elements can be partitioned in non empty subsets.

This package provide function to list all possible partitions. The number of partition is Bell's number.

The number of subsets that composed the partitions can be optionally specified. The number of partition is Stirling's number of the second kind.

Cite As

Bruno Luong (2022). Set partition (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: PARTITIONS


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!