# Find the cosets of $D_{2n}$ in $S_n$

Find the cosets of $$D_{2n}$$ in $$S_n$$

I tried to take examples and see, I did it in the case when $$n=4$$, but for the case $$n=6$$, the computation is became huge.

Is there a simple way in which I can see the problem?

I used Python to get the $$60$$ (left) cosets in $$S_6$$; the first defined function was copied from here (I can be blamed for the remaining code).

Python Code

# Python function to print permutations of a given list
def permutation(lst):

# If lst is empty then there are no permutations
if len(lst) == 0:
return []

# If there is only one element in lst then, only
# one permuatation is possible
if len(lst) == 1:
return [lst]

# Find the permutations for lst if there are
# more than 1 characters

l = [] # empty list that will store current permutation

# Iterate the input(lst) and calculate the permutation
for i in range(len(lst)):
m = lst[i]

# Extract lst[i] or m from the list.  remLst is
# remaining list
remLst = lst[:i] + lst[i+1:]

# Generating all permutations where m is first
# element
for p in permutation(remLst):
l.append([m] + p)
return l

def multiply_permutations(p,q):
r = []
for i in range(0,len(q)):
#print(i)
spot = int(q[i])
r.append(p[spot-1])
return r

def left_coset(p, C):
make_coset = []
for c in C:
a = multiply_permutations(p, c)
make_coset.append(a)
return make_coset

Sym6_Partition = []

def expand_partition(Block):
p = Block[0]
for B in Sym6_Partition:
if p in B:
return
Sym6_Partition.append(Block)

# Driver program to test above function
data = list('123456')
S6 = permutation(data)

H12c = [ ['1','2','3','4','5','6'], \
['2','3','4','5','6','1'], \
['3','4','5','6','1','2'], \
['4','5','6','1','2','3'], \
['5','6','1','2','3','4'], \
['6','1','2','3','4','5']  ]

while 1:
H12_more = []
for pitem in H12c:
#print(pitem)
prod = multiply_permutations(['2','1','6','5','4','3'], pitem)
H12_more.append(prod)
#print(H12_more)
break

H12 = H12c + H12_more
for h in H12:
for k in H12:
j = multiply_permutations(h, k)
if j in H12:
pass
else:
print('error', j, k, j)

print('H12 =', H12)
Sym6_Partition = []
expand_partition(H12) # add H12 (first item) to Sym6_Partition list

for p in S6:
found_it = False
for B in Sym6_Partition:
if p in B:
found_it = True
break
if found_it:
continue
new_block = left_coset(p, H12)
expand_partition(new_block)
if len(Sym6_Partition) == 60:
break

print()
print()
print("*** PARTITION ***")
for block in Sym6_Partition:
print()
print(block)
print


$$\text{***}$$ OUTPUT $$\text{***}$$

H12 = [['1', '2', '3', '4', '5', '6'], ['2', '3', '4', '5', '6', '1'], ['3', '4', '5', '6', '1', '2'], ['4', '5', '6', '1', '2', '3'], ['5', '6', '1', '2', '3', '4'], ['6', '1', '2', '3', '4', '5'], ['2', '1', '6', '5', '4', '3'], ['1', '6', '5', '4', '3', '2'], ['6', '5', '4', '3', '2', '1'], ['5', '4', '3', '2', '1', '6'], ['4', '3', '2', '1', '6', '5'], ['3', '2', '1', '6', '5', '4']]

*** PARTITION ***

[['1', '2', '3', '4', '5', '6'], ['2', '3', '4', '5', '6', '1'], ['3', '4', '5', '6', '1', '2'], ['4', '5', '6', '1', '2', '3'], ['5', '6', '1', '2', '3', '4'], ['6', '1', '2', '3', '4', '5'], ['2', '1', '6', '5', '4', '3'], ['1', '6', '5', '4', '3', '2'], ['6', '5', '4', '3', '2', '1'], ['5', '4', '3', '2', '1', '6'], ['4', '3', '2', '1', '6', '5'], ['3', '2', '1', '6', '5', '4']]

[['1', '2', '3', '4', '6', '5'], ['2', '3', '4', '6', '5', '1'], ['3', '4', '6', '5', '1', '2'], ['4', '6', '5', '1', '2', '3'], ['6', '5', '1', '2', '3', '4'], ['5', '1', '2', '3', '4', '6'], ['2', '1', '5', '6', '4', '3'], ['1', '5', '6', '4', '3', '2'], ['5', '6', '4', '3', '2', '1'], ['6', '4', '3', '2', '1', '5'], ['4', '3', '2', '1', '5', '6'], ['3', '2', '1', '5', '6', '4']]

[['1', '2', '3', '5', '4', '6'], ['2', '3', '5', '4', '6', '1'], ['3', '5', '4', '6', '1', '2'], ['5', '4', '6', '1', '2', '3'], ['4', '6', '1', '2', '3', '5'], ['6', '1', '2', '3', '5', '4'], ['2', '1', '6', '4', '5', '3'], ['1', '6', '4', '5', '3', '2'], ['6', '4', '5', '3', '2', '1'], ['4', '5', '3', '2', '1', '6'], ['5', '3', '2', '1', '6', '4'], ['3', '2', '1', '6', '4', '5']]

