Back to Search Start Over

Algorithm 477 Generator of Set-Partitions to Exactly R Subsets [G7].

Authors :
Ehrlich, Gideon
Source :
Communications of the ACM. Apr1974, Vol. 17 Issue 4, p224-225. 2p.
Publication Year :
1974

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).

Details

Language :
English
ISSN :
00010782
Volume :
17
Issue :
4
Database :
Academic Search Index
Journal :
Communications of the ACM
Publication Type :
Periodical
Accession number :
17849323
Full Text :
https://doi.org/10.1145/360924.360976