# Generate all permutations of size t from an array a with possibly duplicated elements. collect(Combinatorics.multiset_permutations([1,1,0,0,0],3))