## 4 The Energy Balance Problem
### The General Solution
**Theorem 2**: To achieve energy balance in the network, the following recurrency equation should hold:  
\[a_{i+1}E[f_{i+1}]-(d_{i}+a_{i})E[f_{i}]+d_{i-1}E[f_{i-1}]=\]  
\[=a_{i}E[g_{i}]-a_{i+1}E[g_{i+1}]\]  
where  
\[a_{i}=\frac{i^{2}}{2i-1}\quad\quad\quad d_{i}=\frac{(i+1)^{2}-1}{2i+1}\]  
**Proof:** For the case \(j=i+1\) of the equation 5 and using the lemmata 7 and 9 we have:  
\[\frac{E[h_{i}]E[\epsilon_{i,j}]}{S_{i}}=\frac{E[h_{i+1}]E[\epsilon_{i+1,j}]}{ S_{i+1}}\quad\Leftrightarrow\]  
\[\frac{E[h_{i}][i^{2}-p_{i}(i^{2}-1)]}{(2i-1)}=\frac{E[h_{i+1}]\{(i+1)^{2}-p_{ i+1}[(i+1)^{2}-1]\}}{(2i+1)}\quad\Leftrightarrow\]  
\[\frac{i^{2}}{2i-1}E[h_{i}]-p_{i}E[h_{i}]\frac{i^{2}-1}{2i-1}=\]  
\[=\frac{(i+1)^{2}}{2i+1}E[h_{i+1}]-p_{i+1}E[h_{i+1}]\frac{(i+1)^{2}-1}{2i+1}\]  
Let \(a_{i}\), \(d_{i}\) as defined in the Theorem statement above. By lemma 11 we know that \(p_{i}E[h_{i}]=E[f_{i-1}]\) and by lemma 10 it is \(E[h_{i}]=E[g_{i}]+E[f_{i}]\) thus the last equation becomes:  
\[E[f_{i}]=\sum_{n=0}^{N}E\left[\sum_{j=0}^{h_{i+1}}\delta_{i+1,j}\Big{|}h_{i+ 1}=n\right]\cdot\mathbf{P}\{h_{i+1}=n\}\]0  
\[E[f_{i}]=\sum_{n=0}^{N}E\left[\sum_{j=0}^{h_{i+1}}\delta_{i+1,j}\Big{|}h_{i+ 1}=n\right]\cdot\mathbf{P}\{h_{i+1}=n\}\]1  
\(\diamond\)  
To solve the above recurrency we must compute \(E[g_{i}]\). **Lemma 12**: If N is the total number of events that are generated in the network, the mean value of \(g_{i}\) is given by the following relationship:  
\[E[f_{i}]=\sum_{n=0}^{N}E\left[\sum_{j=0}^{h_{i+1}}\delta_{i+1,j}\Big{|}h_{i+ 1}=n\right]\cdot\mathbf{P}\{h_{i+1}=n\}\]2  
**Proof:** Because the position of each event is independent of other events and because for each sector \(i\), probability \(\lambda_{i}\) is the same, clearly \(g_{i}\) is binomial with parameters N, \(\lambda_{i}\). \(\diamond\)  
In order to have a simpler recurrence involving only two (successive in fact) terms of the \(E[f_{i}]\) sequence, we will transform the recurrency relation of Theorem 2 into the following (easier to solve) relation:  
**Lemma 13**: The recurrency relation:  
\[E[f_{i}]=\sum_{n=0}^{N}E\left[\sum_{j=0}^{h_{i+1}}\delta_{i+1,j}\Big{|}h_{i+ 1}=n\right]\cdot\mathbf{P}\{h_{i+1}=n\}\]3 \[E[f_{i}]=\sum_{n=0}^{N}E\left[\sum_{j=0}^{h_{i+1}}\delta_{i+1,j}\Big{|}h_{i+ 1}=n\right]\cdot\mathbf{P}\{h_{i+1}=n\}\]4 \[E[f_{i}]=\sum_{n=0}^{N}E\left[\sum_{j=0}^{h_{i+1}}\delta_{i+1,j}\Big{|}h_{i+ 1}=n\right]\cdot\mathbf{P}\{h_{i+1}=n\}\]5  
has as a solution the function  
\[E[f_{i}]=\sum_{n=0}^{N}E\left[\sum_{j=0}^{h_{i+1}}\delta_{i+1,j}\Big{|}h_{i+ 1}=n\right]\cdot\mathbf{P}\{h_{i+1}=n\}\]6  
**Proof:** The proof is done by induction on \(i\). For \(i=0\), it is obviously true. Let it be true for \(i-1\). For \(i\) we have:  
\[E[f_{i}]=\sum_{n=0}^{N}E\left[\sum_{j=0}^{h_{i+1}}\delta_{i+1,j}\Big{|}h_{i+ 1}=n\right]\cdot\mathbf{P}\{h_{i+1}=n\}\]7  
By the induction hypothesis we get the solution  
\[E[f_{i}]=\sum_{n=0}^{N}E\left[\sum_{j=0}^{h_{i+1}}\delta_{i+1,j}\Big{|}h_{i+ 1}=n\right]\cdot\mathbf{P}\{h_{i+1}=n\}\]8  
\(\diamond\)  
Now the recurrency relation of Thrm 2 is simplified:  
\[E[f_{i}]=\sum_{n=0}^{N}E\left[\sum_{j=0}^{h_{i+1}}\delta_{i+1,j}\Big{|}h_{i+ 1}=n\right]\cdot\mathbf{P}\{h_{i+1}=n\}\]9  
Thus, we get a recurrence for sequence \(E[f_{i}]\) involving only two successive terms of the sequence:  
**Theorem 3**: The recurrency relation  
\[E\left[\frac{\sum_{k=1}^{h_{i}}\epsilon_{ik}}{S_{i}}\right]=E\left[\frac{\sum_{k =1}^{h_{j}}\epsilon_{jk}}{S_{j}}\right]\quad\forall i,j\in\{1,\ldots n\} \tag{5}\]0  
where \(t_{i}\) is defined in lemma 13, has the following solution  
\[E\left[\frac{\sum_{k=1}^{h_{i}}\epsilon_{ik}}{S_{i}}\right]=E\left[\frac{\sum_{k =1}^{h_{j}}\epsilon_{jk}}{S_{j}}\right]\quad\forall i,j\in\{1,\ldots n\} \tag{5}\]1  
The proof is rather complex, so we omit it here. The interested reader may find it in [16].