The Metropolis Algorithm and Detailed Balance

All probabilities are normalized, meaning that \( \sum_j T_{i\rightarrow j} = 1 \). Using the latter, we can rewrite the previous equation as $$ \begin{equation*} w_i(t+1) = w_i(t) + \sum_j \left [ w_j(t)T_{j\rightarrow i} A_{j\rightarrow i} -w_i(t)T_{i\rightarrow j}A_{i\rightarrow j}\right ] \,, \end{equation*} $$ which can be rewritten as $$ \begin{equation*} w_i(t+1)-w_i(t) = \sum_j \left [w_j(t)T_{j\rightarrow i} A_{j\rightarrow i} -w_i(t)T_{i\rightarrow j}A_{i\rightarrow j}\right ] . \end{equation*} $$