Abstract
We describe a cost-optimal parallel algorithm for enumerating all partitions (equivalence relations) of the set {1, ...,n}, in lexicographic order. The algorithm is designed to be executed on a linear array of processors. It usesn processors, each having constant size memory and each being responsible for producing one element of a given set partition. Set partitions are generated with constant delay leading to anO(B n) time solution, whereB n is the total number of set partitions. The same method can be generalized to enumerate some other combinatorial objects such as variations. The algorithm can be made adaptive, i.e. to run on any prespecified number of processors. To illustrate the model of parallel computation, a simple case of enumerating subsets of the set {1, ...,n}, having at mostm (≤n) elements is also described.
Similar content being viewed by others
References
S. G. Akl,The Design and Analysis of Parallel Algorithms, Prentice Hall, Englewood Cliffs, New Jersey, 1989.
S. G. Akl,Adaptive and optimal parallel algorithms for enumerating permutations and combinations, The Computer Journal, 30, 5, 433–436, 1987.
S. G. Akl, D. Gries and I. Stojmenović,An optimal parallel algorithm for generating combinations, Information Processing Letters, 33 (1989/90) 135–139.
S. G. Akl, H. Meijer and I. Stojmenović,Optimal parallel algorithms for generating permutations, Technical report No. 90-270, Dept. Comp. and Inf. Sci., Queen's Univ., Kingston, January 1990.
G. H. Chen and M.-S. Chern,Parallel generation of permutations and combinations, BIT, Vol. 26, 1986, 277–283.
B. Chan and S. G. Akl,Generating combinations in parallel, BIT 26, 1, 2–6, 1986.
B. Djokić, M. Miyakawa, S. Sekiguchi, I. Semba and I. Stojmenović,Parallel algorithms for generating subsets and set partitions, Proc. SIGAL Int. Symp. on Algorithms, Tokyo, Japan, August 1990.
B. Djokić, M. Miyakawa, S. Sekiguchi, I. Semba and I. Stojmenović,A fast iterative algorithm for generating set partitions, The Computer Journal, Vol. 32, No. 3, 1989, 281–282.
M. C. Er,Fast algorithm for generating set partitions, The Computer Journal, 31, 3, 283–284, 1988.
P. Gupta and G. P. Bhattacharjee,Parallel generation of permutations, The Computer Journal Vol. 26, No. 2, 1983, 97–105.
P. Gupta and G. P. Bhattacharjee,A parallel derangement generation algorithm, BIT, Vol. 29, 1989, 14–22.
C. J. Lin and J. C. Tsay,A systolic generation of combinations, BIT, Vol. 29, 1989, 23–36.
M. Miyakawa and I. Stojmenović,Classification of P k2, Discrete Applied Mathematics, 28, 1989, 179–192.
M. Mor and A. S. Fraenkel,Permutation generation on vector processors, The Computer Journal, Vol. 25, No. 4, 1982, 423–428.
A. Nijenhius and H. S. Wilf,Combinatorial Algorithms, Academic Press, N. Y., 1978.
G. Pogosyan, M. Miyakawa and A. Nozaki,On the number of clique Boolean functions, Discrete Applied Mathematics, to appear.
I. Semba,An efficient algorithm for generating all partitions of the set {1, ..., n}, Journal of Information Processing, 7, 41–42, 1984.
I. Semba,An efficient algorithm for generating all k-subsets (1 ≤ k ≤ m ≤ n) of the set {1, 2, ..., n} in lexicographic order, Journal of Algorithms, 5, 281–283, 1984.
I. Stojmenović and M. Miyakawa,Applications of subset generating algorithm to base enumeration, knapsack and minimal covering problems, The Computer Journal, 31, 1, 65–70, 1988.
Author information
Authors and Affiliations
Additional information
The research is partialy supported by NSERC operating grant OGPIN 007.
Rights and permissions
About this article
Cite this article
Stojmenović, I. An optimal algorithm for generating equivalence relations on a linear array of processors. BIT 30, 424–436 (1990). https://doi.org/10.1007/BF01931658
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01931658