Solution (source code)

= Solution

For $f,g\in L^2(\pi)$, <detailed balance> says that the measure $\pi(dx)K(x,dy)$ is invariant under exchanging $x$ and $y$. Therefore
$$
\begin{aligned}
\langle f,Kg\rangle_\pi
&=\int f(x)g(y)\,\pi(dx)K(x,dy)\\
&=\int f(y)g(x)\,\pi(dx)K(x,dy)
=\langle Kf,g\rangle_\pi.
\end{aligned}
$$
This is precisely the defining identity for a <self-adjoint operator>.