## 4 Analytical Model For Optimal Cache Deployment
### Analytical Model
#### 4.2.2 Formula Derivation  
We denote by \(RO_{avg}/req\) the average resource occupation of a video request per second under a given storage capacity distribution. \(RO_{avg}/req\) is the product of the average number of hops and the average bit-rate of all video requests. Equation (4) represents \(RO_{avg}/req\) corresponding to storing \(k\) items in the AMEN caches, where the three terms represent the average RO to deliver the content stored at the AMEN caches, the MCEN cache and the data center, respectively. Note that the denominator of Equation (1) which represents the normalization factor of the _Zipf_ distribution is omitted here, it being a constant value. Moreover, we note that the number of items which could be stored in the metro cache (given that \(k\) items are stored in \(n_{access}\) access caches) is \(\lfloor\frac{T}{S_{a}}-n_{access}\cdot k\rfloor\), where \(\frac{T}{S_{a}}\) is the maximum number of items which could be stored and \(n_{access}\cdot k\) is the total storage capacity (represented by number of items) in the \(n_{access}\) access caches. Therefore, the rank of the last item stored in the metro cache is \(k+\frac{T}{S_{a}}-n_{access}k\). \[RO_{avg}/req(k)=h_{access}\sum_{j=1}^{k}\left(\frac{1}{j}\right)+h_{metro}^{ k+\frac{T}{S_{a}}-(n_{access})k}\left(\frac{1}{j}\right)+h_{server}\sum_{j=\frac{T}{S_{a}}-(n_{ access}-1)k+1}^{N}\left(\frac{1}{j}\right) \tag{4}\]  
We now focus on the objective of the analytical model, which is to find the value of \(k\) which minimizes the \(RO_{avg}/req\) of all VoD requests. As seen in our previous work through simulative results, the value of \(RO_{avg}/req\) initially decreases as \(k\) increases until a certain value of \(k\), at which \(RO_{avg}/req\) increases again. Mathematically, the \"optimal\" \(k\) value (i.e., the value of \(k\) guaranteeing the optimal storage capacity utilization, and thus the minimal \(RO\)) is the value of \(k\) that, if stored in the caches of the access segment, leads to \(RO_{avg}/req\) lower than that if \(k+1\) items are stored in the caches of the access segment. Hence, we represent the equation for \(RO_{avg}/req\) if \(k+1\) items are stored in the caches of the access segment in Equation (5). Note that by storing \(k+1\) items in the caches of the access segment instead of \(k\) items, the amount of storage remaining for the cache of the metro segment decreases by \(S_{a}\cdot n_{access}\). For this reason, the indexes of the sum at the second and third terms change accordingly. \[RO_{avg}/req(k+1)=h_{access}\sum_{i=1}^{k+1}\left(\frac{1}{i} \right)+h_{metro}^{k+2+\frac{T}{S_{a}}-(n_{access})(k+1)}\left(\frac{1}{j}\right) \tag{5}\] \[+h_{server}\sum_{j=k+2+\frac{T}{S_{a}}-(n_{access})(k+1)+1}^{N} \left(\frac{1}{j}\right)\]  
Thus, we need to find the lowest value of k which satisfies the Equation (6). \[RO_{avg}(k)<RO_{avg}(k+1)\] \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter/Variable** & **Description** \\ \hline N & Number of items in catalog \\ T & Total allowed storage capacity (GB) \\ \(RO_{avg}/req\) & Average RO per second per VoD request \\ \(S_{a}\) & Average content size \\ \(h_{access}\) & Average hop-distance from AMEN caches \\ \(h_{metro}\) & Average hop-distance from MCEN cache \\ \(h_{server}\) & Average hop-distance from video server \\ \(n_{access}\) & Number of AMEN caches utilized \\ \(k\) & Index of last content stored in AMEN caches \\ \(b_{r}\) & Average bit-rate of all VoD requests \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Notation considered in the analytical model. Solving for \(k\), we obtain Equation (7) where p = \(\frac{T}{S_{a}}-(n_{access}-1)k-(n_{access}-2)\). By approximating the value of the summation we get Equation (8).