Metropolis algorithm, setting it up

Since the probability of making some transition must be 1, \( \sum_j T_{i\rightarrow j} = 1 \), and Eq. (5) becomes

$$ \begin{equation} {\cal w}^{(n)}_i = {\cal w}^{(n-1)}_i + \sum_j \left [ {\cal w}^{(n-1)}_jT_{j\rightarrow i} A_{j\rightarrow i} -{\cal w}^{(n-1)}_iT_{i\rightarrow j}A_{i\rightarrow j} \right ] \,. \tag{6} \end{equation} $$