How many functions makes that $G$ has a group structure. Let $G=\{a_1,a_2,a_3,a_4,a_5,a_6\}$ a set of $6$ elements. Calculate how many functions $\phi:G\times G\rightarrow G$ exist such that $G$ has a group structure, where $a_1$ is the neutral element.
I know that exist only two groups up to isomorphisms: $\mathbb{Z}_6$ and $S_3$.
Some ideas?
 A: One way to see this, we denote :
$$Y:=\{\phi:G\times G\rightarrow G\mid \phi\text{ is a group structure with }a_1\text{ the neutral element}\} $$
The group $S_{G-\{a_1\}}$ (symmetric group over $G-\{a_1\}$) acts on $Y$ by :
$$\sigma.\phi(g,h):=\sigma(\phi(\sigma^{-1}(g),\sigma^{-1}(h)) $$
You should verify that it still verifies the axioms (but this is the case). For $\phi\in Y$ I denote $G_{\phi}$ the group with the set $G$ and groupe structure $\phi$.

My claim 1 : $Stab(\phi)$  is isomorphic to $Aut(G_{\phi})$. 

To $\sigma\in Stab(\phi)$ you associate the map :
$$\psi_{\sigma}:G_{\phi}\rightarrow G_{\phi} $$
$$a_1\mapsto a_1$$
$$a_i\mapsto \sigma(a_i)\text{ if }i\geq 2$$

My claim 2 : if $G_{\phi}$ is isomorphic to $G_{\phi'}$ then there exists $\sigma \in S_{G-\{a_1\}}$ such that $\sigma.\phi=\phi'$. 

It is easier than it looks...

My (your) claim 3 : There are exactly two classes of isomorphisms in $Y$ : $\mathbb{Z}_6$ and $S_3$. 

You already know this.

My claim 4 : $Aut(\mathbb{Z}_6)$ is of cardinal $2$ and $Aut(S_3)$ is of cardinal $6$. 

Using claim 3 we have :
$$Y=Y_{\mathbb{Z}_6}\cup Y_{S_3} $$
Where $Y_W$ denotes the $\phi$'s in $Y$ leading to $G_{\phi}$ isomorphic to $W$. For $W=\mathbb{Z}_6$ or $S_3$, denote $\phi_W$ one element in $Y_W$. From claim 2 we have :
$$Y_W=S_{G-\{a_1\}}.\phi_W $$
Using the first class formula :
$$|Y_W|=\frac{|S_{G-\{a_1\}}|}{|Stab(\phi_W)|}=\frac{120}{|Stab(\phi_W)|} $$
Using claim 1 :
$$|Y_W|=\frac{120}{|Aut(W)|}$$
Using claim 4 :
$$Y_{\mathbb{Z}_6}=60$$
$$Y_{S_3}=20$$
Hence you have $80$ such functions.
A: You're really just looking for how many distinct ways you can end up defining the same operation, up to renaming of elements (and we have already fixed $a_1$ as the identity, so we're really just playing with $a_2$ through $a_6$. The slightly tricky bit is that some elements in groups are essentially equivalent to one another. I will work the easier $\mathbb{Z}_6$ case, and leave the application of the same ideas to $S_3$ to you.
Note that $\mathbb{Z}_6$ has one order 2 element, two order 3 elements, and two order 6 elements. However, it does not matter which order 3 element is which because there is an automorphism of $\mathbb{Z}_6$ which exchanges them (the only non-trivial automorphism of $\mathbb{Z}_6$). The same holds for the two order 6 elements for the same reason. This means we are looking to chose: two of the five elements to be order 6, two of them to be order 3, and one to be order 2. Thus the count of how ways this can be done can be computed as:
$\left(\begin{array}{c}5\\2\end{array}\right)\left(\begin{array}{c}3\\2\end{array}\right)$
The above represents choosing two to be either order 3 or order 6, then two more to be the other of those orders, leaving only one choice for the last element. This is still an overcount because once you decide which order 3 element is which, you have also determined which order 6 element is which, or vice versa, hence you really only have half that many ways:
$\frac{1}{2} \left(\begin{array}{c}5\\2\end{array}\right)\left(\begin{array}{c}3\\2\end{array}\right)$
The situation for $S_3$ is a little more delicate because of the larger number of automorphisms $S_3$ has. Specifically, you cannot freely permute the 3 order 2 elements via automorphism without sometimes switching which order 3 element is which.
