Determine all pairs of natural numbers $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$.

First, we note 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 assume that $a \leq b$. 

If $d=1$, then $a^{\prime}=a$ and $b^{\prime}=b$. The equation becomes $a^{b-1} = b$. For $a \geq 2$, we have $2^{b-1} > b$.

If $d=2$, then the equation becomes $2^{b^{\prime}-1} = b^{\prime}$. For $b^{\prime} \geq 2$, we have $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)$.