1. Algorithm 477 Generator of Set-Partitions to Exactly R Subsets [G7].
- Author
-
Ehrlich, Gideon
- Subjects
- *
ALGORITHMS , *BOREL sets , *ANALYTIC sets , *TOPOLOGY , *STIRLING engines , *COMPUTER programming - Abstract
The article presents information on algorithm 477, generator of set-partitions to exactly R subsets. Procedure PARTEXACT produces, by successive calls, a sequence of all S(n,r) partitions of a set of n distinct elements into exactly r mutually exclusive subsets. S(n,r) is the Stirling number of the second kind. It is assumed that n is greater than r and r is greater than 2. There is no distinction of order, neither within subsets nor among them. It is assumed that the elements to be numbers 1, 2, etc. It is also assumed that there is a sequence of numbered cells in which the subsets are located. The first cell contains the number 1, together with the whole subset to which 1 belongs, then each cell contains the minimal element not contained in the preceding cells. Partitions are represented by an address-array, a, of n components. Every j is located in the cell numbered a(j).
- Published
- 1974
- Full Text
- View/download PDF