# Performance Analysis of P2P Networks with Light Communication Links: The Static Managed Case
## 6 Mathematical Analysis  
Classical P2P and centralized networks can be modeled by aperiodic and irreducible CTMCs with recurring positive states when an infinite population model is considered, due to the intrinsic nature of the system, where nodes enter and leave the network, causing that the file can be continuously shared. These models generally focus on obtaining the average \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Parameter** & **P2P-LiFi** & **C-LiFi** & **P2P-LiFi** & **C-WiFi** \\ \hline \(c\) & [0.125, 0.0625, 0.0416, 0.0312, 0.025] & [0.004, 0.002, 0.0013, 0.001, 0.0008] \\ \(\mu\) & [0.025, 0.0125, 0.0083, 0.00624, 0.005] & [0.0008, 0.0004, 0.00026, 0.0002, 0.00016] \\ _File size_ & & [8 Tb, 16 Tb, 24 Tb, 32 Tb, 40 Tb] \\ _Nodes_ & & [4, 8, 12, 16, 20, 24, 28, 32, 36] \\ _Max. upload_ & 4 per node & 4 per server & 4 per node & 4 per server \\ _Max. download_ & 1 per node & Not applicable & 1 per node & Not applicable \\ _Radio Coverage_ & Variable & Max. & Variable & Max. \\ _Noses_ & & & Not considered & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: General parameters for the scenarios proposed. number of nodes in the queue and waiting/service times in the system. However, when the nodes have restricted mobility (in order to guarantee a certain level of alignment required in light communications), the arrivals and departures are no longer possible, and the node population becomes finite. As such, the file is no longer shared according to the variable population of nodes, but rather, file sharing ends when the last node has downloaded the complete file. Hence, the model developed in this article aims to obtain the average download time in P2P-LiFi and P2P-WiFi, by means of a transitory CTMC, as shown in Figure 10.  
The aforementioned Markov chain is composed of two states, namely the number of leechers (\(x\)) and the number of seeds (\(y\)) for an arbitrary state \((x,y)\) that has as a valid state space \(\{\Omega_{x,y}\ 0\leq x,y\leq N\}\), where \(N\) is the number of nodes in the system. The chain starts when the file is shared by the initial seed, i.e., the node that has the complete file, which is represented by state \((0,1)\). From this state, the system evolves to state \((1,1)\) when the first leecher starts the download of the file. After that, either a new leecher starts the download of the file (transiting to state \((2,1)\)), by using the bandwidth provided by the seed and the leecher, or the leecher ends its download of the file, also becoming a seed (transiting to state \((0,2)\), and so on and so forth, until the last node downloads the complete file, which occurs at the absorbent state \((0,N)\). From this description, the valid transitions of the chain when the system is in the state \((x,y)\) are the following:  
* To state \((x+1,y)\) with rate \(\lambda^{\prime}\), when a new peer (with no chunks of the file) requests and starts the file download procedure in the system, and it becomes a leecher. Note that for the LiFi case, this highly depends on the position of the node with respect to the seeds and other leechers. Indeed, in light communications, it is not possible to reach all nodes directly, as opposed to a broadcast using RF. Here, it is relevant to consider the specific architecture of the network, as explained in previous sections. * To state \((x-1,y+1)\) with rate \(\tau\), when a leecher acquires all the available data in the network and it becomes a seed. The CTMC presented is an aperiodic and transitory chain, where all valid states are transient states, except for the absorbing state \((0,N)\) (where there are no _leechers_ asking  
Figure 10: Mathematical modeling: CTMC of the P2P systems proposed in this work. for information because all peers in the network became _seeds_). Using this model, we can obtain the average file download time in the system.