[['1', '2', '3', '5', '6', '4'], ['2', '3', '5', '6', '4', '1'], ['3', '5', '6', '4', '1', '2'], ['5', '6', '4', '1', '2', '3'], ['6', '4', '1', '2', '3', '5'], ['4', '1', '2', '3', '5', '6'], ['2', '1', '4', '6', '5', '3'], ['1', '4', '6', '5', '3', '2'], ['4', '6', '5', '3', '2', '1'], ['6', '5', '3', '2', '1', '4'], ['5', '3', '2', '1', '4', '6'], ['3', '2', '1', '4', '6', '5']]

[['1', '2', '3', '6', '4', '5'], ['2', '3', '6', '4', '5', '1'], ['3', '6', '4', '5', '1', '2'], ['6', '4', '5', '1', '2', '3'], ['4', '5', '1', '2', '3', '6'], ['5', '1', '2', '3', '6', '4'], ['2', '1', '5', '4', '6', '3'], ['1', '5', '4', '6', '3', '2'], ['5', '4', '6', '3', '2', '1'], ['4', '6', '3', '2', '1', '5'], ['6', '3', '2', '1', '5', '4'], ['3', '2', '1', '5', '4', '6']]

[['1', '2', '3', '6', '5', '4'], ['2', '3', '6', '5', '4', '1'], ['3', '6', '5', '4', '1', '2'], ['6', '5', '4', '1', '2', '3'], ['5', '4', '1', '2', '3', '6'], ['4', '1', '2', '3', '6', '5'], ['2', '1', '4', '5', '6', '3'], ['1', '4', '5', '6', '3', '2'], ['4', '5', '6', '3', '2', '1'], ['5', '6', '3', '2', '1', '4'], ['6', '3', '2', '1', '4', '5'], ['3', '2', '1', '4', '5', '6']]

[['1', '2', '4', '3', '5', '6'], ['2', '4', '3', '5', '6', '1'], ['4', '3', '5', '6', '1', '2'], ['3', '5', '6', '1', '2', '4'], ['5', '6', '1', '2', '4', '3'], ['6', '1', '2', '4', '3', '5'], ['2', '1', '6', '5', '3', '4'], ['1', '6', '5', '3', '4', '2'], ['6', '5', '3', '4', '2', '1'], ['5', '3', '4', '2', '1', '6'], ['3', '4', '2', '1', '6', '5'], ['4', '2', '1', '6', '5', '3']]

[['1', '2', '4', '3', '6', '5'], ['2', '4', '3', '6', '5', '1'], ['4', '3', '6', '5', '1', '2'], ['3', '6', '5', '1', '2', '4'], ['6', '5', '1', '2', '4', '3'], ['5', '1', '2', '4', '3', '6'], ['2', '1', '5', '6', '3', '4'], ['1', '5', '6', '3', '4', '2'], ['5', '6', '3', '4', '2', '1'], ['6', '3', '4', '2', '1', '5'], ['3', '4', '2', '1', '5', '6'], ['4', '2', '1', '5', '6', '3']]

[['1', '2', '4', '5', '3', '6'], ['2', '4', '5', '3', '6', '1'], ['4', '5', '3', '6', '1', '2'], ['5', '3', '6', '1', '2', '4'], ['3', '6', '1', '2', '4', '5'], ['6', '1', '2', '4', '5', '3'], ['2', '1', '6', '3', '5', '4'], ['1', '6', '3', '5', '4', '2'], ['6', '3', '5', '4', '2', '1'], ['3', '5', '4', '2', '1', '6'], ['5', '4', '2', '1', '6', '3'], ['4', '2', '1', '6', '3', '5']]

[['1', '2', '4', '5', '6', '3'], ['2', '4', '5', '6', '3', '1'], ['4', '5', '6', '3', '1', '2'], ['5', '6', '3', '1', '2', '4'], ['6', '3', '1', '2', '4', '5'], ['3', '1', '2', '4', '5', '6'], ['2', '1', '3', '6', '5', '4'], ['1', '3', '6', '5', '4', '2'], ['3', '6', '5', '4', '2', '1'], ['6', '5', '4', '2', '1', '3'], ['5', '4', '2', '1', '3', '6'], ['4', '2', '1', '3', '6', '5']]

[['1', '2', '4', '6', '3', '5'], ['2', '4', '6', '3', '5', '1'], ['4', '6', '3', '5', '1', '2'], ['6', '3', '5', '1', '2', '4'], ['3', '5', '1', '2', '4', '6'], ['5', '1', '2', '4', '6', '3'], ['2', '1', '5', '3', '6', '4'], ['1', '5', '3', '6', '4', '2'], ['5', '3', '6', '4', '2', '1'], ['3', '6', '4', '2', '1', '5'], ['6', '4', '2', '1', '5', '3'], ['4', '2', '1', '5', '3', '6']]

