Is it generally true that $\langle a,b \rangle \cong \langle c,d \rangle\Rightarrow \text{ either }|a|=|c|,|b|=|d| \text{ or } |a|=|d|,|b|=|c|$?

Background: We are given two groups $$G,H$$ generated by two elements, say $$G=\langle a,b\rangle$$ and $$H=\langle c,d\rangle$$. Further suppose that the orders of $$a,b,c,d$$ are finite and $$\{|a|,|b|\}\neq\{|c|,|d|\}$$. Can we conclude that $$G\not\cong H$$?

Motivation: I have two groups $$G$$ and $$H$$, both being non-Abelian and of order 8 (in fact, $$G$$ is the quaternion group and $$H$$ is the dihedral group of degree 4), and I know a set of generators for both of the two groups, say $$\{a,b\}$$ and $$\{c,d\}$$ correspondingly. I want to show that $$G$$ is not isomorphic to $$H$$ since $$|a|=|b|=|d|=4$$ but $$|c|=2$$, where $$|a|$$ is the order of $$a\in G$$.

• Use $\langle X\rangle$ for $\langle X\rangle$. – Shaun Mar 15 at 17:47
• I fixed the $\LaTeX$ and made the background section more readable. – Alex Provost Mar 15 at 17:56
• The dihedral group of order $2n$ can always be generated by either two elements of order $2$, or one element of order $2$ and one element of order $n$. So for $n\gt 2$, you get a counterexample. – Arturo Magidin Mar 15 at 22:48

No, take $$G=H=\mathbb{Z}_4$$ which has two sets of generators $$\langle 1,2\rangle$$ and $$\langle 1, 3\rangle$$. They satisfy the assumption but the order equalities don't follow.
For non-cyclic case note that if $$\langle a, b\rangle$$ generates a group then so does $$\langle a, ab\rangle$$. Now for any integers $$n,m,r>1$$ there is a (finite) group $$G$$ and elements $$a,b\in G$$ such that $$|a|=n$$, $$|b|=m$$ and $$|ab|=r$$. For details see Theorem 1.64 here. That gives you more counterexamples.