For the Boltzmann distribution, detailed balance results in wiwj=exp(−β(Ei−Ej)).
Let us now specialize to a system whose energy is defined by the orientation of single spins. Consider the state i, with given energy Ei represented by the following N spins ↑↑↑…↑↓↑…↑↓123…k−1kk+1…N−1N