[['1', '2', '4', '6', '5', '3'], ['2', '4', '6', '5', '3', '1'], ['4', '6', '5', '3', '1', '2'], ['6', '5', '3', '1', '2', '4'], ['5', '3', '1', '2', '4', '6'], ['3', '1', '2', '4', '6', '5'], ['2', '1', '3', '5', '6', '4'], ['1', '3', '5', '6', '4', '2'], ['3', '5', '6', '4', '2', '1'], ['5', '6', '4', '2', '1', '3'], ['6', '4', '2', '1', '3', '5'], ['4', '2', '1', '3', '5', '6']]

[['1', '2', '5', '3', '4', '6'], ['2', '5', '3', '4', '6', '1'], ['5', '3', '4', '6', '1', '2'], ['3', '4', '6', '1', '2', '5'], ['4', '6', '1', '2', '5', '3'], ['6', '1', '2', '5', '3', '4'], ['2', '1', '6', '4', '3', '5'], ['1', '6', '4', '3', '5', '2'], ['6', '4', '3', '5', '2', '1'], ['4', '3', '5', '2', '1', '6'], ['3', '5', '2', '1', '6', '4'], ['5', '2', '1', '6', '4', '3']]

[['1', '2', '5', '3', '6', '4'], ['2', '5', '3', '6', '4', '1'], ['5', '3', '6', '4', '1', '2'], ['3', '6', '4', '1', '2', '5'], ['6', '4', '1', '2', '5', '3'], ['4', '1', '2', '5', '3', '6'], ['2', '1', '4', '6', '3', '5'], ['1', '4', '6', '3', '5', '2'], ['4', '6', '3', '5', '2', '1'], ['6', '3', '5', '2', '1', '4'], ['3', '5', '2', '1', '4', '6'], ['5', '2', '1', '4', '6', '3']]

[['1', '2', '5', '4', '3', '6'], ['2', '5', '4', '3', '6', '1'], ['5', '4', '3', '6', '1', '2'], ['4', '3', '6', '1', '2', '5'], ['3', '6', '1', '2', '5', '4'], ['6', '1', '2', '5', '4', '3'], ['2', '1', '6', '3', '4', '5'], ['1', '6', '3', '4', '5', '2'], ['6', '3', '4', '5', '2', '1'], ['3', '4', '5', '2', '1', '6'], ['4', '5', '2', '1', '6', '3'], ['5', '2', '1', '6', '3', '4']]

[['1', '2', '5', '4', '6', '3'], ['2', '5', '4', '6', '3', '1'], ['5', '4', '6', '3', '1', '2'], ['4', '6', '3', '1', '2', '5'], ['6', '3', '1', '2', '5', '4'], ['3', '1', '2', '5', '4', '6'], ['2', '1', '3', '6', '4', '5'], ['1', '3', '6', '4', '5', '2'], ['3', '6', '4', '5', '2', '1'], ['6', '4', '5', '2', '1', '3'], ['4', '5', '2', '1', '3', '6'], ['5', '2', '1', '3', '6', '4']]

[['1', '2', '5', '6', '3', '4'], ['2', '5', '6', '3', '4', '1'], ['5', '6', '3', '4', '1', '2'], ['6', '3', '4', '1', '2', '5'], ['3', '4', '1', '2', '5', '6'], ['4', '1', '2', '5', '6', '3'], ['2', '1', '4', '3', '6', '5'], ['1', '4', '3', '6', '5', '2'], ['4', '3', '6', '5', '2', '1'], ['3', '6', '5', '2', '1', '4'], ['6', '5', '2', '1', '4', '3'], ['5', '2', '1', '4', '3', '6']]

[['1', '2', '5', '6', '4', '3'], ['2', '5', '6', '4', '3', '1'], ['5', '6', '4', '3', '1', '2'], ['6', '4', '3', '1', '2', '5'], ['4', '3', '1', '2', '5', '6'], ['3', '1', '2', '5', '6', '4'], ['2', '1', '3', '4', '6', '5'], ['1', '3', '4', '6', '5', '2'], ['3', '4', '6', '5', '2', '1'], ['4', '6', '5', '2', '1', '3'], ['6', '5', '2', '1', '3', '4'], ['5', '2', '1', '3', '4', '6']]

[['1', '2', '6', '3', '4', '5'], ['2', '6', '3', '4', '5', '1'], ['6', '3', '4', '5', '1', '2'], ['3', '4', '5', '1', '2', '6'], ['4', '5', '1', '2', '6', '3'], ['5', '1', '2', '6', '3', '4'], ['2', '1', '5', '4', '3', '6'], ['1', '5', '4', '3', '6', '2'], ['5', '4', '3', '6', '2', '1'], ['4', '3', '6', '2', '1', '5'], ['3', '6', '2', '1', '5', '4'], ['6', '2', '1', '5', '4', '3']]

