Restricted Growth Strings Generator
This online calculator generates restricted growth strings for the given size
The restricted growth string for a set of n elements is the n-characters string which defines the partition of a set, where each i-th character defines the set block i-th element of a set belongs to.
For example, if we have a set of five elements and a set partition , the set partition can be defined using the string 01022, which means that a and c belongs to 0-th block, b to 1-st block and d and e to 2-nd block. If the first character is always zero (i.e. first element is always placed to block zero), then characters of the restricted growth string satisfy the inequality
Although there are several algorithms to generate all restricted growth strings for given size n of a set, with the above inequality in mind we can write rather trivial recursive algorithm, which is used in the calculator below.
Restricted growth strings are useful for the combinatorial tasks of generating set partitions for a given set.
Comentários