Solution (source code)

= Solution

This is a <birth-death master equation>: $q_n$ is the <transition rate> $n\to n+1$ and $r_n$ is the <transition rate> $n\to n-1$. The first two terms are incoming <probability> flows from the adjacent states; the last removes <probability> at the total escape rate $q_n+r_n$. Rates must be nonnegative. For a population on the nonnegative integers, take $r_0=0$ and no incoming flux from negative states.

Summing over all states and shifting the two incoming indices gives
$$
\frac d{dt}\sum_nP_n=\sum_n r_nP_n+\sum_nq_nP_n-\sum_n(q_n+r_n)P_n=0.
$$
Thus an initially normalized <probability distribution> remains normalized. The cancellation assumes no boundary flux and legitimate summation; on an infinite state space this means the nonexplosive process or a boundary prescription that conserves total <probability>. All rates used in the later parts satisfy this requirement.