[['1', '2', '6', '3', '5', '4'], ['2', '6', '3', '5', '4', '1'], ['6', '3', '5', '4', '1', '2'], ['3', '5', '4', '1', '2', '6'], ['5', '4', '1', '2', '6', '3'], ['4', '1', '2', '6', '3', '5'], ['2', '1', '4', '5', '3', '6'], ['1', '4', '5', '3', '6', '2'], ['4', '5', '3', '6', '2', '1'], ['5', '3', '6', '2', '1', '4'], ['3', '6', '2', '1', '4', '5'], ['6', '2', '1', '4', '5', '3']]

[['1', '2', '6', '4', '3', '5'], ['2', '6', '4', '3', '5', '1'], ['6', '4', '3', '5', '1', '2'], ['4', '3', '5', '1', '2', '6'], ['3', '5', '1', '2', '6', '4'], ['5', '1', '2', '6', '4', '3'], ['2', '1', '5', '3', '4', '6'], ['1', '5', '3', '4', '6', '2'], ['5', '3', '4', '6', '2', '1'], ['3', '4', '6', '2', '1', '5'], ['4', '6', '2', '1', '5', '3'], ['6', '2', '1', '5', '3', '4']]

[['1', '2', '6', '4', '5', '3'], ['2', '6', '4', '5', '3', '1'], ['6', '4', '5', '3', '1', '2'], ['4', '5', '3', '1', '2', '6'], ['5', '3', '1', '2', '6', '4'], ['3', '1', '2', '6', '4', '5'], ['2', '1', '3', '5', '4', '6'], ['1', '3', '5', '4', '6', '2'], ['3', '5', '4', '6', '2', '1'], ['5', '4', '6', '2', '1', '3'], ['4', '6', '2', '1', '3', '5'], ['6', '2', '1', '3', '5', '4']]

[['1', '2', '6', '5', '3', '4'], ['2', '6', '5', '3', '4', '1'], ['6', '5', '3', '4', '1', '2'], ['5', '3', '4', '1', '2', '6'], ['3', '4', '1', '2', '6', '5'], ['4', '1', '2', '6', '5', '3'], ['2', '1', '4', '3', '5', '6'], ['1', '4', '3', '5', '6', '2'], ['4', '3', '5', '6', '2', '1'], ['3', '5', '6', '2', '1', '4'], ['5', '6', '2', '1', '4', '3'], ['6', '2', '1', '4', '3', '5']]

[['1', '2', '6', '5', '4', '3'], ['2', '6', '5', '4', '3', '1'], ['6', '5', '4', '3', '1', '2'], ['5', '4', '3', '1', '2', '6'], ['4', '3', '1', '2', '6', '5'], ['3', '1', '2', '6', '5', '4'], ['2', '1', '3', '4', '5', '6'], ['1', '3', '4', '5', '6', '2'], ['3', '4', '5', '6', '2', '1'], ['4', '5', '6', '2', '1', '3'], ['5', '6', '2', '1', '3', '4'], ['6', '2', '1', '3', '4', '5']]

[['1', '3', '2', '4', '5', '6'], ['3', '2', '4', '5', '6', '1'], ['2', '4', '5', '6', '1', '3'], ['4', '5', '6', '1', '3', '2'], ['5', '6', '1', '3', '2', '4'], ['6', '1', '3', '2', '4', '5'], ['3', '1', '6', '5', '4', '2'], ['1', '6', '5', '4', '2', '3'], ['6', '5', '4', '2', '3', '1'], ['5', '4', '2', '3', '1', '6'], ['4', '2', '3', '1', '6', '5'], ['2', '3', '1', '6', '5', '4']]

[['1', '3', '2', '4', '6', '5'], ['3', '2', '4', '6', '5', '1'], ['2', '4', '6', '5', '1', '3'], ['4', '6', '5', '1', '3', '2'], ['6', '5', '1', '3', '2', '4'], ['5', '1', '3', '2', '4', '6'], ['3', '1', '5', '6', '4', '2'], ['1', '5', '6', '4', '2', '3'], ['5', '6', '4', '2', '3', '1'], ['6', '4', '2', '3', '1', '5'], ['4', '2', '3', '1', '5', '6'], ['2', '3', '1', '5', '6', '4']]

[['1', '3', '2', '5', '4', '6'], ['3', '2', '5', '4', '6', '1'], ['2', '5', '4', '6', '1', '3'], ['5', '4', '6', '1', '3', '2'], ['4', '6', '1', '3', '2', '5'], ['6', '1', '3', '2', '5', '4'], ['3', '1', '6', '4', '5', '2'], ['1', '6', '4', '5', '2', '3'], ['6', '4', '5', '2', '3', '1'], ['4', '5', '2', '3', '1', '6'], ['5', '2', '3', '1', '6', '4'], ['2', '3', '1', '6', '4', '5']]

[['1', '3', '2', '5', '6', '4'], ['3', '2', '5', '6', '4', '1'], ['2', '5', '6', '4', '1', '3'], ['5', '6', '4', '1', '3', '2'], ['6', '4', '1', '3', '2', '5'], ['4', '1', '3', '2', '5', '6'], ['3', '1', '4', '6', '5', '2'], ['1', '4', '6', '5', '2', '3'], ['4', '6', '5', '2', '3', '1'], ['6', '5', '2', '3', '1', '4'], ['5', '2', '3', '1', '4', '6'], ['2', '3', '1', '4', '6', '5']]

