Research Article

The Dynamics of Canalizing Boolean Networks

Algorithm 3

Generating a random ordered partition of a given finite set.
ā€‰In: A finite set X with
ā€‰Out: An ordered partition into nonempty subsets such that, for a fixed X, all possible outputs have the same probability
(1)Compute , where is the number of ordered partitions of a set of size i, using the recurrence , (see [19, equation (9)]).
(2)Generate an integer N uniformly at random from .
(3)Find the minimum integer j between 1 and k such that .
(4)Randomly select a subset of size j.
(5)Generate an ordered partition of recursively.
(6)Return .