Probability of $\alpha\beta\gamma=\gamma\beta\alpha$ for random permutations of a finite set?

Theorem. For any finite group $G$, we have $P(\alpha\beta=\beta\alpha)=P(\alpha\beta\gamma=\gamma\beta\alpha)$.

Proof. We know already that $P(\alpha\beta=\beta\alpha)=k/|G|$ (readers: see previously linked question), and we will derive the same formula for $P(\alpha\beta\gamma=\gamma\beta\alpha)$. First, writing $x=\alpha\beta$ and $y=\beta\alpha$, count

$$\frac{1}{|G|^3}\sum_{(x,y)\in G^2}\color{Blue}{\#\{(\alpha,\beta)\in G^2:\begin{smallmatrix}\alpha\beta=x \\ \beta\alpha=y\end{smallmatrix}\}}\times\color{Red}{\#\{\gamma\in G:x\gamma=\gamma y\}}.$$

Rearrange $\alpha\beta=x$ to $\beta=\alpha^{-1}x$ and plug into $\beta\alpha=y$ for $\alpha^{-1}x\alpha=y$. Thus the blue count is $0$ if the elements $x\not\sim y$, and is $|C_G(x)|$ if $x\sim y$: in any $G$-set, if two elements are in the same orbit, the number of elements which move the first to the second is the size of the first's stabilizer. For the red count, rewrite $x\gamma=\gamma y$ as $x=\gamma y\gamma^{-1}$. By the same principle, this is $|C_G(y)|$ if $x\sim y$ and $0$ if they are not conjugate. We know $|C_G(x)|=|G|/|K|$ where $K$ is $x$'s conjugacy class. Let the classes be listed as $K_1,K_2,\cdots,K_k$. Then we have

$$\frac{1}{|G|^3}\sum_{i=1}^k\sum_{\color{Purple}{x,y\in K_{\Large i}}}\color{Green}{|C_G(x)||C_G(y)|}=\frac{1}{|G|^3}\sum_{i=1}^k \color{Purple}{|K_i|^2}\color{Green}{\left(\frac{|G|}{|K_i|}\right)^2}=\frac{k}{|G|}.$$


Commutativity can be compared to a torus. The product of all elements around the perimeter is the identity. $ab=ba$ can be re-written $aba^{-1}b^{-1}=1$.

Notice $abca^{-1}b^{-1}c^{-1}$ also defines the boundary of a torus. I always get confused about the second one. It's because you can tile the plane with hexagons.

Then you can define a sum $ \sum_{a,b \in G} \delta(aba^{-1}b^{-1}) $ or $ \sum_{a,b,c \in G} \delta(abca^{-1}b^{-1}c^{-1}) $ to count the combinations of group elements solving your equation.


We will get the same answer in both cases: the number of conjugacy classes of $G$.

If you put four hexagons together maybe you can get a commuting pair. I have written down:

$$ [cbcb,a]=1 \text{ if } abc=cba$$

Is this a bijection? Can we take a square torus and construct the hexagon torus?

We can because the fundamental parallelogram and the boundary of the 4 hexagons are homotopic. This is in Chapter 2 of Algebraic Topology by Allen Hatcher.