[['1', '3', '2', '6', '4', '5'], ['3', '2', '6', '4', '5', '1'], ['2', '6', '4', '5', '1', '3'], ['6', '4', '5', '1', '3', '2'], ['4', '5', '1', '3', '2', '6'], ['5', '1', '3', '2', '6', '4'], ['3', '1', '5', '4', '6', '2'], ['1', '5', '4', '6', '2', '3'], ['5', '4', '6', '2', '3', '1'], ['4', '6', '2', '3', '1', '5'], ['6', '2', '3', '1', '5', '4'], ['2', '3', '1', '5', '4', '6']]

[['1', '3', '2', '6', '5', '4'], ['3', '2', '6', '5', '4', '1'], ['2', '6', '5', '4', '1', '3'], ['6', '5', '4', '1', '3', '2'], ['5', '4', '1', '3', '2', '6'], ['4', '1', '3', '2', '6', '5'], ['3', '1', '4', '5', '6', '2'], ['1', '4', '5', '6', '2', '3'], ['4', '5', '6', '2', '3', '1'], ['5', '6', '2', '3', '1', '4'], ['6', '2', '3', '1', '4', '5'], ['2', '3', '1', '4', '5', '6']]

[['1', '3', '4', '2', '5', '6'], ['3', '4', '2', '5', '6', '1'], ['4', '2', '5', '6', '1', '3'], ['2', '5', '6', '1', '3', '4'], ['5', '6', '1', '3', '4', '2'], ['6', '1', '3', '4', '2', '5'], ['3', '1', '6', '5', '2', '4'], ['1', '6', '5', '2', '4', '3'], ['6', '5', '2', '4', '3', '1'], ['5', '2', '4', '3', '1', '6'], ['2', '4', '3', '1', '6', '5'], ['4', '3', '1', '6', '5', '2']]

[['1', '3', '4', '2', '6', '5'], ['3', '4', '2', '6', '5', '1'], ['4', '2', '6', '5', '1', '3'], ['2', '6', '5', '1', '3', '4'], ['6', '5', '1', '3', '4', '2'], ['5', '1', '3', '4', '2', '6'], ['3', '1', '5', '6', '2', '4'], ['1', '5', '6', '2', '4', '3'], ['5', '6', '2', '4', '3', '1'], ['6', '2', '4', '3', '1', '5'], ['2', '4', '3', '1', '5', '6'], ['4', '3', '1', '5', '6', '2']]

[['1', '3', '4', '5', '2', '6'], ['3', '4', '5', '2', '6', '1'], ['4', '5', '2', '6', '1', '3'], ['5', '2', '6', '1', '3', '4'], ['2', '6', '1', '3', '4', '5'], ['6', '1', '3', '4', '5', '2'], ['3', '1', '6', '2', '5', '4'], ['1', '6', '2', '5', '4', '3'], ['6', '2', '5', '4', '3', '1'], ['2', '5', '4', '3', '1', '6'], ['5', '4', '3', '1', '6', '2'], ['4', '3', '1', '6', '2', '5']]

[['1', '3', '4', '6', '2', '5'], ['3', '4', '6', '2', '5', '1'], ['4', '6', '2', '5', '1', '3'], ['6', '2', '5', '1', '3', '4'], ['2', '5', '1', '3', '4', '6'], ['5', '1', '3', '4', '6', '2'], ['3', '1', '5', '2', '6', '4'], ['1', '5', '2', '6', '4', '3'], ['5', '2', '6', '4', '3', '1'], ['2', '6', '4', '3', '1', '5'], ['6', '4', '3', '1', '5', '2'], ['4', '3', '1', '5', '2', '6']]

[['1', '3', '5', '2', '4', '6'], ['3', '5', '2', '4', '6', '1'], ['5', '2', '4', '6', '1', '3'], ['2', '4', '6', '1', '3', '5'], ['4', '6', '1', '3', '5', '2'], ['6', '1', '3', '5', '2', '4'], ['3', '1', '6', '4', '2', '5'], ['1', '6', '4', '2', '5', '3'], ['6', '4', '2', '5', '3', '1'], ['4', '2', '5', '3', '1', '6'], ['2', '5', '3', '1', '6', '4'], ['5', '3', '1', '6', '4', '2']]

[['1', '3', '5', '2', '6', '4'], ['3', '5', '2', '6', '4', '1'], ['5', '2', '6', '4', '1', '3'], ['2', '6', '4', '1', '3', '5'], ['6', '4', '1', '3', '5', '2'], ['4', '1', '3', '5', '2', '6'], ['3', '1', '4', '6', '2', '5'], ['1', '4', '6', '2', '5', '3'], ['4', '6', '2', '5', '3', '1'], ['6', '2', '5', '3', '1', '4'], ['2', '5', '3', '1', '4', '6'], ['5', '3', '1', '4', '6', '2']]

