Define an orbit index using CyclicGroup
:
orbitIndex = Association[Join @@ MapIndexed[Thread[# -> #2[[1]]] &] @
GroupOrbits[CyclicGroup[Length @ First @ #], #, Permute]] &;
DeleteDuplicatesBy[arr, orbitIndex[arr]]
{{1, 2, 3, 4, 5}, {4, 3, 2, 5, 1}}
DeleteDuplicates[arr, orbitIndex[arr][#] == orbitIndex[arr][#2] &]
{{1, 2, 3, 4, 5}, {4, 3, 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}}
DeleteDuplicates[arr2, orbitIndex[arr2][#] == orbitIndex[arr2][#2] &]
{{1, 2, 2, 4, 5}, {4, 2, 2, 5, 1}}
Symbolic elements:
arr3 = arr /. MapIndexed[#2[[1]] -> # &, {"A", "B", "C", "D", "E"}]
{{"A", "B", "C", "D", "E"}, {"B", "C", "D", "E", "A"},
{"E", "A", "B", "C", "D"}, {"D", "C", "B", "E", "A"}}
DeleteDuplicatesBy[arr3, orbitIndex[arr3]]
{{"A", "B", "C", "D", "E"}, {"D", "C", "B", "E", "A"}}
DeleteDuplicates[arr3, orbitIndex[arr3][#] == orbitIndex[arr3][#2] &]
{{"A", "B", "C", "D", "E"}, {"D", "C", "B", "E", "A"}}