Define an orbit index using CyclicGroup
:
cyclicGroupOrbitsorbitIndex = GroupOrbits[CyclicGroup[5]Association[Join @@ MapIndexed[Thread[# -> #2[[1]]] &] @
GroupOrbits[CyclicGroup[Length @ First @ #], {#}, Permute]Permute]] &;
DeleteDuplicatesBy[arr, cyclicGroupOrbits]orbitIndex[arr]]
DeleteDuplicates[arr, Equal @@ (cyclicGroupOrbitsorbitIndex[arr][#] /@== {##})orbitIndex[arr][#2] &]
Alternatively, define an orbit index associationAn example with repeated elements:
orbitIndexarr2 = Association[Joinarr @@/. MapIndexed[Thread[#3 -> #2[[1]]] &] @
GroupOrbits[CyclicGroup[Length @ First @ #], #, Permute]] &;
DeleteDuplicatesBy[arr, orbitIndex[arr]]2
{{1, 2, 32, 4, 5}, {2, 2, 4, 35, 1}, {5, 1, 2, 2, 4}, {4, 2, 2, 5, 1}}
DeleteDuplicates[arrDeleteDuplicatesBy[arr2, orbitIndex[arr][#] == orbitIndex[arr][#2] &]orbitIndex[arr2]]
{{1, 2, 32, 4, 5}, {4, 32, 2, 5, 1}}
An example with repeated elements:
arr2 = arr /. 3 -> 2
{{1, 2, 2, 4, 5}, {2, 2, 4, 5, 1}, {5, 1, 2, 2, 4}, {4, 2, 2, 5, 1}}
DeleteDuplicatesBy[arr2, orbitIndex[arr2]]
{{1, 2, 2, 4, 5}, {4, 2, 2, 5, 1}}