[['1', '3', '5', '4', '2', '6'], ['3', '5', '4', '2', '6', '1'], ['5', '4', '2', '6', '1', '3'], ['4', '2', '6', '1', '3', '5'], ['2', '6', '1', '3', '5', '4'], ['6', '1', '3', '5', '4', '2'], ['3', '1', '6', '2', '4', '5'], ['1', '6', '2', '4', '5', '3'], ['6', '2', '4', '5', '3', '1'], ['2', '4', '5', '3', '1', '6'], ['4', '5', '3', '1', '6', '2'], ['5', '3', '1', '6', '2', '4']]

[['1', '3', '5', '6', '2', '4'], ['3', '5', '6', '2', '4', '1'], ['5', '6', '2', '4', '1', '3'], ['6', '2', '4', '1', '3', '5'], ['2', '4', '1', '3', '5', '6'], ['4', '1', '3', '5', '6', '2'], ['3', '1', '4', '2', '6', '5'], ['1', '4', '2', '6', '5', '3'], ['4', '2', '6', '5', '3', '1'], ['2', '6', '5', '3', '1', '4'], ['6', '5', '3', '1', '4', '2'], ['5', '3', '1', '4', '2', '6']]

[['1', '3', '6', '2', '4', '5'], ['3', '6', '2', '4', '5', '1'], ['6', '2', '4', '5', '1', '3'], ['2', '4', '5', '1', '3', '6'], ['4', '5', '1', '3', '6', '2'], ['5', '1', '3', '6', '2', '4'], ['3', '1', '5', '4', '2', '6'], ['1', '5', '4', '2', '6', '3'], ['5', '4', '2', '6', '3', '1'], ['4', '2', '6', '3', '1', '5'], ['2', '6', '3', '1', '5', '4'], ['6', '3', '1', '5', '4', '2']]

[['1', '3', '6', '2', '5', '4'], ['3', '6', '2', '5', '4', '1'], ['6', '2', '5', '4', '1', '3'], ['2', '5', '4', '1', '3', '6'], ['5', '4', '1', '3', '6', '2'], ['4', '1', '3', '6', '2', '5'], ['3', '1', '4', '5', '2', '6'], ['1', '4', '5', '2', '6', '3'], ['4', '5', '2', '6', '3', '1'], ['5', '2', '6', '3', '1', '4'], ['2', '6', '3', '1', '4', '5'], ['6', '3', '1', '4', '5', '2']]

[['1', '3', '6', '4', '2', '5'], ['3', '6', '4', '2', '5', '1'], ['6', '4', '2', '5', '1', '3'], ['4', '2', '5', '1', '3', '6'], ['2', '5', '1', '3', '6', '4'], ['5', '1', '3', '6', '4', '2'], ['3', '1', '5', '2', '4', '6'], ['1', '5', '2', '4', '6', '3'], ['5', '2', '4', '6', '3', '1'], ['2', '4', '6', '3', '1', '5'], ['4', '6', '3', '1', '5', '2'], ['6', '3', '1', '5', '2', '4']]

[['1', '3', '6', '5', '2', '4'], ['3', '6', '5', '2', '4', '1'], ['6', '5', '2', '4', '1', '3'], ['5', '2', '4', '1', '3', '6'], ['2', '4', '1', '3', '6', '5'], ['4', '1', '3', '6', '5', '2'], ['3', '1', '4', '2', '5', '6'], ['1', '4', '2', '5', '6', '3'], ['4', '2', '5', '6', '3', '1'], ['2', '5', '6', '3', '1', '4'], ['5', '6', '3', '1', '4', '2'], ['6', '3', '1', '4', '2', '5']]

[['1', '4', '2', '3', '5', '6'], ['4', '2', '3', '5', '6', '1'], ['2', '3', '5', '6', '1', '4'], ['3', '5', '6', '1', '4', '2'], ['5', '6', '1', '4', '2', '3'], ['6', '1', '4', '2', '3', '5'], ['4', '1', '6', '5', '3', '2'], ['1', '6', '5', '3', '2', '4'], ['6', '5', '3', '2', '4', '1'], ['5', '3', '2', '4', '1', '6'], ['3', '2', '4', '1', '6', '5'], ['2', '4', '1', '6', '5', '3']]

[['1', '4', '2', '3', '6', '5'], ['4', '2', '3', '6', '5', '1'], ['2', '3', '6', '5', '1', '4'], ['3', '6', '5', '1', '4', '2'], ['6', '5', '1', '4', '2', '3'], ['5', '1', '4', '2', '3', '6'], ['4', '1', '5', '6', '3', '2'], ['1', '5', '6', '3', '2', '4'], ['5', '6', '3', '2', '4', '1'], ['6', '3', '2', '4', '1', '5'], ['3', '2', '4', '1', '5', '6'], ['2', '4', '1', '5', '6', '3']]

[['1', '4', '2', '5', '3', '6'], ['4', '2', '5', '3', '6', '1'], ['2', '5', '3', '6', '1', '4'], ['5', '3', '6', '1', '4', '2'], ['3', '6', '1', '4', '2', '5'], ['6', '1', '4', '2', '5', '3'], ['4', '1', '6', '3', '5', '2'], ['1', '6', '3', '5', '2', '4'], ['6', '3', '5', '2', '4', '1'], ['3', '5', '2', '4', '1', '6'], ['5', '2', '4', '1', '6', '3'], ['2', '4', '1', '6', '3', '5']]

