I want to select distinct cycles (represented by List).
The cycle {a, b, c, d}
must be the same as {b, c, d, a}
or {c, d, a, b}
or {d, a, b, c}
. But is not equal to {a, c, b, d}
.
The distinct cycles from this set
{{a, b, c, d}, {a, b, d, c}, {a, c, b, d}, {a, c, d, b}, {a, d, b, c},
{a, d, c, b}, {b, a, c, d}, {b, a, d, c}, {b, c, a, d}, {b, c, d, a},
{b, d, a, c}, {b, d, c, a}, {c, a, b, d}, {c, a, d, b}, {c, b, a, d},
{c, b, d, a}, {c, d, a, b}, {c, d, b, a}, {d, a, b, c}, {d, a, c, b},
{d, b, a, c}, {d, b, c, a}, {d, c, a, b}, {d, c, b, a}}
must be {a,b,c,d},{a,b,d,c},{a,c,b,d},{a,c,d,b},{a,d,c,b},{a,d,b,c}
.
I want to know whether any two cycles are the same or not. The cycle I involve has length 14.
For example,
{a1, a2, a5, a6, a7, b1, b2, b3, b4, b5, b6, b7, a3, a4}
{a1, a2, a3, a4, a5, a6, a7, b1, b2, b3, b4, b5, b6, b7}
{b1, b2, b3, b4, b5, b6, b7, a3, a4, a1, a2, a5, a6, a7}
How to code in Mathematica?