Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find all permutations of lists with non-unique elements
ResourceFunction["FindAllPermutations"][list] returns a list of permutations that produces a list from its sorted version. | |
ResourceFunction["FindAllPermutations"][list1,list2] returns a list of permutations that permutes list1 into list2. |
Find all permutations that produce a list with non-unique elements from its sorted version:
In[1]:= |
Out[1]= |
Find all permutations that convert one list to another:
In[2]:= |
Out[2]= |
If a list can't be permuted into a target list, an empty list is returned:
In[3]:= |
Out[3]= |
FindPermutation only finds one permutation:
In[4]:= |
Out[4]= |
FindAllPermutations finds all possible permutations:
In[5]:= |
Out[5]= |
This work is licensed under a Creative Commons Attribution 4.0 International License