Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find derangements for a multiset
ResourceFunction["MultisetDerangements"][list] gives the derangements for the multiset list. | |
ResourceFunction["MultisetDerangements"][list,n] takes n of the multiset derangements. | |
ResourceFunction["MultisetDerangements"][n] represents an operator form that takes n of the multiset derangements. |
Multiset derangements:
In[1]:= |
Out[1]= |
Limit the number returned in a large output:
In[2]:= |
Out[2]= |
In[3]:= |
Out[3]= |
Use an operator form:
In[4]:= |
Out[4]= |
Here is an example with the ResourceFunction["Derangements"]:
The resource function Derangements takes the order of the set and does not include multisets in the results:
In[5]:= |
Out[5]= |
MultisetDerangments takes a multiset as input and gives all multiset derangements:
In[6]:= |
Out[6]= |
Wolfram Language 13.3 (June 2023) or above
This work is licensed under a Creative Commons Attribution 4.0 International License