# Proof of continuous-time markov chain state-space subset sum equivalency

Our course material gives us the following equation without proving it :

Let's consider a continuous-time Markov chain. Its discrete state-space is $\epsilon$ and its infinitesimal generator is $\mathbf{Q}$. $S$ and $S'$ are two subsets of $\epsilon$ such that $S \cup S' = \epsilon$ and $S \cap S' = \emptyset$ : $$\sum_{i \in S}\sum_{j \in S'} \pi_iq_{i,j} = \sum_{i \in S'}\sum_{j \in S} \pi_iq_{i,j}$$

I tried to prove it myself using the principle of flow conservation $\sum_{i \in \epsilon} \pi_iq_{i,j} = 0$ but i always end up looping. It seems like it works using the time-reversibility property ($\pi_iq_{i,j} = \pi_jq_{j,i}$) but i'm almost certain it's not usable in a generic case.

I read the course again and i had missed an important property : $\sum_{j \in \epsilon} q_{i,j} = 0$.

So we can deduce the two following equivalencies :

$\sum_{i \in \epsilon} \pi_iq_{i,j} = 0 \Leftrightarrow \sum_{i \in S} \pi_iq_{i,j} = - \sum_{i \in S'} \pi_iq_{i,j}$

$\sum_{j \in \epsilon} q_{i,j} = 0 \Leftrightarrow \sum_{j \in S} q_{i,j} = - \sum_{j \in S'} q_{i,j}$

Yet I am not completely sure of this answer (it seems correct to me), could you please comment ?

And by using both a combination of these two properties and switching the sums and removing the constant ($\sum_a\sum_b ab = \sum_b\sum_a ab$, and $\sum_a c * a = c * \sum_a a$), we can write :

$$\sum_{i \in S}\sum_{j \in S'} \pi_iq_{i,j} \\ = \sum_{i \in S} \pi_i \sum_{j \in S'} q_{i,j} \\ = \sum_{i \in S} \pi_i (- \sum_{j \in S} q_{i,j}) \\ = - \sum_{j \in S} \sum_{i \in S} \pi_i q_{i,j} \\ = - \sum_{j \in S} (- \sum_{i \in S'} \pi_i q_{i,j}) \\ = \sum_{i \in S'} \sum_{j \in S} \pi_i q_{i,j}$$