Distribution of distinguishable objects to bins: generating all distributions

  • Authors:
  • Muhammad Abdullah Adnan;Md. Saidur Rahman

  • Affiliations:
  • Department of Computer Science and Engineering, Bangladesh University of Engineering and Technology (BUET), Bangladesh;Department of Computer Science and Engineering, Bangladesh University of Engineering and Technology (BUET), Bangladesh

  • Venue:
  • International Journal of Computer Mathematics
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.