I have this vector: [a,a,b,c,c] It is a pattern that is repeating itself in infinity, and I want to find all circular unique permutations of it.
[a,a,b,c,c] = [a,b,c,c,a] not ok (shifted 1 step to the right)
[a,a,b,c,c] = [b,c,c,a,a] not ok (shifted 2 steps to the right)
[a,c,b,a,c] ok [b,c,a,a,c] ok
An analogy would be: A round table with 5 seats. Position two males, to females and one child (genderless) in all possible unique ways.
is there a smart function for this numpy, scipy etc Would really much appreciate help.
Br Erik