<s>[INST] Equations over permutations Let $\sigma=\begin{pmatrix} 1 & 2 & 3 & 4 \\ 3 & 1 & 4 & 2 \end{pmatrix} \in S_4$ and $\theta=\begin{pmatrix} 1 & 2 & 3 & 4 \\ 2 & 1 & 4 & 3 \end{pmatrix} \in S_4$. 
Solve the following equations $(x \in S_4)$: 
a) $x \sigma = \sigma x$;
b) $x^2 = \sigma$;
c) $x^2 = \theta$.
I'm writing here my work. I want to know if something goes wrong in my proof.
We denote the number of inversions in $σ$ with $N(\sigma)$ and the sign of permutation $\sigma$ with $\text{sgn}(\sigma)$.
b) We have 
$\text{sgn}(\sigma)=(-1)^{N(\sigma)}=(-1)^3=-1$, and $\text{sgn}(x^2)=\text{sgn}(x) \cdot \text{sgn}(x)=(-1)^{2 \cdot N(x)}=1$.
Relation $\text{sgn}(\sigma) \ne \text{sgn}(x^2)$ imply that the equation $x^2 = \sigma$ has no solutions in $S_4$. 
Ideas for the rest of the exercise, please?
 [/INST] a) Let $x=\begin{pmatrix} 1 & 2 & 3 & 4 \\ a & b & c & d \end{pmatrix} \in S_4$. Then 
$x\sigma=\begin{pmatrix} 1 & 2 & 3 & 4 \\ a & b & c & d \end{pmatrix} \cdot \begin{pmatrix} 1 & 2 & 3 & 4 \\ 3 & 1 & 4 & 2 \end{pmatrix}=\begin{pmatrix} 1 & 2 & 3 & 4 \\ c & a & d & b \end{pmatrix}$.
We conclude that $x(\sigma(1))=c$, $x(\sigma(2))=a$, $x(\sigma(3))=d$, and $x(\sigma(4))=b$.
Case 1. If $a=1$, then $x(1)=1$, which implies that $\sigma(x(1))=\sigma(1)=3$. On the other hand, $\sigma(x(1))=c$. Hence $c=3$.
Now, $x(3)=3$, which implies that $\sigma(x(3))=\sigma(3)=4$. On the other hand, $x(\sigma(3))=d$. Hence $d=4$.
Now, $x(4)=4$, which implies that $\sigma(x(4))=\sigma(4)=2$. On the other hand, $x(\sigma(4))=b$. Hence $b=2$.
In this case we obtain the solution $x=\begin{pmatrix} 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \end{pmatrix}$.
Case 2. If $a=2$, then $x(1)=2$, which implies that $\sigma(x(1))=\sigma(2)=1$. On the other hand, $\sigma(x(1))=c$. Hence $c=1$.
Now, $x(3)=1$, which implies that $\sigma(x(3))=\sigma(1)=3$. On the other hand, $x(\sigma(3))=d$. Hence $d=3$.
Now, $x(4)=3$, which implies that $\sigma(x(4))=\sigma(3)=4$. On the other hand, $x(\sigma(4))=b$. Hence $b=4$.
In this case we obtain the solution $x=\begin{pmatrix} 1 & 2 & 3 & 4 \\ 2 & 4 & 1 & 3 \end{pmatrix}$.
Case 3. If $a=3$, then $x(1)=3$, which implies that $\sigma(x(1))=\sigma(3)=4$. On the other hand, $\sigma(x(1))=c$. Hence $c=4$.
Now, $x(3)=4$, which implies that $\sigma(x(3))=\sigma(4)=2$. On the other hand, $x(\sigma(3))=d$. Hence $d=2$.
Now, $x(4)=2$, which implies that $\sigma(x(4))=\sigma(2)=1$. On the other hand, $x(\sigma(4))=b$. Hence $b=1$.
In this case we obtain the solution $x=\begin{pmatrix} 1 & 2 & 3 & 4 \\ 3 & 1 & 4 & 2 \end{pmatrix}$.
Case 4. If $a=4$, then $x(1)=4$, which implies that $\sigma(x(1))=\sigma(4)=2$. On the other hand, $\sigma(x(1))=c$. Hence $c=2$.
Now, $x(3)=2$, which implies that $\sigma(x(3))=\sigma(2)=1$. On the other hand, $x(\sigma(3))=d$. Hence $d=1$.
Now, $x(4)=1$, which implies that $\sigma(x(4))=\sigma(1)=3$. On the other hand, $x(\sigma(4))=b$. Hence $b=3$.
In this case we obtain the solution $x=\begin{pmatrix} 1 & 2 & 3 & 4 \\ 4 & 3 & 2 & 1 \end{pmatrix}$.
Conclusion: The equation $x\sigma=\sigma x$ has $4$ solutions in $S_4$:
$x=\begin{pmatrix} 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \end{pmatrix}$, $x=\begin{pmatrix} 1 & 2 & 3 & 4 \\ 2 & 4 & 1 & 3 \end{pmatrix}$, $x=\begin{pmatrix} 1 & 2 & 3 & 4 \\ 3 & 1 & 4 & 2 \end{pmatrix}$, and $x=\begin{pmatrix} 1 & 2 & 3 & 4 \\ 4 & 3 & 2 & 1 \end{pmatrix}$.
</s>