Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Distribute a list into random bins
ResourceFunction["RandomBins"][list,n] randomly distributes the elements of list into n bins. |
Randomly put the numbers 1 to 10 into three bins:
In[1]:= | ![]() |
Out[1]= | ![]() |
Since the process is random, there may be fewer bins returned than the number of bins requested:
In[3]:= | ![]() |
Out[3]= | ![]() |
Randomly split the K9 complete graph into three graphs:
In[4]:= | ![]() |
Out[4]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License