[['1', '4', '2', '6', '3', '5'], ['4', '2', '6', '3', '5', '1'], ['2', '6', '3', '5', '1', '4'], ['6', '3', '5', '1', '4', '2'], ['3', '5', '1', '4', '2', '6'], ['5', '1', '4', '2', '6', '3'], ['4', '1', '5', '3', '6', '2'], ['1', '5', '3', '6', '2', '4'], ['5', '3', '6', '2', '4', '1'], ['3', '6', '2', '4', '1', '5'], ['6', '2', '4', '1', '5', '3'], ['2', '4', '1', '5', '3', '6']]

[['1', '4', '3', '2', '5', '6'], ['4', '3', '2', '5', '6', '1'], ['3', '2', '5', '6', '1', '4'], ['2', '5', '6', '1', '4', '3'], ['5', '6', '1', '4', '3', '2'], ['6', '1', '4', '3', '2', '5'], ['4', '1', '6', '5', '2', '3'], ['1', '6', '5', '2', '3', '4'], ['6', '5', '2', '3', '4', '1'], ['5', '2', '3', '4', '1', '6'], ['2', '3', '4', '1', '6', '5'], ['3', '4', '1', '6', '5', '2']]

[['1', '4', '3', '2', '6', '5'], ['4', '3', '2', '6', '5', '1'], ['3', '2', '6', '5', '1', '4'], ['2', '6', '5', '1', '4', '3'], ['6', '5', '1', '4', '3', '2'], ['5', '1', '4', '3', '2', '6'], ['4', '1', '5', '6', '2', '3'], ['1', '5', '6', '2', '3', '4'], ['5', '6', '2', '3', '4', '1'], ['6', '2', '3', '4', '1', '5'], ['2', '3', '4', '1', '5', '6'], ['3', '4', '1', '5', '6', '2']]

[['1', '4', '3', '5', '2', '6'], ['4', '3', '5', '2', '6', '1'], ['3', '5', '2', '6', '1', '4'], ['5', '2', '6', '1', '4', '3'], ['2', '6', '1', '4', '3', '5'], ['6', '1', '4', '3', '5', '2'], ['4', '1', '6', '2', '5', '3'], ['1', '6', '2', '5', '3', '4'], ['6', '2', '5', '3', '4', '1'], ['2', '5', '3', '4', '1', '6'], ['5', '3', '4', '1', '6', '2'], ['3', '4', '1', '6', '2', '5']]

[['1', '4', '3', '6', '2', '5'], ['4', '3', '6', '2', '5', '1'], ['3', '6', '2', '5', '1', '4'], ['6', '2', '5', '1', '4', '3'], ['2', '5', '1', '4', '3', '6'], ['5', '1', '4', '3', '6', '2'], ['4', '1', '5', '2', '6', '3'], ['1', '5', '2', '6', '3', '4'], ['5', '2', '6', '3', '4', '1'], ['2', '6', '3', '4', '1', '5'], ['6', '3', '4', '1', '5', '2'], ['3', '4', '1', '5', '2', '6']]

[['1', '4', '5', '2', '3', '6'], ['4', '5', '2', '3', '6', '1'], ['5', '2', '3', '6', '1', '4'], ['2', '3', '6', '1', '4', '5'], ['3', '6', '1', '4', '5', '2'], ['6', '1', '4', '5', '2', '3'], ['4', '1', '6', '3', '2', '5'], ['1', '6', '3', '2', '5', '4'], ['6', '3', '2', '5', '4', '1'], ['3', '2', '5', '4', '1', '6'], ['2', '5', '4', '1', '6', '3'], ['5', '4', '1', '6', '3', '2']]

[['1', '4', '5', '3', '2', '6'], ['4', '5', '3', '2', '6', '1'], ['5', '3', '2', '6', '1', '4'], ['3', '2', '6', '1', '4', '5'], ['2', '6', '1', '4', '5', '3'], ['6', '1', '4', '5', '3', '2'], ['4', '1', '6', '2', '3', '5'], ['1', '6', '2', '3', '5', '4'], ['6', '2', '3', '5', '4', '1'], ['2', '3', '5', '4', '1', '6'], ['3', '5', '4', '1', '6', '2'], ['5', '4', '1', '6', '2', '3']]

[['1', '4', '6', '2', '3', '5'], ['4', '6', '2', '3', '5', '1'], ['6', '2', '3', '5', '1', '4'], ['2', '3', '5', '1', '4', '6'], ['3', '5', '1', '4', '6', '2'], ['5', '1', '4', '6', '2', '3'], ['4', '1', '5', '3', '2', '6'], ['1', '5', '3', '2', '6', '4'], ['5', '3', '2', '6', '4', '1'], ['3', '2', '6', '4', '1', '5'], ['2', '6', '4', '1', '5', '3'], ['6', '4', '1', '5', '3', '2']]

