Determine all pairs of integers $a, b$ such that $a^{b}=b^{a}$.
We start, as usual, by introducing $d=a \wedge b$ and writing $a=d a^{\prime}$ and $b=d b^{\prime}$ where $a^{\prime} \wedge b^{\prime}=1$.

We observe that $a=b$ is always a solution.

We seek other solutions. Without loss of generality (by swapping the roles of a and b if necessary), we will assume that $a \geq b$. If $b^{\prime} \geq 2$, then $2^{b^{\prime}-1} > b^{\prime}$.

Finally, if $d \geq 3$, the situation is even more critical, and we show that

$$
d^{b^{\prime}-1} \geq 3^{b^{\prime}-1} > b^{\prime}
$$

Thus, the only solutions are the pairs $(a, a), (2,4)$, and $(4,2)$.