# Efficiency of Group-Theoretic Algorithms in MAGMA

Given a finite permutation group $G$ and an element $a\in G$ with conjugacy class $X$, I am interested in determining when for a given element $x\in X$ the subgroup $<a,x>$ generated by $a$ and $x$ is isomorphic to a fixed subgroup $H\leq G$.

To identify which elements of $X$ satisfy this property, I am using the computer algebra software MAGMA, with the command IsIsomorphic(sub$<G|a,x>$,$H$). Naturally I can improve the efficiency of the algorithm by not naively checking this isomorphism for all pairs $(a,x)\in X\times X$, but rather removing an element from $X$ once I have checked whether it generates $H$ with any other element that has not already been checked (I hope that makes sense). However, this still seems to be an inefficient way to proceed.

Given that I know $\vert H\vert$ and I also know $\vert ax\vert$ in the case that $<a,x>\cong H$, then does anyone know whether it will be more efficient to check these properties first before using the command IsIsomorphic or will it be less efficient (since I am assuming that these checks will be built into the IsIsomorphic command).

-
I would guess that testing yourself whether $|\langle a,x \rangle| = |H|$ will not make much difference, because that is just about the first thing that IsIsomorphic will check. But if you know the set of element orders of $H$, and it happens frequently that $|ax|$ is not in that set, then it would probably be worth checking that in advance. You could even calculate the orders of a small number of random elements of $\langle a,x \rangle$. It really depends on how often this test results in an immediate negative answer, which will depend on the groups involved. – Derek Holt Feb 20 '13 at 13:02
Thanks for the response. The situation in question occurs whan $\vert ax\vert=p^{4}$ for a fixed prime $p$, and it is indeed often the case that $ax$ is not even a $p$-element. Thus it sounds as if checking $\vert ax\vert$ before proceeding to use IsIsomorphic will increase the efficiency of the algorithm. – David Ward Feb 20 '13 at 13:13
I don't have an answer, but I suggest you email the Magma people. I asked them something a while ago and one of the developers got back to me quickly, providing information not in the documentation (probably not known by the general public) which completely solved my problem. Yours is an interesting problem, so I'm sure they'll help you out too. – Alexander Gruber Feb 24 '13 at 20:53