ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 04 Dec 2013 10:33:19 +0100Computing permutationshttps://ask.sagemath.org/question/10790/computing-permutations/Is there a way to solve the following question is Sage? I have symmetric group $S_8$ and its elements $a=(x_1 x_2)(x_3 x_4),b=(x_5 x_6), c=(x_7 x_8)(x_9 x_{10})(x_{11} x_{12})(x_{13} x_{14})$ Here of course we might have $x_i=x_j$ if $i\ne j$. Is some given $(y_1 y_2)\in \langle a,b,c\rangle$?Tue, 03 Dec 2013 16:41:38 +0100https://ask.sagemath.org/question/10790/computing-permutations/Answer by ppurka for <p>Is there a way to solve the following question is Sage? I have symmetric group $S_8$ and its elements $a=(x_1 x_2)(x_3 x_4),b=(x_5 x_6), c=(x_7 x_8)(x_9 x_{10})(x_{11} x_{12})(x_{13} x_{14})$ Here of course we might have $x_i=x_j$ if $i\ne j$. Is some given $(y_1 y_2)\in \langle a,b,c\rangle$?</p>
https://ask.sagemath.org/question/10790/computing-permutations/?answer=15758#post-id-15758You can use the [PermutationGroup](http://www.sagemath.org/doc/reference/groups/sage/groups/perm_gps/permgroup.html#sage.groups.perm_gps.permgroup.PermutationGroup) to create a permutation group from specific elements (cycle notation). And then you can check if a particular element is in the group:
sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]])
sage: G
Permutation Group with generators [(3,4), (1,2,3)(4,5)]
sage: (3,4) in G
True
Wed, 04 Dec 2013 10:33:19 +0100https://ask.sagemath.org/question/10790/computing-permutations/?answer=15758#post-id-15758