Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Generating output in SAGE in a certain form.

I want to use SAGE to generate an output that is suitable for GAP to do further stuff with it.

The input should be a natural number $n \geq 2$.

The output should be a list of tuples containing the non-trivial permutations in their standard form (for example [2,3,1] is the permutation mapping 1->2,2->3,3->1) as the first entry of the tuple and the second entry of the tuple should be their reduced word from ( for [2,3,1] it is [1, 2], obtained via Permutation([2,3,1]).reduced_word_lexmin() ).

So for $n=3$ the output should look as follows:

[ [[1,3,2], [2]], [[2,1,3], [1]], [[2,3,1] , [1, 2]], [[3,1,2], [2, 1]],[[3,2,1] ,[1, 2, 1]] ]

Generating output in SAGE in a certain form.

I want to use SAGE to generate an output that is suitable for GAP to do further stuff with it.

The input should be a natural number $n \geq 2$.

The output should be a list of tuples containing the non-trivial permutations in their standard form (for example [2,3,1] is the permutation mapping 1->2,2->3,3->1) as the first entry of the tuple and the second entry of the tuple should be their reduced word from ( for [2,3,1] it is [1, 2], obtained via Permutation([2,3,1]).reduced_word_lexmin() ).

So for $n=3$ the output should look as follows:

[ [[1,3,2], [2]], [[2,1,3], [1]], [[2,3,1] , [1, 2]], [[3,1,2], [2, 1]],[[3,2,1] ,[1, 2, 1]] ]

So the question is more how to do this quickly with SAGE and is not really mathematical. Sorry in case this question is very elementary, but I have no much experience with SAGE and rarely use it.