# Performance Analysis of P2P Networks with Light Communication Links: The Static Managed Case
## 6 Mathematical Analysis
Note that if the coverage area of each node is the maximum, i.e., all nodes can directly reach any other node in the network (which can only occur in the RF system), then any peer can cooperate with each other, otherwise the nodes furthest away from the initial seed will have to wait until the neighbor nodes download the file to start their own download procedure. This can be seen as nodes placed at different levels, as depicted in Figure 5, such that nodes in level 1 have to download the file in order to provide connections to the nodes at level 2, and so on. Another important detail in the model is the conversion rate (\(\tau\)), which represents the rate that leechers become seeds, i.e., the download rate of the complete file. Note that this rate depends on the available bandwidth in the system, which is given by the number of seeds and leechers that can share their file, i.e., in the communication range of the downloading peer. As Equation (15) shows, if the number of sharing peers is sufficiently high such that the bandwidth available is higher than \(cx\), i.e., the total download rate in the system, then \(\tau=cx\) and the rest of the bandwidth is unused. Conversely, when the total available bandwidth is lower, there are not enough resources to allow for the download of the file at the maximum capacity. Then, the transition rate can be expressed as:  
\[\tau=min(cx,\mu(\eta x+y)) \tag{15}\]  
where \(\eta\) is an efficiency parameter, given that not all leechers can share their chunks to each other, since other peers may already have those chunks. Note that seeds are not affected by this parameter. Finally, the rate \(\lambda^{\prime}\), represents the rate at which neighbor leechers, i.e., nodes inside the coverage area of other leechers and seeds, request information for the first time in the system. Indeed, not all nodes start the download procedure simultaneously, but rather, it depends on hardware restrictions. Specifically, we assume that the time at which a node can start the file-sharing procedure will directly depend on the communication bandwidth, \(c+\mu\), and a system control variable (\(\xi\)) particular to the system's hardware and software, as described in (16). \[\lambda^{\prime}=\xi(c+\mu) \tag{16}\]  
Figure 11 is a generalization of the proposed chain shown in Figure 10, because at a given state \((x,y)\) there can only occur two possible events: either a new peer starts the file download, with rate \(\lambda^{\prime}\); or a leecher becomes a seed, with rate \(\tau\). This _compact_ representation of the Markov chain becomes very useful to numerically solve the chain, as described in Algorithm 1. The analytical results obtained from the proposed Markov chain are validated through discrete event simulation (DES) of the system described in Algorithm 2, in both cases having as a main objective the calculation of the time in which the information is fully propagated through the network (both algorithms are detailed in the Appendix A). Figure 11: Generalization of the proposed CTMC, starting from a base state \((x,y)\) and its possible transitions. ```
Data:\(iterations,\mu,c,nodes,coverage,\xi\) Result{sharing\(\gets\) 0; while\(i\)\(<=\) iterationsdo \(y\gets 1\); \(x\gets 0\); \(tsim\gets 0\); while\(y\)\(<\) coveragedo \(tmin,index\leftarrow\)\(min(x,y,\xi,c,\mu)\); \(tsim\gets\)\(tsim+tmin\); if\(index==0\)then \(x\gets x+1\); else \(x\gets x-1\); \(y\gets y+1\); if\(y==\) nodesthen \(tsharing\gets\)\(tsharing+tsim\); \(tsharing\leftarrow(\frac{nodes}{coverage})(\frac{tsharing}{iterations})\) ;
```  
**Algorithm 1**P2P-LiFi/P2P-WiFi/centralized numerical solution algorithm.