Foundations of computer science
Foundations of computer science
Discrete mathematics and its applications (2nd ed.)
Discrete mathematics and its applications (2nd ed.)
Modern operating systems
On generating B-trees with constant average delay and in lexicographic order
Information Processing Letters
A Survey of Combinatorial Gray Codes
SIAM Review
Computer Networks
Constant Time Generation of Set Partitions
IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences
The Art of Computer Programming, Volume 4, Fascicle 4: Generating All Trees--History of Combinatorial Generation (Art of Computer Programming)
WG'05 Proceedings of the 31st international conference on Graph-Theoretic Concepts in Computer Science
Constant time generation of trees with specified diameter
WG'04 Proceedings of the 30th international conference on Graph-Theoretic Concepts in Computer Science
Hi-index | 0.00 |
In this paper we give an algorithm to generate all distributions of distinguishable objects to bins without repetition. Our algorithm generates each distribution in constant time. To the best of our knowledge, our algorithm is the first algorithm which generates each solution in O(1) time in the ordinary sense. As a byproduct of our algorithm, we obtain a new algorithm to enumerate all multiset partitions when the number of partitions is fixed and the partitions are numbered. In this case, the algorithm generates each multiset partitions in constant time (in the ordinary sense). Finally, we extend the algorithm to the case when the bins have priorities associated with them. Overall space complexity of the algorithm is O(mklgn), where there are m bins and the objects fall into k different classes. In a companion paper, the generation of all distributions of identical objects to bins is also considered.