## 3 System Framework
### Caching Strategy  
We consider a multiple-layer caching network to deliver content from both the MANs and ROCs, which are equipped with cache storage capacities \(S_{M}\) and \(S_{R}\) respectively. We consider geographic regional locations with relating characteristics to be served by a ROC. For simplicity, a ROC has quite sufficient computing and storage resources \((S_{R}\gg\sum F_{max}\gamma)\). Local content providers can upload directly to the regional platforms for users' consumption. Several MANs are directly linked to the ROC. We define a set of \(N\) MAN servers directly linked to a ROC as \(M=\{m_{1},\ldots m_{n},\ldots m_{N}\}\) having main cache storage sizes \(S_{M}=\{s_{m_{1}},\ldots,s_{m_{n}},\ldots s_{m_{N}}\}\) and utilized cache storage sizes \(S_{M_{U}}=\{s^{u}_{m_{1}},\ldots,s^{u}_{m_{n}},\ldots s^{u}_{m_{N}}\}\). A set of \(K\) users with streaming equipment is defined as \(U=\{u_{1},u_{2},\ldots,u_{K}\}\), and follows a two-dimensional Poisson distribution. A catalog of the \(V\) most popular video files dynamically cached at \(m_{n}\) is given by \(F=\{f_{1},f_{2},\ldots,f_{V}\}\), where the popularity of a file is represented by the probability \(P_{v}\) that file \(f_{v}\) is requested by a user \((r_{u_{k}})\), following Zipf distribution [47], i.e., \(P_{v}(f_{v})=\frac{\Omega}{f_{v}^{\alpha}}\), where \(\Omega=\left(\sum_{v=1}^{F}v^{-\alpha}\right)^{-1}\). The variable \(\alpha\) characterizes the distribution. A higher a value indicates that a fraction of the content is more popular than the rest in the catalog, while a lower \(\alpha\) value describes more consistent popularity among different fractions of the contents. Offline caching [22], in which content replacement sessions are carried out at off-peak times, is considered. Having fixed and insufficient cache storage sizes at the MANs, efficient content placement at the base stations is a determinant of the performance of the scheme. The wide variance of users' preferences requires caching many distinct files with similar requesting frequencies to realize a good caching scheme performance, i.e., record high cache hit ratios (\(H_{c}\)). A more gainful technique is to cache only the first parts of the content files at the MAN servers, as depicted in Figure 2. The remaining parts are stored on the ROC server with a delivery initialization condition: when the view-time threshold \(\lambda_{v}\) of a file is reached. A user \(u_{k}\) requests for video \(f_{v}\) of size \(s_{f_{v}}\) (small file \(SF\leq A\) MB; medium file \(A\) MB \(<MF\leq B\) GB; large file \(LF>C\) GB, where \(A,\ B,\ and\ C\) are file sizes determined by the content provider such that \(A<B<C\)) with quality \(q_{f_{v}}\) at MAN server \(m_{n}\). The variable \(c_{m_{n}}^{q_{f_{v}}}\in\{0,1\}\): \(n\in N,\ v\in V\) indicates if a video file \(f_{v}\) with quality \(q\) is cached on a MAN server \(n\). If the sought-after file is in the cache, \(c_{m_{n}}^{q_{f_{v}}}=1\), otherwise \(c_{m_{n}}^{q_{f_{v}}}=0\). To determine if a request is served from the local MAN server, any neighbor MAN server in the cluster, or a ROC, with or without transcoding, we define ternary variables \(\varphi,\psi\), and \(\gamma\). If a user's video request for \(f_{v}\) in quality \(q\) is served by the local MAN, then \(\varphi_{m_{n}}^{q_{f_{v}}}=1\), and 0 otherwise. If the file is not cached locally but it can be served by any of the neighbor cells then \(\left|\varphi_{m_{n}}^{q_{f_{v}}}=1\right.\), and \(\varphi_{m_{n}}^{q_{f_{v}}}=0\) indicates that the file is not in any neighbor MAN's cache storage. In this case, the file must be served from the ROC's cache, \(\gamma_{m_{n}}^{q_{f_{v}}}=1\). Since ROCs have sufficiently high cache capacities and computational resources, we overlook the rare situation where a requested file is unavailable on the ROC server (\(\gamma=0\)). We denote \(\psi_{m_{n}}^{q_{f_{v}}}=1\) for a local MAN server transcoding video \(f_{v}\) from quality \(Q\to\hat{q}\).