## 5 Analytical Modeling
### Dynamic Transmission Model of Coded Packets during One Cycle  
We developed an analytical model to describe the dissemination process of coded packets during one cycle. Based on this model, the cumulative distribution function (CDF) of random variable \(D_{i}\), the time that the destination obtains \(i\) packets, for \(i\) = 1,..., \(H\), was calculated. For a cycle \(r\), the source node injected \(M_{r}\)-independent-coded packets into the network. Considering that the cache of an intermediate node could store \(H\)-encoding packets at most, we divided the intermediate nodes in the network into \(H+1\) types (0, 1, 2,..., \(H\)) according to the actual number of coded packets stored in the cache. Nodes storing \(i\) coded packets were denoted as type \(v_{i}\), where \(0\leq i\leq H\). The receiving rate of nodes of type \(v_{i}\) was represented by \(Re_{i}(t)\) (\(0\leq i\leq H\)). That is, the expected number of new independent packets received by intermediate nodes of type \(v_{i}\) in a unit interval and \(Re_{i}^{d}(t)\) represented the receiving rate of the destination node. We take \(F_{i}(t)\) (P(\(D_{i}<t\))) as the CDF of \(D_{i}\), then the derivative of \(F_{i}(t)\) can be approximated as:  
\[\frac{dF_{i}(t)}{dt}=\lim_{\Delta t\to 0}\frac{F_{i}(t+\Delta t)-F_{i}(t)}{ \Delta t}=\lim_{\Delta t\to 0}\frac{P(D_{i}>t)-P(D_{i}>t+\Delta t)}{\Delta t} \tag{2}\]  
The event \(\{D_{i}>t+\cdot t\}\) is equivalent to \(\{D_{i}>t\}\), then \(\{D_{i}>t+\cdot t\}\)=\(\{D_{i}>t+\cdot t,\;\;D_{i}>t\}\). Therefore, we can get Equation (3):  
\[P(D_{i}>t+\Delta t)=P(D_{i}>t+\Delta t,D_{i}>t)=P(D_{i}>t)\cdot[1-P(D_{i}<t+ \Delta t\big{|}D_{i}>t)] \tag{3}\]  
For \(P(D_{i}<t+\Delta t|D_{i}>t)\), the probability for the destination node receiving multiple coded packets in a very short interval \(\cdot t\) is so low that this situation can be ignored. Then the event \(\{D_{i}<t+\cdot t\}\) that the destination received \(i\) packets before time \(t+\cdot t\) only occurs if the event \(\{D_{i-1}<t\}\) that the destination received \(i-1\) packets before \(t\) happens. Therefore, we can get Equation (4):  
\[P(D_{i}<t+\Delta t\big{|}D_{i}>t)\approx\Delta t\cdot\text{Re}_{i-1}^{d}(t) \cdot P(D_{i}<t\big{|}D_{i}>t), \tag{4}\]  
where \(Re_{i-1}^{d}(t)\) represents the receiving rate when the destination node stores \(i-1\) coded packets, that is, the probability of receiving a new encoding packet within \(\cdot t\). Substituting Equations (3) and (4) into Equation (2), we can get:  
\[\frac{dF_{i}(t)}{dt}=\lim_{\Delta t\to 0}\frac{\Delta t\cdot\text{Re}_{i-1}^{d}(t) \cdot[P(D_{i-1}>t)-P(D_{i}>t)]}{\Delta t}=\text{Re}_{i-1}^{d}(t)\cdot[F_{i-1} (t)-F_{i}(t)] \tag{5}\]  
\[\frac{dF_{1}(t)}{dt}=\text{Re}_{0}^{d}(t)\cdot[1-F_{1}(t)] \tag{6}\]  
The initial values are \(F_{i}(0)=0\), (\(i=0,1,\;2,\ldots,M_{r}\)). To obtain \(F_{i}(t)\), \(Re_{i}^{d}(t)\) has to be calculated. * The calculation of \(Re_{i}(t)\)  
The network state was described by the packet distribution in relay nodes by a H-tuple \(\{X_{0}(t),X_{1}(t),\ldots,X_{H}(t)\}\). Where \(X_{i}(t)\) represents the number of type \(v_{i}\) nodes at time \(t\), and obviously \(\sum_{i=0}^{H}X_{i}(t)=N\). In the packet diffusion phase, when a type \(v_{i}\) node \(m_{i}\) encounters a type \(v_{j}\) node \(m_{j}\), the replication operation would not take place if a packet to be copied to \(m_{i}\) already exists in the cache of \(m_{i}\). Therefore, there is a certain probability for node \(m_{i}\) to obtain a new independent packet at \(m_{j}\). We denote it as P\((i,j)\). Since we assumed that only one coded packet could be forwarded at each encounter, the receiving rates of nodes (including intermediate nodes and the destination node) are shown in Formulas (7)-(10). For intermediate nodes:  
\[\text{Re}_{0}(t)= \begin{cases}\lambda(\sum\limits_{j=1}^{H}X_{j}+1),&0<t\leq T _{s\_r}\\ 0,&T_{s\_r}<t\leq T_{s\_r}+T_{w\_r}\end{cases}  \tag{7}\]  
\[\text{Re}_{i}(t)=