[['1', '4', '6', '3', '2', '5'], ['4', '6', '3', '2', '5', '1'], ['6', '3', '2', '5', '1', '4'], ['3', '2', '5', '1', '4', '6'], ['2', '5', '1', '4', '6', '3'], ['5', '1', '4', '6', '3', '2'], ['4', '1', '5', '2', '3', '6'], ['1', '5', '2', '3', '6', '4'], ['5', '2', '3', '6', '4', '1'], ['2', '3', '6', '4', '1', '5'], ['3', '6', '4', '1', '5', '2'], ['6', '4', '1', '5', '2', '3']]

[['1', '5', '2', '3', '4', '6'], ['5', '2', '3', '4', '6', '1'], ['2', '3', '4', '6', '1', '5'], ['3', '4', '6', '1', '5', '2'], ['4', '6', '1', '5', '2', '3'], ['6', '1', '5', '2', '3', '4'], ['5', '1', '6', '4', '3', '2'], ['1', '6', '4', '3', '2', '5'], ['6', '4', '3', '2', '5', '1'], ['4', '3', '2', '5', '1', '6'], ['3', '2', '5', '1', '6', '4'], ['2', '5', '1', '6', '4', '3']]

[['1', '5', '2', '4', '3', '6'], ['5', '2', '4', '3', '6', '1'], ['2', '4', '3', '6', '1', '5'], ['4', '3', '6', '1', '5', '2'], ['3', '6', '1', '5', '2', '4'], ['6', '1', '5', '2', '4', '3'], ['5', '1', '6', '3', '4', '2'], ['1', '6', '3', '4', '2', '5'], ['6', '3', '4', '2', '5', '1'], ['3', '4', '2', '5', '1', '6'], ['4', '2', '5', '1', '6', '3'], ['2', '5', '1', '6', '3', '4']]

[['1', '5', '3', '2', '4', '6'], ['5', '3', '2', '4', '6', '1'], ['3', '2', '4', '6', '1', '5'], ['2', '4', '6', '1', '5', '3'], ['4', '6', '1', '5', '3', '2'], ['6', '1', '5', '3', '2', '4'], ['5', '1', '6', '4', '2', '3'], ['1', '6', '4', '2', '3', '5'], ['6', '4', '2', '3', '5', '1'], ['4', '2', '3', '5', '1', '6'], ['2', '3', '5', '1', '6', '4'], ['3', '5', '1', '6', '4', '2']]

[['1', '5', '3', '4', '2', '6'], ['5', '3', '4', '2', '6', '1'], ['3', '4', '2', '6', '1', '5'], ['4', '2', '6', '1', '5', '3'], ['2', '6', '1', '5', '3', '4'], ['6', '1', '5', '3', '4', '2'], ['5', '1', '6', '2', '4', '3'], ['1', '6', '2', '4', '3', '5'], ['6', '2', '4', '3', '5', '1'], ['2', '4', '3', '5', '1', '6'], ['4', '3', '5', '1', '6', '2'], ['3', '5', '1', '6', '2', '4']]

[['1', '5', '4', '2', '3', '6'], ['5', '4', '2', '3', '6', '1'], ['4', '2', '3', '6', '1', '5'], ['2', '3', '6', '1', '5', '4'], ['3', '6', '1', '5', '4', '2'], ['6', '1', '5', '4', '2', '3'], ['5', '1', '6', '3', '2', '4'], ['1', '6', '3', '2', '4', '5'], ['6', '3', '2', '4', '5', '1'], ['3', '2', '4', '5', '1', '6'], ['2', '4', '5', '1', '6', '3'], ['4', '5', '1', '6', '3', '2']]

[['1', '5', '4', '3', '2', '6'], ['5', '4', '3', '2', '6', '1'], ['4', '3', '2', '6', '1', '5'], ['3', '2', '6', '1', '5', '4'], ['2', '6', '1', '5', '4', '3'], ['6', '1', '5', '4', '3', '2'], ['5', '1', '6', '2', '3', '4'], ['1', '6', '2', '3', '4', '5'], ['6', '2', '3', '4', '5', '1'], ['2', '3', '4', '5', '1', '6'], ['3', '4', '5', '1', '6', '2'], ['4', '5', '1', '6', '2', '3']]

• Where do you learn to write such programs in general.We have been taught $C$ and Java in our school and they dont teach us to write such programs? How do I learn coding such mathematical problems? Oct 25, 2020 at 19:25
• I have some practice using Python to express math concepts. The language is expressive and you can even construct sets using it. If you have a questions about the language I've found stackoverflow to be a good resource. Oct 25, 2020 at 19:35
• @CopyPastelt .Thankyou so much for the help.Just one more thing I wanted to know how do I figure out the disjoint cycles ("(21)(65)(43)" from "(216543)") . They all seem a single 6-cycle to me. Oct 31, 2020 at 12:27
• @smita The geekforgeeks code was using the one-line_notation to represent a permutation and so that is what my answer is using. Oct 31, 2020 at 14:14