Virgil.GRiffith:: An efficient algorithm for generating partitions of a set [Changes]   [Calendar]   [Search]   [Index]   

An efficient algorithm for generating partitions of a set

It's well known that the number of partitions for a set of n elements is given by the n'th Bell number.

However, if you want to actually generate the partitions of n elements there are several algorithms for doing so. Below is a link to a hyper-efficient algorithm courtesy of Nicolas Chaumont. It's available at: http://code.google.com/p/consciousness/wiki/AlgorithmForGeneratingPartitions

Enjoy!

(last modified 2011-11-07)       [Login]
(No back references.)