---
abstract: |
    The surge of mobile data traffic forces network operators to cope with capacity shortage.  The deployment of small cells in 5G networks is meant to reduce latency, backhaul traffic and increase radio access capacity.  In this context, mobile edge computing technology will be used to manage dedicated cache space in the radio access network.  Thus, mobile network operators will be able to provision OTT content providers with new caching services to enhance the quality of experience of their customers on the move. 

    In turn, the cache memory in the mobile edge network will become a shared resource.  Hence, we study a competitive caching scheme where contents are stored at given price set by the mobile network operator. 

    We first formulate a resource allocation problem for a tagged content provider seeking to minimize the expected missed cache rate.  The optimal caching policy is derived accounting for popularity and availability of contents, the spatial distribution of small cells, and the caching strategies of competing content providers.  It is showed to induce a specific order on contents to be cached based on their popularity and availability. 

    Next, we study a game among content providers in the form of a generalized Kelly mechanism with bounded strategy sets and heterogeneous players.  Existence and uniqueness of the Nash equilibrium are proved.  Finally, extensive numerical results validate and characterize the performance of the model. 
author:
- 'Francesco De Pellegrini$^\diamond$, Antonio Massaro$^\diamond$, Leonardo Goratti$^\diamond$, and Rachid El-Azouzi$^\star$[^1]'
bibliography:
- 'CachingBib.bib'
title: |
    Competitive Caching of Contents\
    in 5G Edge Cloud Networks
---

Mobile Edge Computing, Caching, Convex Optimization, Kelly Mechanism, Nash Equilibrium. 

Introduction {#sec:intro}
============

The recent boom of mobile data traffic is causing unprecedented stress over mobile networks.  In fact, the global figures for such traffic reached 3.7 exabytes per month at the end of $2015$. They are ascribed mostly to over-the-top (OTT) video content providers (CP) such as Vimeo, YouTube and NetFlix.  Forecasts predict that the world’s mobile data traffic will reach $30.6$ monthly exabytes by $2020$, of which $75\%$ will be video [@Cisco]. 

As a consequence, capacity shortage has become a real threat for mobile network operators (MNOs).  Solutions involving the deployment of small cell (SC) base stations [@What5GwillBe] have been receiving large consensus from industry and academia for next 5G systems.  SCs are low power secondary base stations with limited coverage, to which user equipments (UEs) in radio range can connect, hence increasing spatial reuse and network capacity. 

However, SCs are connected to a mobile operator’s core network via backhaul technologies such as, e.g., DSL, Ethernet or flexible millimeter-wave links.  In order to avoid potential bottlenecks over the backhaul connection to SCs, mobile edge caching solutions have been devised.  Actually, the primary goal of mobile edge caching is precisely to circumvent the limited backhaul connection of SCs [@WangCacheAir] and ensure fast adaptation to radio link conditions. 

From the network management standpoint, in order to handle a large number of SCs and associated memory caches, MNOs will rely on the emerging mobile edge computing (MEC) [@ETSIMEC] 5G technology.  MEC platforms are designed to enable services to run inside the mobile Radio Access Network (RAN) increasing proximity to mobile users, drastically reducing round trip time and thus improving the user experience. 

Ultimately, CPs will be able to leverage on the MEC caching service offered by 5G MNOs.  Contents can be replicated directly on lightweight server facilities embedded in the radio access network in proximity of SCs.  In this context, the design of effective mobile edge caching policies requires to factor in popularity, number of contents, cache memory size as well as spatial density of small cells to which UEs may associate to.  Indeed, due to storage limitations, allocation of contents on mobile edge caches has become an important optimization problem [@CaireFoundITW2013; @Pantisano1; @Poor2015; @Kang2014; @Sengupta2014; @hachem2014coded; @BastugCommMag]. 

In this paper, we consider a scheme in which CPs can reserve mobile edge cache memory from a MNO.  The MNO will provide a multi-tenant environment where contents can be stored at given price and will assign the available caching resources to different OTT content providers.  In turn, this engenders competition of CPs for cache utilization. 

First, we study the single CP optimization problem: under a given spatial distribution of SCs, the CP decides the optimal cache memory share to be reserved to different classes of contents.  This permits to identify the minimum missed cache rate as a function of the purchased memory.  Also, the optimal caching policy defines an order among contents jointly determined by two attributes: by the demand rate, i.e., the contents’ [*popularity*]{}, and by the concurrent effect of contents with similar popularity, i.e., the contents’ [*availability*]{}. 

Finally, the competition among CPs is formulated using a new generalized Kelly mechanism with bounded strategy set.  CPs trade off the cost for caching contents in the radio access network versus the expected missed cache rate.  We show that the game admits a Nash equilibrium, and we prove that it is unique.  Further properties of the game, including convergence and the revenue of the MNO, are investigated numerically. 

The manuscript is organized as follows.  In Sec.  \[sec:related\] we provide the related work and we outline the main contributions.  Sec.  \[sec:model\] introduces the mathematical model developed throughout the paper.  In Sec.  \[sec:contalloc\] the optimal content caching strategy is devised and in Sec.  \[sec:util\] we obtain the key characterization of the optimal missed cache rate.  Sec.  \[sec:game\] provides the analysis of the caching game.  Numerical validation is performed in Sec.  \[sec:numres\].  Finally, Sec.  \[sec:concls\] provides closing remarks. 

Related Works and main contribution {#sec:related}
===================================

In [@CaireFoundITW2013] the authors consider a device-to-device (D2D) network and derive throughput scaling laws under cache coding and spatial reuse.  Content delay is optimized in [@Towsley2015] by performing joint routing and caching, whereas in [@Pantisano1] a distributed matching scheme based on the deferred acceptance algorithm provides association of users and SC base stations based on latency figures.  Similarly to our model, in [@Poor2015] SC base stations are distributed according to a Poisson point process.  Contents to be cached minimize a cost which depends on the expected number of missed cache hits. 

In [@Kang2014] a model for caching contents over a D2D network is proposed.  A convex optimization problem is obtained and solved using a dual optimization algorithm.  In our formulation we have obtained closed form solutions and properties of the optimal cost function. 

In [@Sengupta2014] a coded caching strategy is developed to optimize contents’ placement based on SC association patterns.  In [@stack] a Stackelberg game is investigated to study a caching system consisting of a content provider and multiple network providers.  In that model, the content providers lease their videos to the network providers to gain profit and network providers aim to save the backhaul costs by caching popular videos.  In [@hachem2014coded] the authors model a wireless content distribution system where contents are replicated at multiple access points – depending on popularity – so as to maximally create network-coding opportunities during delivery.  Finally, [@BastugCommMag] proposes proactive caching in order to take advantage of contents’ popularity.  The scheme we develop in this work can also be applied to proactive caching. 

Since content demand patterns are typically not known apriori, practical caching algorithms perform local content replacement policies  [@Ma2004; @LiPopCache].  Those rule how contents are replaced when the cache memory is full: heuristics including replacing least frequently used contents (LFU), last recently used contents (LRU) and several other variants have been proposed in literature.  In our development we assume perfect knowledge of contents’ popularity, namely, the demand rates: recent results [@LiPopCache] show that by online estimation of the contents’ popularity, it is possible to achieve optimality, i.e., to minimize the missed cache rate.  We leave the online estimation of the contents’ demand rates as part of future works. 

[*Main results.*]{}  The main contributions obtained in this work are the following:

-   a model is introduced which accounts for the contents’ characteristics, the spatial distribution of small cells, the price for cache memory reservation and the effect of competing content providers under multi-tenancy;

-   using such model, by convex optimization, the optimal caching policy is found to possess a waterfilling-type of structure which induces an ordering of contents depending on contents’ popularity and availability;

-   a competitive game is formulated where the price for cache memory reservation is fixed by the network provider.  It is proved to be a new type of Kelly mechanism with bounded strategy set and it is showed to admit a unique Nash equilibrium. 

To the best of the authors’ knowledge, this work is the first one to study mobile edge caching under a competitive scheme.  This appears a crucial aspect in order to define new business models of 5G MNOs for the emerging MEC technology. 

  [*Symbol*]{}                                  [*Meaning*]{}
  --------------------------------------------- -----------------------------------------------------------------------------------------------------------
  $M$                                           number of content classes
  $\Lambda$                                     intensity, i.e., spatial density of small-cells
  $\mathcal C$                                  set of content providers, $|\mathcal C|=C$
  $r$                                           covering radius of UEs
  $N$                                           storage capacity of a local edge cache unit (number of caching slots)
  $N_0$                                         total storage capacity of the deployment
  ${N_c^i}$                                     number of contents of class $i$ for content provider $c$
  ${g_c^i}$                                     [*popularity*]{}, i.e., demand rate for contents of class $i$ of content provider $c$
  ${\Lambda_c^i}$                               [*availability*]{}, i.e., ${\Lambda_c^i}:=\Lambda \pi r^2N/{N_c^i}$
  $b_c$                                         caching rate of content provider $c$, $b_c\in [0,B_c]$
  $b$                                           total caching rate $b=\displaystyle  \sum_{c\in {\mathcal C}}b_c$
  $b_{-c}=\displaystyle  \sum_{v\not = c}b_v$   total caching rate of competing content providers;
  $\delta$                                      mobile network provider’s own caching rate
  ${{\mathbf u}_c}$                             caching policy for content provider $c$, ${{\mathbf u}_c}=({u_c^{1}},\ldots,{u_c^{M}})$, $\sum {u_c^i}=1$
  $x_c$                                         share of cache memory occupied by content provider $c$
  ${x_c^i}$                                     share of cache memory for $i$-th class contents of content provider $c$
  $B_c$                                         maximum caching rate for content provider $c$
  $\lambda_c$                                   price per caching slot for content provider $c$

  : Main notation used throughout the paper

\[tab:notation\]

System Model {#sec:model}
============

Let us consider a MNO serving a set ${\mathcal C}$ of content providers, where $|{\mathcal C}|=C$. Each CP $c$ serves his customers leveraging the MNO network. 

Contents served to the customers of a tagged CP $c$ belong to $M$ different popularity classes, based on their demand rate or [*popularity*]{} ${g_c^i}$. The $i$-th popularity class thus features ${N_c^i}$ contents and ${g_c^i}$ content requests per day.  Thus, we follow a multi-level popularity model similar to the one proposed in [@hachem2014coded; @hachem2014isit].  In such model, files are divided into different popularity classes, and files within each class are equally popular. 

We assume that each SC is attached to a local edge caching server, briefly [*cache*]{}.  Multiple caches are aggregated by connecting them through the MNO backhaul and managed using a local MEC orchestrator, thus forming a seamless local edge cache unit as in Fig.  \[fig:edgecloud\].  $N$ [*caching slots*]{} represent the available memory on such local edge cache unit; the total cache space across the whole deployment is hence $N_0=K\cdot N$ where $K$ is the number of local edge cache units.  For the sake of simplicity, each content is assumed to occupy one caching slot; since we assume $N_0,N\gg 1$, we rely on fluid approximations to describe the dynamics of cache occupation. 

Fetching a non cached content from the remote CP server beyond the backhaul comes at unitary cost; such cost may represent the content’s access delay or the throughput to fetch the content from the remote server.  Conversely, such cost is negligible if the user associates to a small cell storing a cached copy of the content.  However, such cache should be reached by connecting to a SC within the UE radio range $r>0$. SCs are distributed according to a spatial Poisson point process with intensity $\Lambda$.

The following assumptions characterize the caching process:\
i. each CP $c$ can purchase edge-caching service from the MNO and issue $b_c$ caching slot requests per day; we call $b_c$ the [*caching rate*]{}, where $0 \leq b_c \leq B_c$;\
ii.  MNO will reserve $\delta>0$ caching slots per day for her own purposes;\
iii.  reserved slots expire after $1/\eta$ days for $\eta>0$;\
iv.  in order to attain $b_c$ caching slots per day, CP $c$ bids $\tilde b \in [0,1]$, and the MNO grants $b_c = b_0 \, \tilde b$ caching slots per day, where $b_0$ is such that $\sum b_c + \delta \leq N_0$. In our analysis we assume $b_0=1$ for the sake of simplicity[^2].\
v. CPs are charged based on the caching rate $b_c$;\
vi.  demand rates ${g_c^i}$ per content class are uniform across the MNO’s network. 

The MNO will thus accommodate $X_c$ memory slots for CP $c$ according to $$\label{eq:state}
\dot X_c=b_c -\eta \, X_c,$$ so that the whole cache memory occupation will be ruled by $$\label{eq:stateall}
\dot X=b -\eta \, X,$$ where $b:=\sum_c b_c + \delta$ is the total caching rate.  The corresponding dynamics for the fraction of reserved cache memory, assuming $X(0)=0$ is $$x(t)=\min \left  \{ 1, \frac{b}{N_0 \eta}\left(1-e^{-\eta t}\right) \right \}$$ The MNO, in order to ensure full memory utilization, will choose $\eta$ such that $b/(N_0\eta)\geq 1$. It follows from a simple calculation that in steady state, the fraction of the caching space for content provider $c$ is $$x_c(t)=\frac{b_c}{b_c+b_{-c}+\delta}$$ Because contents’ requests are uniform across the MNO’s network, same fraction of cache space is occupied by CP $c$ in each local edge cache unit. 

In particular, CP $c$ will split his reserved memory among content classes according to a proportional share allocation with weighting coefficients ${u_c^i}$, $i=1,\ldots,M$, where $\sum_{i=1}^M {u_c^i}=1$. We define ${{\mathbf u}_c}:=({u_c^{1}},\ldots,{u_c^{M}})$ the [*caching policy*]{} of CP $c$.

Then, the fraction of local edge cache memory occupied by contents of class $i$ from content provider $c$ is $$\label{eq:share}
{x_c^i}=\frac{ b_c}{\sum_{v \in {\mathcal C}} b_v +\delta}{u_c^i}$$

Finally, a tagged content of class $i$ of content provider $c$ is found in the memory of a local edge cache with probability ${P_c^i}=\min\{\frac{N}{{N_c^i}}{x_c^i},1\}$. In the rest of the paper, we will assume $N<{N_c^i}$ for the sake of simplicity. 

Now, we want to quantify the probability for a given requested content not to be found in the local edge cache memory, i.e., the *missed cache* probability. 

Under the Poisson assumption, the probability for a tagged UE not to find any SC within a distance $r$ is $e^{-\pi r^2 \Lambda}$. Applying a thinning argument, the probability not to find a content of class $i$ of CP $c$ within distance $r$ is $e^{-\pi r^2 \Lambda P_c^i}$.

The expected missed cache rate (MCR) is thus $$\label{eq:costfun}
U_c(b_c,b_{-c},{{\mathbf u}_c})=\sum_i {g_c^i}\, e^{-\pi r^2\Lambda \frac{N}{{N_c^i}}\frac{b_c}{b_c+b_{-c}+\delta}{u_c^i}}$$ It depends on caching rate $b_c$ and on caching policy ${{\mathbf u}_c}$. Also, $b_{-c}:=\sum_{v\not = c}b_v$ accounts for the fact that other content providers share the same cache space.  In the next section we shall describe the optimal caching policy ${{\mathbf u}_c}^*$ attained when CP $c$ aims at minimizing , for a fixed value $b_c$ of the caching rate. 

![ Local edge cache unit providing $N$ memory slots.[]{data-label="fig:edgecloud"}](FIG/NetworkDiagram2.png){width="\linewidth"}

Optimal Caching Policy {#sec:contalloc}
======================

In order to analyse the model introduced before, we need to characterize the CPs’ response to competitors’ actions, i.e., $b_{-c}$. Hence, we assume that each CP aims at minimizing his own MCR, and that the network provider guarantees full information to CPs, i.e., storage capacity, spatial density of SCs and total caching rate.  We defer the study of the system under partial information at the content provider’s side to later works. 

We hence consider the following resources allocation problem for the single CP:

Given opponents’ strategy profile ${\mathbf b}_{-c}=(b_1,\ldots,b_{c-1},b_{c+1},\ldots,b_C)$ the optimal caching policy of $c\ \in {\mathcal C}$ is the solution of $$\label{eq:best_resp}
\mathbf{u}_c^* := \arg\min_{{u_c^{1}},\ldots,{u_c^{M}}} U_c(b_c,b_{-c},{{\mathbf u}_c})$$ subject to the following constraints: $$\label{eq:constraints}
{u_c^i}\geq0, \quad \sum_i{u_c^i}= 1$$

It is immediate to observe that $U_c(b_c,b_{-c},{{\mathbf u}_c})$ is a strictly convex function in the single content provider control ${{\mathbf u}_c}$, so that a unique solution exists [@boyd].  In order to solve for the constrained minimization problem in equations and we can write the Lagrangian for player $c \in {\mathcal C}$ as follows $$L_c(\mathbf{u}_c,\mathbf{\mu},\nu)=\sum_i {g_c^i}e^{-{\Lambda_c^i}\frac{b_c}{b+\delta} {u_c^i}}-\sum_i\mu_i{u_c^i}+\nu\left(\sum_i{u_c^i}-1\right)\nonumber$$ For notation’s sake, we have defined ${\Lambda_c^i}:= \pi r^2\, \Lambda_f \frac{N}{N^c_i}$; we define this quantity [*availability*]{}.  Furthermore, since constraints are affine, the Karush Kuhn Tucker (KKT) conditions provide the solution of the original problem [@boyd]. 

Hereafter, we enlist the KKT conditions: $$\begin{aligned}
&& \nabla_u L_c(\mathbf{u}_c,\mathbf{\mu},\nu)={\mathbf 0}
\qquad  \mbox{stationarity}\\ 
&&{u_c^i}\geq 0  \qquad \mbox{primal feasibility: control}\\
&&\sum_i{u_c^i}-1= 0  \qquad \mbox{ primal feasibility: normalization}\\
&&\mu_i\geq 0  \qquad \mbox{ dual feasibility: control}\\
&&\nu\geq 0  \qquad \mbox{ dual feasibility: normalization}\\
&&\mu_i{u_c^i}=0  \qquad \mbox{complementarity slackness}\end{aligned}$$

Using a standard argument [@boyd], by complementary slackness, ${u_c^i}>0$ implies $\mu_i=0$; let us define index set $I:=\{i \in \{1,2,\ldots,M\}\,|\, {u_c^i}>0\}$.

Popularity sorted case {#sec:popsort}
----------------------

Let us discuss a simplified setting where popularity is the main driver for the CPs.  Let us first assume that the indexes are sorted according to contents’ popularity ${g_c^{r}}$, i.e., ${g_c^{1}}\geq \ldots \geq {g_c^{M}}$. We also assume ${N_c^{1}} \leq \ldots\leq {N_c^{M}}$: more popular contents are also less abundant.  This assumption will be relaxed in the next section, where we derive the general solution; we will see that there exists a natural order combining popularity and availability of contents which determines whether a content class is cached or not. 

In the case at hand, the structure of the optimal allocation follows from

\[lemma:saturation\] Let ${g_c^{r}}\geq  {g_c^{r+1}}$ and ${N_c^{r}}\leq {N_c^{r+1}}$ for $r=1,\ldots,M$, then ${u^*}_c^r=0$ implies ${u^*}_c^{r+1}=0$

From the previous statement we can deduce the following

\[eq:corl1\] Under the assumptions of Lemma.  \[lemma:saturation\] there exists $1\leq r_0 \leq M$ such that response ${u^*}_c^i>0$ for $i \leq r_0$ and ${u^*}_c^i=0$ otherwise

The stationarity conditions can be used in order to determine the optimal content allocation in closed form.  Let $0\leq i \leq r_0$, then $\mu_i=\mu_{r_0}=0$, so that $${\Lambda_c^{r_0}}{g_c^{r_0}} e^{-{\Lambda_c^{r_0}}\frac{b_c}{b+\delta} {u^*}_c^{r_0}}={\Lambda_c^i}{g_c^i}e^{-{\Lambda_c^i}\frac{b_c}{b+\delta}{u^*}_c^{i}}$$ and $${{u^*}_c^i}=\frac{{\Lambda_c^{r_0}}}{{\Lambda_c^{i}}}{u^*}_c^{r_0} - \frac{b+\delta}{ {\Lambda_c^i}b_c} \log \Big ( \frac{{g_c^{r_0}}\,{\Lambda_c^{r_0}}}{{g_c^{i}}\,{\Lambda_c^{i}}}\Big )$$

Finally, due to the constraint saturation $$\begin{aligned}
\label{eq:threshold}
{u^*}_c^{r_0} = \frac{1 + \frac{b+\delta}{b_c}\sum_{i=0}^{r_0} \frac{1}{{\Lambda_c^{i}}}\log \Big ( \frac{{g_c^{r_0}}\,{\Lambda_c^{r_0}}}{{g_c^{i}}\,{\Lambda_c^{i}}}\Big )}{\sum_{i=0}^{r_0}\frac{{\Lambda_c^{r_0}}}{{\Lambda_c^{i}}}} \end{aligned}$$ From Corol.  \[eq:corl1\], the optimal solution corresponds to the maximal $r_0$ such that the corresponding ${u^*}_c^{r_0}$ solving lies in $[0,1]$.

We hence observe that when ${\Lambda_c^i}={\Lambda_c^{j}}$ for all $i,j$, i.e., when availability is same for all classes, the optimal caching policy depends on contents’ popularity only.  The smaller the request rate ${g_c^i}$, i.e., the less popular the content class, the smaller the cache share reserved to contents of that class.  Such optimal policy is analogous to the optimal content replacement $\texttt{MIN}$ algorithm [@BeladyMIN].  In fact, $\texttt{MIN}$, assumes full information about the future, replaces first contents which will be requested farthest in the future. 

General solution
----------------

The solution to the KKT conditions can be formulated as a waterfilling-like solution [@boyd].  In fact, from stationarity conditions, $\mu_r$ writes as $$\partial_{u_c^i}L_c=-{\Lambda_c^i}\frac{b_c}{b+\delta}{g_c^i}e^{-{\Lambda_c^i}\frac{b_c}{b+\delta} {u_c^i}}-\mu_i+\nu=0$$ $$\mu_i=\nu-{\Lambda_c^i}\frac{b_c}{b+\delta}{g_c^i}e^{-{\Lambda_c^i}\frac{b_c}{b+\delta} {u_c^i}}$$

which can be specialized into the following two cases. 

[*Case i*]{}: $\nu>{\Lambda_c^i}{g_c^i}\frac{b_c}{b+\delta}$. In this case $\mu_i>0$ for any ${u_c^i}\geq 0$. Hence, by complementary slackness, ${u_c^i}=0$.

[*Case ii*]{}: $\nu\leq{\Lambda_c^i}{g_c^i}\frac{b_c}{b+\delta}$. It is always possible to find ${u_c^i}>0$ satisfying the stationarity condition and a $\mu_i$ that satisfies the complementary slackness condition: just set $\mu_i=0$ and $${u_c^i}=\frac{b+\delta}{{\Lambda_c^i}b_c} \log\left(\frac{{\Lambda_c^i}{g_c^i}}{\nu}\frac{b_c }{b+\delta}\right)
$$ Finally, let $\alpha_i:=\frac{b+\delta}{{\Lambda_c^i}{g_c^i}b_c}$. For notation’s sake, the solution writes $$\begin{aligned}
\label{eq:watersol1}
&&\hskip-12mm {u_c^*}^i=\begin{cases}
\frac{b+\delta}{{\Lambda_c^i}b_c}\left(\log(1/\nu) -\log(\alpha_i)\right)& \mbox{ if } 1/\nu>\alpha_i\\
0 & \mbox{ if } 1/\nu \leq \alpha_i\\
\end{cases}\\
&&\hskip-12mm \mbox{subject to: } \quad \sum_i {u_c^*}^i =1\nonumber\end{aligned}$$

It is immediate to recognize a waterfilling solution in logarithmic scale.  Let $\alpha=\min_i\alpha_i$. Indeed $\sum_i{u_c^*}^i $ is strictly increasing in $1/\nu, 1/\nu>\alpha$. Also, $\sum_i{u_c^*}^i(1/\nu)=0$ for $1/\nu\leq \alpha$, and $\lim_{1/\nu\rightarrow\infty}\sum_i{u_c^*}^i(1/\nu)=\infty$. Thus, there exists a unique positive $\nu$ satisfying our problem. 

Actually, the solution is determined in polynomial time $O(M)$: let $[\cdot]$ be the permutation of the indexes which sorts $\alpha_i$ in increasing order, i.e., $\alpha_{[i]}\leq \alpha_{[i+1]}$. For every choice $\alpha_{[i]}\leq 1/\nu  \leq \alpha_{[i+1]}$, one can determine a value of $\nu$ $$\log(1/\nu)=\frac{\frac{b_c}{b_c+b_{-c}+\delta}+\sum_{r=1}^k \frac{\log \alpha_{[r]}}{{\Lambda_c^{[r]}}}}{\sum_{r=1}^k \frac 1{{\Lambda_c^{[r]}}}}$$ for $k=1,\ldots,M$. Then, consider the only $1/\nu$, compatible with .  We observe that $\alpha_{[i]}\leq \alpha_{[i+1]}$ is equivalent to state that ${g_c^{[i]}}{\Lambda_c^{[i]}} \geq {g_c^{[i+1]}}{\Lambda_c^{[i+1]}}$: clearly, if $u_c^{[i]}=0$, indeed $u_c^{[i+1]}=0$, so that we can generalize Prop.  \[eq:corl1\] as follows

\[eq:corl2\] There exists $1\leq r_0 \leq M$ such that ${u_c^*}^{[s]}>0$ for $s \leq r_0$ and ${u_c^*}^{[s]}=0$ otherwise. 

\[rem:popularity\] The existence of a threshold structure in a waterfilling-type of solution is not surprising; what we learn instead is that the natural order which determines which content classes are cached or not is given by the values ${g_c^i}\cdot {\Lambda_c^i}$. Hence, the index sorting $[\cdot]$ which orders the content classes with decreasing ${g_c^i}\cdot {\Lambda_c^i}$ is the order by which a content provider prioritizes content classes to be cached as the cache memory available increases. 

In the rest of the paper we assume content classes sorted according to $[\cdot]$.

Optimal Missed Cache Rate {#sec:util}
=========================

CPs who optimize contents to be cached, for a given value of $b_c$, minimize the expected MCR $U_c(b_c,b_{-c},{{\mathbf u}_c})$ in the caching policy ${{\mathbf u}_c}$. In the game model presented in the next section we shall leverage on the convexity properties of the optimized MCR $U_c: \mathbb {R}_+^2 \rightarrow \mathbb {R}$, defined as $$\label{eq:onedymutil}
\hskip-3mm U(b_c,b_{-c}):=\min_{\mathbf {{\mathbf u}_c}\in \Pi}\!\!  \left \{ \sum_i {g_c^i}e^{-{\Lambda_c^i}\frac{ b_c}{b_c + b_{-c}+\delta}{u_c^i}} \right \}$$ where $\Pi=\{\mathbf u \in \mathbb{R}^M| {{\mathbf u}_c}\geq 0, \sum {u_c^i}= 1\}$. As already proved, the minimum in is unique, hence $U_c(b_c,b_{-c})$ is well defined.  Hereafter we thus demonstrate its convexity in $b_c$.

Actually, convexity can be derived for a class of functions wider than the posynomial expression appearing in .  We first need the following fact, whose proof is found in the Appendix. 

\[lemma:lemma3\] Let $f$ be non increasing, with domain $\mathbb{R}_+$. Let $H(x)=x \, f(x)$ be convex.  Then $f$ is convex on $\mathbb{R}_+$.

We can now derive the general conditions for the convexity of the optimal missed cache rate

\[lem:conv\] Let $h: \mathbb{R}^{M} \rightarrow \mathbb{R}$, convex and decreasing in each variable $x_i$ for $i=1,\ldots,M$, then $$U_c(b_c,b_{-c}):= \min_{\mathbf {{\mathbf u}_c}\in \Pi} h \Big (\frac{{u_c^{1}} b_c}{b_c + b_{-c} + \delta},\ldots, \frac{{u_c^{M}} b_c}{b_c + b_{-c} + \delta}\Big )$$ is convex and decreasing in $b_c$.

In order to prove convexity for $U_c$, we consider perspective function $H(t,\mathbf x)=t \cdot h(\mathbf x/t)$: $H$ is known to be convex if $h$ is convex [@boyd pp.89].  In the next step, let $a=b_{-c}+\delta$, and consider the function $$\begin{aligned}
\hskip-7mm &&\min_{\mathbf ({u_c^{1}},\ldots,{u_c^{M}})} \left \{ H(b_c + a,b\cdot {{\mathbf u}_c})\left | \sum {u_c^i}=1 ,{u_c^i}\geq 0\right .\right \} \nonumber  \\
\hskip-7mm &&=(b_c + a) \cdot  \!\!\!\!\min_{\mathbf ({u_c^{1}},\ldots,{u_c^{M}})} \left \{ h\Big (\frac{b_c \cdot {{\mathbf u}_c}}{b_c + a} \Big )\left | \sum {u_c^i}=1,{u_c^i}\geq 0 \right .\right \}\nonumber \\
\hskip-7mm &&=(b_c + a) \,  U_c((b_c + a)-a,b_{-c})=(b_c + a) \, \widehat U_c(b_c + a ,b_{-c}) \nonumber \end{aligned}$$ which is convex since it is obtained by minimizing $H(b_c + a,\mathbf x)$ over the simplex $\sum x_i=b_c$ which is a convex set.  Now using Lemma \[lem:conv\], we conclude that $\widehat U_c(b_c + a,b_{-c})$ is convex in the first variable, and by affinity so does $U_c(b_c,b_{-c})$.

In order to prove the monotonicity of $U_c(b_c,b_{-c})$ in $b_c$, let us consider $b_c\geq 0$ and $b_c+\epsilon$ for some $\epsilon>0$ and the respective optimal caching policy ${{\mathbf u}_c}^*(b_c)$ and ${{\mathbf u}_c}^*(b_c+\epsilon)$. We write

$$\begin{aligned}
\hskip-3mm&&h\Big ({{\mathbf u}_c}^*(b_c) \frac{b_c}{b_c+b_{-c}+\delta} \Big ) > h\Big ({{\mathbf u}_c}^*(b_c) \frac{b_c+\epsilon}{b_c+\epsilon+b_{-c}+\delta} \Big ) \nonumber\\
&&> h\Big ({{\mathbf u}_c}^*(b_c+\epsilon) \frac{b_c+\epsilon}{b_c+\epsilon+b_{-c}+\delta} \Big )\nonumber \end{aligned}$$

where the first inequality follows from monotonicity and the second from optimality. 

The case in satisfies the assumptions by letting $h(\mathbf x)=\sum_i {g_c^i}e^{-{\Lambda_c^i}\, x_i}$.

For presentation’s sake, in Sec.  \[sec:game\] we shall identify $U(b_c,b_{-c},{{\mathbf u}_c}^*):=U(b_c,b_{-c})$. There, we also need the following result, whose proof is found in the Appendix. 

\[lma:limit\] There exists $\varepsilon>0$ such that, for any $b_c<\varepsilon$, ${{\mathbf u}_c}^*=(1,0,\ldots,0)$ and the optimal MCR is $$\label{eq:utilzero}
U_c(b_c,b_{-c},{{\mathbf u}_c}^*)={g_c^{1}} e^{-{\Lambda_c^{1}}\frac{b_c}{b_c + b_{-c}+\delta}}+\sum_{i > 1}{g_c^{i}}$$

The case $M=2$
--------------

For two classes of contents, $M=2$, the expression for $U_c(b_c,b_{-c})$ can be derived in simple closed form.  This sample case retains the main properties of the optimal policy and it is useful in order to provide insight into the structure of the optimal MCR.  First, we write the expression of the optimal MCR $$U_c(b_c,b_{-c})=\min_{0\leq {u_c^{1}} \leq b_c} {g_c^{1}} e^{-{\Lambda_c^{1}} \frac{b_c\,{u_c^{1}}}{b_c+b_{-c}+\delta}} +{g_c^{2}} e^{-{\Lambda_c^{2}} \frac{b_c(1-{u_c^{1}})}{b_c+b_{-c}+\delta}}$$ For the sake of notation, we denote $\Gamma:=\frac{{g_c^{2}}{\Lambda_c^{2}}}{{g_c^{1}} {\Lambda_c^{1}}}$. The (unconstrained) minimum of the right hand term is attained at $$\label{eq:min2D}
{u^*}_c^1=\frac{{\Lambda_c^{2}}}{{\Lambda_c^{1}}+{\Lambda_c^{2}}}-\frac{(b_c+b_{-c}+\delta)}{b_c({\Lambda_c^{1}}+{\Lambda_c^{2}})}\log(\Gamma)$$ When ${u^*}_c^1\in (0,1)$, the utility function of $c\in {\mathcal C}$ is $$U_c(b_c,b_{-c})= K_c \, e^{-\frac{{\Lambda_c^{1}}{\Lambda_c^{2}}}{{\Lambda_c^{1}}+{\Lambda_c^{2}}}\frac{b_c}{b_c+b_{-c}+\delta}}$$ where the constant appearing on the first term is $$\label{eq:Kc}
K_c={g_c^{1}} \cdot  \Gamma ^{\frac{{\Lambda_c^{1}}}{{\Lambda_c^{1}}+{\Lambda_c^{2}}}}+ {g_c^{2}} \cdot \Gamma ^{-\frac{{\Lambda_c^{2}}}{{\Lambda_c^{1}}+{\Lambda_c^{2}}}}$$ Incidentally, the convexity of $U_c(\cdot,b_{-c})$ for $M=2$ can be verified directly from the convexity of $\exp(1/x)$ and by composition with an affine function, which preserves convexity. 

We are interested in characterizing precisely the behavior of the expected MCR as a function of $b_c$. In particular, we want to assess the influence of the system parameters. 

Now, we can obtain the following result

\[prop:2Dcase\] i. Assume $\Gamma<1$. Let ${\Lambda_c^{1}} > \log(1/\Gamma)$, and define threshold for content $2$ $$\label{eq:bcstar}
b_c^{\star}=(b_{-c}+\delta)\frac{\log(1/\Gamma)}{{\Lambda_c^{1}} - \log(1/\Gamma)}$$ then it holds $$\label{eq:util}
U_c(b_c,b_{-c})=\begin{cases}
{g_c^{1}} e^{-{\Lambda_c^{1}} \frac{b_c}{b_c+b_{-c}+\delta}} + {g_c^{2}} & \mbox{if} \quad 0 \leq b_c <  b_c^{\star}\\
K_c \, e^{-\frac{{\Lambda_c^{1}}{\Lambda_c^{2}}}{{\Lambda_c^{1}}+{\Lambda_c^{2}}}\frac{b_c}{b_c+b_{-c}+\delta}} & \mbox{if} \quad b_c \geq b_c^{\star}
\end{cases}$$ where the corresponding optimal cache policy is $(1,0)$ in the first case, $({u^*}_c^1,1-{u^*}_c^1)$ in the second case and constant $K_c$ as in\
ii.  Let ${\Lambda_c^{1}} \leq  \log(1/\Gamma)$, then $(1,0)$ case holds for any $b_c>0$ with associated expected MCR defined as in case i.\
iii.  If $\Gamma>1$, both i. and ii.  hold with role of content $1$ and $2$ reversed. 

The proof follows by inspection of considering ${u^*}_c^1$ as an unconstrained minimizer.  First, we observe that if $\Gamma<1$, then ${u^*}_c^1>0$, i.e., the first content class is always cached.  The other conditions follow by imposing ${u^*}_c^1 \geq  1$.

Discussion: availability, popularity and competition {#discussion-availability-popularity-and-competition .unnumbered}
----------------------------------------------------

Hereafter we draw insight from Prop.  \[prop:2Dcase\].  First, as seen there, the optimal caching rate ${u^*}_c^1$ depends solely on a few system parameters, namely ${g_c^{i}}$ and ${\Lambda_c^{i}}$ for $i=1,2$. Actually, when $\Gamma<1$ then ${{u_c^{1}}}^*=1-{{u_c^{2}}}^*>0$: contents of type $1$ are always cached because ${g_c^{2}}{\Lambda_c^{2}}<{g_c^{1}}{\Lambda_c^{1}}$. The fact that contents of type $2$ are cached depends on the sign of ${\Lambda_c^{1}} - \log(1/\Gamma)$, which in turn determines the actual structure of the waterfilling solution. 

From Prop.  \[prop:2Dcase\], $\Gamma<1$ means that contents of type $2$ are either less popular (${g_c^{2}}\leq {g_c^{1}}$) and/or less available (${\Lambda_c^{2}}\leq {\Lambda_c^{1}}$) than contents of type $1$. The availability ${\Lambda_c^{1}}$ of contents of type $1$ determines whether they will be eventually cached.  In practice, when ${\Lambda_c^{1}} > \log(1/\Gamma)$, there exists a critical value of the CP caching rate $b_c$, i.e., the threshold .  Above such value, contents of type $2$ are cached, below that they are not cached.  For the sake of consistency, in the case when ${\Lambda_c^{1}} \leq \log(1/\Gamma)$, $b^\star=+\infty$ while for $\Gamma>1$, $b^\star=0$.

Furthermore, $b_c^\star$ increases linearly with both the MNO caching rate $\delta$ and the competitors’ aggregate caching rate $b_{-c}$: competition for edge caching resources tends to prevent caching of contents with smaller product ${g_c^i}{\Lambda_c^i}$. Actually, under higher competition figures, optimal caching policies are of the type ${{u_c^{1}}}^*=1$, and ${u^*}_c^2=0$. It is interesting to observe that, as detailed in case ii.,  not always there exists a caching rate $b_c$ such that it is worth caching the least profitable content class. 

We have provided a pictorial representation of the results of this section in Fig.  \[fig:2D\] for the case $M=2$. In Fig.  \[fig:2Da\] the value of ${\Lambda_c^{1}}$ has been fixed at different values and the corresponding behavior of the threshold value $b_c^\star$ has been reported as a function of $\Gamma$. For $\exp({\Lambda_c^{1}}) \leq 1/\Gamma$, it holds $b_c^\star=\infty$ since there is no switch-on value of $b_c$ for class $2$. Fig.  \[fig:2Db\] represents the region where the switch-on of the less popular content is possible as it can be derived from the expression as a function of $1/\Gamma$ and ${\Lambda_c^{1}}$.

Game Model for Content Providers {#sec:game}
================================

So far the caching rate $b_c$ has been input for the CPs in order to decide how to optimize the caching policy ${{\mathbf u}_c}$. Let MNO propose to CPs costs $\lambda_c$ per caching slot.  CP $c$ strategy in turn is the number $b_c$ of caching slots he reserves per day, with convex and compact strategy set $[0,Bc]$. The best response $b_c^*$ of CP $c$ depends on his contents, and his opponents’ strategies.  It is the minimizer of the [*cost function*]{} $U_c(b_c,b_{-c},{{\mathbf u}_c}) + \lambda_c \cdot b_c$: it solves $$\begin{aligned}
\label{eq:userlutil}
&&\min_{b_c}  U_c(b_c,b_{-c},{{\mathbf u}_c}) + \lambda_c \cdot b_c \\
&& \quad 0 \leq b_c \leq B_c\nonumber\nonumber\end{aligned}$$ Here $b_{-c}=\sum_{v\not = c} b_{-v}$ and opponents’ strategy profile writes $\mathbf b=(b_1,\ldots,b_{c-1},b_{c+1},\ldots,b_C)$.

The ${{\mathbf u}_c}$ appearing in is a general caching policy and we shall consider two cases. 

[**Caching Rate Optimizers.**]{}  In this case, the best response of content providers is decided for a [*fixed caching policy*]{} ${{\mathbf u}_c}$. I.e., each content provider decides beforehand the caching policy ${{\mathbf u}_c}$ for any given caching rate $b_c$. Let $V_c(x_c)= \sum_i g_c \, e^{-{\Lambda_c^{i}} x_c}$: it is convex and decreasing and $U_c(b_c,b_{-c},{{\mathbf u}_c})=V_c(b_c/(\sum b_c + \delta))$. Hence, if all players are caching rate optimizers, the game is a variant of the Kelly mechanism [@YangPerfEval].  The basic Kelly mechanism allocates a divisible resource among players proportionally to the players’ bids, in our case the equivalent required caching rates.  Here, compared to the standard formulations in literature [@comsnet2014; @johari2004; @YangPerfEval; @basar] our formulation combines three specific features which render it non standard:

-   bounded compact and convex strategy set;

-   $\delta > 0$ is equivalent to a bidding reservation, as described in [@basar];

-   prices may depend on the player, i.e., the game is a generalized Kelly mechanism [@YangPerfEval]

We denote the Kelly mechanism in the form outlined above a [*generalized Kelly mechanism with reservation and bounded strategy set*]{}. 

[**Simultaneous Optimizers.**]{}  In this case ${{\mathbf u}_c}={{\mathbf u}_c}^*$. When players are simultaneous optimizers, the structure of the game still resembles the Kelly mechanism [@johari2004].  For $M=1$, the game corresponds to the case of caching rate optimizers.  For $M\geq 2$, the fact that the game is actually a Kelly mechanism is proved formally in the following

\[lma:kellyform\] If players are simultaneous optimizers, the game is a generalized Kelly mechanism with reservation and bounded strategy set. 

The proof of the above result is found in the Appendix.  Here, it is sufficient to observe that even in the case of a simultaneous optimizer CP $c$, the optimal MCR can be expressed as $U_c(b_c,b_{-c})=U_c(b_c,b_{-c},{{\mathbf u}_c}^*)=V_c(b_c/(\sum b_c + \delta))$ where $V_c(x_c)$ is convex and continuously differentiable in $x_c=\frac{b_c}{\sum b_c + \delta}$.

Existence and uniqueness of the Nash Equilibrium
------------------------------------------------

In the general case, the game may comprise a mixture of both CPs who are caching rate optimizers and who are simultaneous optimizers.  From the above discussion, the game is still a generalized Kelly mechanism with reservation and bounded strategy set. 

In order to characterize the possible equilibria, we describe first the best response $b_c^*$ of each player

\[lma:bestresp\] Given the opponent CPs’ strategy profile $\mathbf b_{-c}$:\
i. It holds $b_c^*=0$ if and only if $\dot U(0,b_{-c}) > -\lambda_c$ where $$\dot U(0,b_{-c})=
\begin{cases}
-\frac{\sum_i {g_c^i}{\Lambda_c^{i}} {u_c^i}}{b_{-c}+\delta} & \mbox{caching rate optimizers} \\
-\frac{{g_c^{1}} {\Lambda_c^{1}} }{b_{-c}+\delta} & \mbox{simultaneous optimizers} 
\end{cases}$$ ii.  Let $b_c^*>0$, then $b_c^*=\min\{b_c,B_c\}$, where $\dot U_c(b_c,b_{-c})=-\lambda_c$.\

The above statement follows from the fact that the objective function in is convex and thus has a unique minimum in $[0,B_c]$. The expression of $\dot U(0,b_{-c})$ in the case of simultaneous optimizers is derived from the expression reported in Lemma \[lem:conv\]. 

The zero ${{\mathbf b}}^*={\mathbf 0}$ and the saturated ${{\mathbf b}}^*=\mathbf B$ Nash equilibria are easily characterized in the following

\[thm:trivialNash\] i. ${{\mathbf b}}^*={\mathbf 0}$ is the unique Nash equilibrium iff ${g_c^{1}} {\Lambda_c^{1}} <\lambda_c \delta $ if $c$ is a simultaneous optimizer and $\sum {g_c^i}{\Lambda_c^{i}} <\lambda_c \delta $ if $c$ is a caching rate optimizer.\
ii.  ${{\mathbf b}}^*=\mathbf B$ is the unique Nash equilibrium if and only if it holds $\dot U_c(B_c,\sum B_c + \delta)>-\lambda_c$ for all $c\in {\mathcal C}$.

We observe that in the original Kelly mechanism, the strategy vector ${\mathbf 0}$ is never a Nash equilibrium [@comsnet2014; @johari2004]. 

In our case, it may be the Nash equilibrium and this is the effect of the term $\delta>0$ due the MNO’s usage of the cache.  In fact, the physical interpretation is provided by the condition i. in Prop.  \[thm:trivialNash\].  No CP has incentive to start caching at give price when the marginal revenue for starting caching, i.e., represented by the product of demand and availability, does not exceed the value of the cache share reserved to the MNO operations, the term $\lambda_c \delta$. Conversely, at low prices a saturated Nash equilibrium ${{\mathbf b}}^*=\mathbf B$ is expected. 

In the general case, the presence of a bounded strategy set requires a specific proof for the uniqueness of the Nash equilibrium, as seen in the following. 

\[lma:uniqueness\] The game has a Nash equilibrium and it is unique. 

We describe a brief outline of the full proof of the above result which is found in the Appendix.  In order to prove the existence of Nash equilibria of the game, it is sufficient to observe that:

-   the multistrategy set is a convex compact subset of $\mathbb{R}^C$;

-   $U_c(b_c,b_{-c},{{\mathbf u}_c})$ is convex conditionally to the opponents strategy, both for simultaneous optimizers and caching rate optimizers;

Hence, the existence of Nash equilibria is a direct consequence of the result of Rosen [@rosen], originally formulated for $n$–persons concave games.  With respect to the uniqueness, ${{\mathbf b}}^* = {\mathbf 0}$ and ${{\mathbf b}}^* = \mathbf B$ are always unique from Prop.  \[thm:trivialNash\].  Once we excluded those trivial cases, the uniqueness can be derived by extending an argument [@basar] to the case of a bounded strategy set.  Such proof applies to both the case of simultaneous optimizers and of caching-rate optimizers.  However, it requires cost functions to be continuously differentiable in $b_c$, which is not straightforward for simultaneous optimizers. 

Finally, the proof of uniqueness applies also to the context where part of the players are simultaneous optimizers and the others are caching-rate optimizers. 

We further observe that from the proof of Thm.  \[lma:uniqueness\] we can derive a simple bisection algorithm to calculate the unique solution of the game.  It will be used in the numerical section where we shall provide further characterization of the game via quantitative measures, There, we are describing the pricing operated by the MNO and the convergence to the Nash equilibrium when CPs are myopic cost minimizers. 

Numerical Results {#sec:numres}
=================

![ image](FIG/nash_convergence_iterations.png){width="0.23\linewidth"} (-129,95)[(b)]{} (-115,28)

[90]{}[Cost Function]{}

(-65,0)[Step]{} \[fig:F22\]

In this section we provide numerical description and validation of the model.[^3] First we validate the models’ assumptions against a real world scenario.  Then, we focus on the single player’s actions, having fixed the remaining players’ strategies.  Finally we provide numerical characterization of the game introduced in the previous section.\
[*Point Process.*]{}  The model introduced in Sec.  \[sec:model\] assumes that SCs are distributed according to a spatial Poisson process of given intensity $\Lambda$. Hence, we have tested the performance of the optimal caching policy in the case the SCs spatial deployment does not adhere to the assumption of a Poisson point distribution.  In order to do so, we have been comparing the theoretical results with the outcome of a simulation performed over a real dataset.  The real dataset (source <http://opencellid.org/>) is the sample distribution of the cell towers deployed in downtown Milan over a $ 2\times 3$ Kms area, as depicted in Fig.  \[fig:F11\]: it includes the location of $4717$ cell towers corresponding to $\Lambda=786.2$ base stations per square Km.  The distribution of base stations in a very densely populated urban area has been used as a reasonable approximation for a SC deployment. 

The sample spatial density $\Lambda$ has been used in the model in order to evaluate, under the same spatial density of SCs, the theoretical CP’s cost function for increasing values of the covering radius $0\leq r\leq 400$m in the following cases (see Fig.  \[fig:F12\]): a) the CP performs a uniformly [*random*]{} caching policy ${u_c^{i}}=1/3$, $i=1,2,3$ for constant caching rate $b_c$ b) the CP performs a [*popularity-based*]{} caching policy, i.e., ${u_c^{i}}:={g_c^i}/\sum {g_c^i}$, for constant $b_c$ c) the CP is a [*caching rate optimizer*]{} adopting a popularity based caching policy d) the CP is a [*simultaneous optimizer*]{}. 

The results in Fig.  \[fig:F13\] refer to a simulation encompassing the same strategies under the sample point distribution of Fig.  \[fig:F11\].  The simulation has been performed by repeatedly selecting a random UE position in the playground, and measuring the sampling frequency of missed cache events upon requesting contents from SCs within the UE’s radio range. 

By comparing the results in Fig.  \[fig:F12\] and Fig.  \[fig:F13\], we observe that the Poisson distribution – as expected due to the non-uniform spatial density of the sample real-world deployment – tends to slightly underestimate the cost incurred by CPs.  However, the theoretical and the simulated results are very close and the relative performance of the caching policies match the prediction of the theoretical model.  This result confirms that the proposed model performs well even in real world scenarios: under a non-Poisson point process for the SC spatial distribution a rational optimizing player would choose the proposed optimal strategy over other possible strategies. 

[*Cost function.*]{}  In the next experiment we describe the optimal caching policy (Fig.  \[fig:F14\]) and the cost function (Fig.  \[fig:F21\]) in the case $M=3$. In particular, Fig.  \[fig:F14\] reports on the characteristic waterfilling structure of the optimal caching as the parameter $b_c$ increases.  As predicted by the model, the water-filling solution has a threshold structure.  The value of $b_c$ determines the content classes that become active: for large $b_c$ all content classes are cached, whereas for small values only some are cached.  In Fig.  \[fig:F21\] we have reported the typical convex shape of the cost function corresponding to the same setting and for increasing values of $b_{-c}$. It is worth noting how the actions of opponents, reflected in the value of $b_{-c}$, affect the shape of $c$’s cost function. 

[*Convergence to the Nash equilibrium.*]{}  In Fig.  \[fig:F22\] and Fig.  \[fig:F23\] we have simulated $3$ CPs who are simultaneous optimizers.  They behave as [*myopic*]{} players: each one of them, chosen at random, optimizes his own cost function based on the opponents’ profile.  Numerical simulations show that, after a small number of iterations the game stabilizes on the same restpoint irrespective of initial strategies.  As depicted in Fig.  \[fig:F23\] the restpoint is indeed a minimum for each CP’s cost function, i.e., it is the Nash equilibrium of the game.  This behavior suggests that the game has the finite improvement property [@MondreShapPotGames], even though we could not identify analytically a potential for the game.  Hence, the system would naturally converge to his unique Nash equilibrium if each player optimizes independently its own cost function against the opponents. 

Finally, we have drawn in Fig \[fig:F24\] the daily revenue of the MNO at the Nash equilibrium ${{\mathbf b}}^*$ as a function of the caching price $\lambda$, uniform for all CPs.  Because the MNO’s total revenue $\sum_c \lambda \cdot b_c^*$ depends on the Nash equilibrium, she could try to optimize her revenue by leveraging the CPs’ cost structure.  We observe numerically that the total revenue appears to have a unique maximum at a certain maximizer price $\lambda^*$. This suggests the existence of a unique Stackelberg equilibrium for the proposed scheme.  This provides the possibility to compute the global restpoint of the system when both CPs and MNO behave strategically. 

Conclusions {#sec:concls}
===========

A model for mobile edge caching in 5G networks has been presented.  OTT content providers compete for the cache memory made available by a MNO at given price.  Several features of the system are captured, including popularity and availability of contents, spatial distribution of small cells, competition for cache memory and the effect of price.  CPs can optimize the allocation of contents in order to reduce customers’ aggregated missed cache rate.  We have found that the optimal caching policy is of waterfilling type.  Also, it is showed to give priority to contents based on popularity and availability.  We have confirmed the validity of the caching policy optimization on real-world traces. 

Finally, the competition for the shared caching memory can be formulated as a convex $n$–persons game.  This game is a new form of the Kelly mechanism with bounded strategy set, where each CP trades off the expected missed cache rate for the price paid to the MNO in order to reserve cache memory space.  The existence and uniqueness properties of the Nash equilibrium are demonstrated.  Also, numerical results indicate that when CPs are myopic optimizers, the system converges to a unique restpoint which is the Nash equilibrium. 

Furthermore, from numerical results, this game appears to have a unique Stackelberg equilibrium, a relevant feature for the MNO in order to maximize her revenue at the optimal price.  To this respect, an interesting research direction is to develop online algorithms by which the MNO can learn over time such optimal price. 

Appendix
========

Proof of Lemma \[lemma:saturation\]
-----------------------------------

Let ${\mathbf u}_c^*$ the optimal allocation, and let us assume that ${u^*}_c^{r+1}>0$ It is sufficient to write the generic cost as $$U_c(b_c,b_{-c},{{\mathbf u}_c})=\sum_{i \in I} {g_c^i}\, e^{-\pi r^2\Lambda \frac{N}{N_i}\frac{{u_c^i}b_c}{b+\delta}}+\sum_{i \not \in I} {g_c^i}$$ from which it is immediate to see that a response ${\mathbf u}_c$ identical to ${\mathbf u}_c^*$ but where ${u_c^{r}}={u^*}_c^{r+1}$ and ${u_c^{r+1}}={u^*}_c^{r}$ is better off.  In fact we can write $$\begin{aligned}
&& \hskip-7mm \Delta U=  U_c(b_c,b_{-c},{{\mathbf u}_c}^*) - U_c(b_c,b_{-c},{{\mathbf u}_c}) \nonumber \\
&&\hskip-7mm ={g_c^{r+1}} e^{-\pi r^2\Lambda \frac{N}{{N_c^{r+1}}}\frac{{{u_c^{r+1}}}^* b_c}{b+\delta}} \hskip-2mm + {g_c^{r}} - {g_c^{r}} e^{-\pi r^2\Lambda \frac{N}{{N_c^{r}}}\frac{{{u_c^{r+1}}}^* b_c}{b+\delta}}-{g_c^{r+1}}\nonumber \\
&& \hskip-7mm > {g_c^{r+1}} e^{-\pi r^2\Lambda \frac{N}{{N_c^{r}}}\frac{{{u_c^{r}}}^* b_c}{b+\delta}} + {g_c^{r}} - {g_c^{r}} e^{-\pi r^2\Lambda \frac{N}{{N_c^{r}}}\frac{{{u_c^{r}}}^* b_c}{b+\delta}}-{g_c^{r+1}}\nonumber  \nonumber \\
&& \hskip-7mm > ({g_c^{r}} - {g_c^{r+1}})\Big ( 1 - e^{-\pi r^2\Lambda \frac{N}{{N_c^{r}}}\frac{{{u_c^{r}}}^* b_c}{b+\delta}} \Big ) > 0 \nonumber\end{aligned}$$ which concludes the proof. 

Proof of Lemma \[eq:utilzero\]
------------------------------

One only content type is cached if and only if $$\begin{aligned}
&&1={u_c^{[1]}} =\frac{b_c+u_{-c}+\delta}{{\Lambda_c^{[1]}}}\left(\log(1/\nu) -\log(\alpha_{[1]})\right)\nonumber\\
&&\log(1/\nu) -\log(\alpha_{[i]})<0, \forall i\geq 1\end{aligned}$$ After simple calculations, the above condition brings $$\begin{aligned}
&&1/\nu=e^{\frac{{\Lambda_c^{[1]}}b_c}{b_c+u_{-c}+\delta}}\alpha_{[1]}< \alpha_{[i]}, \forall i>1\nonumber\end{aligned}$$ Which can hold true if and only if the exponential term is close enough to $1$. Finally, observe that the ordering of the $\alpha_i$’s does not depend on $b_c$ and that the exponential converges to 1 for small $b_c$, which completes the proof. 

Proof of Lemma \[lemma:lemma3\]
-------------------------------

If we assume $H$ and $f$ are both twice differentiable the proof is trivial.  In the case of non differentiable functions, we can verify the convexity condition for $f(\cdot)$. In fact, for every $0\leq x_1 \leq x_2$ and $t\in (0,1)$: $$\begin{aligned}
\label{eq:conv}
&&f(tx_1+(1-t)x_2)=\frac{H(tx_1+(1-t)x_2)}{tx_1+(1-t)x_2}\\
&&                \leq \frac{tH(x_1)+(1-t)H(x_2)}{tx_1+(1-t)x_2}=g(t)\end{aligned}$$ Now, we observe that $g(0)=f(x_2)$ and $g(1)=f(x_1)$. Also, we note that $g$ is convex for $t\in [0,1]$. In fact, $g$ is differentiable in $t$, and, by rewriting $g(t)=N(t)/D(t)$, a direct calculation provides $$\ddot g(t)=\frac{2x_1x_2(x_2-x_1)\Big (\frac{H(x_1)}{x_1}-\frac{H(x_2)}{x_2} \Big )}{(t\,x_1+(1-t)\,x_2)^3}\geq 0$$ where the nonnegative sign is due to assumption that $f$ is non-increasing.  Now, by convexity, we can write $$g(t)=g((1-t)\cdot 0 +t\cdot1)\leq (1-t)g(0)+tg(1)$$ and replacing the above expression in , $f$ is seen to satisfy the claim of convexity. 

Proof of Lemma \[lma:kellyform\]
--------------------------------

First, we have to prove that the optimal cost can be expressed as $U_c(b_c,b_{-c})=V_c(b_c/(\sum b_c + \delta))$ where $V_c(x_c)$ is convex and continuously differentiable in $x_c=\frac{b_c}{\sum b_c + \delta}$. In order to do so, for a given value of $b_{-c}$ we denote $\mathcal B(b_{-c})=\{b_{[1]}^\star,\ldots,b_{[M]}^\star\}$ the set of thresholds such that, for $b_{[k]}^\star\leq b_c <b_{[k+1]}^\star$ it holds ${u_c^{[1]}},\ldots,{u_c^{[k]}}>0$ and ${u_c^{[k+1]}}=\ldots={u_c^{[M]}}=0$. Hereafter, let us simplify the notation and consider the indexes sorted according to $[\cdot]$ as described in Sec.  \[sec:contalloc\].  From and accounting for the expression of the $\alpha$s, it is immediate to see that the number of active content classes is a function of the type $k=k\Big( \frac{b_c}{\sum b_c + \delta}\Big)$. Also, for $b^\star(k)\leq b_c< b^\star(k+1)$, we can calculate the closed form

$$\begin{aligned}
\label{eq:optcostexpl}
U(b_c,b_{-c})=B_k \prod_{i=1}^k ({\Lambda_c^i}{g_c^i})^{\frac{1}{B_k{\Lambda_c^i}}} e^{-\frac{1}{B_k}\frac{b_c}{b_c+b_{-c}+\delta}}+\sum_{i=k+1}^M {g_c^i}\end{aligned}$$

where $B_k=\sum_{i=1}^k \frac1{{\Lambda_c^i}}$. Hence, by inspection, the right hand term is a function of $x_c=\frac{b_c}{\sum b_c + \delta}$.

Now, we have to prove that such function if continuously differentiable.  Since $U(b_c,b_{-c})$ is smooth in $(b_c^\star(k),b_c^\star(k+1))$, we can restrict to the threshold points, in particular, we consider $b_{k+1}^\star$ and verify that equality holds for the left and right derivative of .  It holds $$\label{eq:derivative}
\frac{d}{db_c} U(b_c,b_{-c})=-\prod_{i=1}^k ({\Lambda_c^i}{g_c^i})^{\frac{1}{B_k{\Lambda_c^i}}} e^{-\frac{1}{B_k}\frac{b_c}{b_c+b_{-c}+\delta}}\frac{d}{db_c} \frac{b_c}{\sum_v b_v+\delta}$$ The value of threshold $b^\star=b^\star(k+1)$ is derived by the relation $\log(1/\nu)=\log(\alpha_{k+1})$ which writes

$$\begin{aligned}
\label{eq:bstarval}
\frac{b^\star}{\sum b^\star + b_{-c} + \delta}=-\sum_{i=1}^k\frac{\log(\alpha_i)}{{\Lambda_c^i}}+A_k\log \Big ( \frac{\sum b^\star + b_{-c} + \delta}{{\Lambda_c^{k+1}} {g_c^{k+1}} b^\star }\Big )\end{aligned}$$

We can now replace and $\alpha_{i}=\frac{b^\star+b_{-c}+\delta}{{g_c^i}{\Lambda_c^i}b^\star}$ into for both the case $k$ and $k+1$. A direct calculation, which we omit for the sake of space, shows that the equality at $b^\star$ is verified, concluding the statement. 

Proof of Theorem \[lma:uniqueness\]
-----------------------------------

The proof of Theorem \[lma:uniqueness\] will require the result in the Lemma reported next.  The Lemma itself is a technical continuity argument.  We remark that, even in the unbounded case, the results of uniqueness of the Nash equilibrium for the Kelly mechanism [@basar], requires the cost function to be twice continuously differentiable. 

\[lemma:xFunction\] For each player $c$ there exists a unique, continuous, decreasing function $x_c(p)$ such that $$\label{eq:implicit}
\frac{d}{d x}V_c(x_c(p))(1-x_c(p))+p\lambda_c=0,$$ where $V_c(x)$ is the function defined in the proof of Lemma \[lma:kellyform\]. 

Since we refer to player $c$, unless required for the sake of clearness, we shall hereafter identify $x:=x_c$ for the sake of notation.  First, we need to have a closer look to the structure of the cost function.  We know that there exist $n$, $n\leq M-1$, intervals for $b_c$ such that in each interval the cost function is described as in (\[eq:optcostexpl\]).  Now, let $x=x(b_c,b_{-c})=\frac{b_c}{b_c+b_{-c}+\delta}$. We want to characterize $x_k^\star=\frac{b^\star_k}{b^\star_k+b_{-c}+\delta}$. By definition, $x^\star_k$ is the threshold value above which the $k$-th content type will start to be cached. 

Now, resorting to the water-filling formulation of the optimal allocation in (\[eq:watersol1\]), the $k$-th threshold is uniquely identified by the condition $$\label{eq:condthrak}
\begin{cases}
1/\nu=\alpha_k \\
\sum^{k-1}\frac{1}{x^\star_k\Lambda_c^i}(\log(\frac{1}{x^\star_k\Lambda_c^kg_c^k})-\log(\frac{1}{x^\star_k\Lambda_c^ig_c^i}))=1
\end{cases}$$ The condition

$$\label{eq:criticx}
x^\star_k=\sum^{k-1}\frac{1}{\Lambda_c^i}\log \left (\frac{\Lambda_c^i g_c^i}{\Lambda_c^k g_c^k} \right )$$

It is important to observe that the $x^\star_k$s do not depend on $b_{-c}$: the $M$ critical values for $x$ are the values $x^\star_k$ determined by such that $x^\star_k\leq 1$. At this point, we observe that the thresholds in $x$ for player $c$ depend on $c$’s parameters only, and they are naturally ordered increasing with the lag $k$ and.  Incidentally, we observe that, since $x\in[0,1]$, it is well possible that just some of the $x^\star_k$ are smaller than one, and those that are bigger than one are not attained.  In fact, this means that some content classes may not be cached, for any value of $b_c$.

We can now go on with the main proof of the Lemma.  In [@basar] the cost function is assumed to be twice continuously differentiable, i.e., $C^2$. However, our cost function is only continuously differentiable in the variable $b_c$, i.e., $C^1$. More in detail, by direct inspection it is possible to verify that that the optimal missed cache rate is $C^2$ piecewise, with a finite number of points where the second order derivative is discontinuous: those correspond precisely the values $x_{k}^{\star}$ discussed above. 

The argument proceeds as follows.  Let $U_c(b_c,b_{-c}) +\lambda_c(b_c)$ be the cost function of a simultaneous optimizer.  The best response of the player $c$ must fulfill the following relation: $$\label{eq:dU}
\frac{d}{d b_c}U(b_c,b_{-c})+\lambda_c=0.$$ Now, define

$$V(x)=B_k \prod_{i=1}^k ({\Lambda_c^i}{g_c^i})^{\frac{1}{B_k{\Lambda_c^i}}} e^{-\frac{1}{B_k}x}+\sum_{i=k+1}^M {g_c^i},\ x\in]x^\star_k,x^\star_{k+1}[.$$ We know that $V\in C^2([0,1]\setminus\{x^\star_1,...,x^\star_M\})\cap C^1([0,1])$. Letting $x=\frac{b_c}{b_c+b_{-c}+\delta}, p=b_c+b_{-c}+\delta$, we can rephrase (\[eq:dU\]) as $$\label{eq:dUx}
\frac{d}{d x}V(x)(1-x)+p\lambda_c=0,\ x\in]x^\star_k,x^\star_{k+1}[.$$ Now, in $]x^\star_k,x^\star_{k+1}[\times \mathbb{R}$ the left hand side is a $C^1$ function (indeed it is $C^\infty$, but $C^1$ is sufficient for our argument), hence we can apply the implicit function theorem and, in the same fashion as in [@basar], we can derive the existence of a continuous decreasing function $x:]p_k,p_{k+1}[\rightarrow]x_k,x_{k+1}[$, such that $\frac{d}{d x}V(x(p))(1-x(p))+p\lambda_c=0,\ p\in]p_k,p_{k+1}[$. Moreover, the monotonicity of $x$ implies $$\lim_{p\rightarrow p_{k}}x(p)=x^\star_{k}, \lim_{p\rightarrow p_{k+1}}x(p)=x^\star_{k+1}$$

We repeat the same argument on each interval $]x^\star_k,x^\star_{k+1}[$, and we finally glue together the $x$ functions defined over each interval obtaining a monotone surjective function.  From the monotonicity of $V$, such function is well posed since forces same values of $x$ for same values of $p$. Also, continuity and monotonicity ensure that the the domain of $x$ is a connected set, i.e., the interval $\cup ]p_k,p_{k+1}[=(0,\delta+\sum B_c)$.

Thus, we have defined a unique decreasing, continuous function $x(p):[0,\sum B_c + \delta]\rightarrow[0,1]$ such that $(x(p),p)$ solves (\[eq:dUx\]). 

We can now prove Theorem \[lma:uniqueness\].\

In order to characterize the existence of Nash equilibria of the game, it is sufficient to observe that:

-   the strategy set is a convex compact subset of $\mathbb{R}^C$;

-   $U_c(b_c,b_{-c},{{\mathbf u}_c})$ is convex conditionally to the opponents strategy;

Hence, the existence of Nash equilibria is a direct consequence of the result of Rosen [@rosen], originally formulated for $n$–persons concave games (here players minimize so convexity applies).  Let ${{\mathbf b}}^*$ is a Nash equilibrium: ${{\mathbf b}}^* = {\mathbf 0}$ and ${{\mathbf b}}^* = \mathbf B$ are always unique from Prop.  \[thm:trivialNash\].  Let us hence consider the remaining possible equilibria. 

Let $x_c(p)$ the function defined at (\[eq:implicit\]).  From Lemma \[lma:bestresp\], we can now write the best response in $x$ for each player as a function of $p$: $$\label{eq:demand}
\hat x_c(p)=\max(0,\min(x_c(p),B_c/p)).$$ Since all functions in the definition of $\hat x_c(p)$ are decreasing and continuous in $p$, so it is $\hat x_c(p)$. Moreover, $\hat x_c(0)=1, \lim_{p\rightarrow\infty}\hat x_c(p)=0$. Now, we observe that the actual best responses of players in a Nash equilibrium need to satisfy the condition

$$\label{eq:soldemand}
\sum \hat x_c(p) = 1 - \frac{\delta}{p},\  p\in\left[0,\sum B_c+\delta\right].$$

But condition determines a unique $p$. In fact observe that the sum on the left-hand side is decreasing in $p$, its value at $0$ is $M$ and tends to $0$ as $p$ increases.  The term on the right-hand side is increasing in $p$ and tends to 1 as $p$ increases.  It follows that the two functions can be equal in no more than one point.  This implies that the Nash equilibrium is unique and is determined by the unique $p^\star$ such that the equality holds true. 

We can define $C_0(p)=\{c \in {\mathcal C}| \hat x_c(p)=0\}$. Also, the set ${\mathcal C}_B(p)=\{c \in {\mathcal C}| p \cdot \hat x_c(p) \geq  B_c\}$ is unique for every value of $p \in [0,\sum B_c)$. Finally, the Nash equilibrium ${{\mathbf b}}^*$ is derived by the bijection ${{\mathbf b}}=\phi(p^*)$, where\
i. $\phi_c(p^*) = 0$ for $c\in {\mathcal C}_0(p^*)$;\
ii.  $\phi_c(p^*) = B_c$ for $c\in {\mathcal C}_B(p^*)$;\
iii.  the $\phi_c(p^*)$s for $c\in  {\mathcal C}'(p^*)={\mathcal C}\setminus ({\mathcal C}_0(p^*)\cup{\mathcal C}_B(p^*))$ with the bijection induced from the full rank compatible linear system $$b_c^*(1-x_c^*)+\sum_{v\in {\mathcal C}'(p^*)} b_v^* x_v^*  =-\delta x_c^* - |{\mathcal C}'(p^*)| \frac{B^2}{p} , c\in {\mathcal C}'(p^*)$$ which concludes the proof. 

It is worth observing that we proved that uniqueness holds despite the optimal cost function is not $C^2$ as required in [@basar].  In order to extend the argument of [@basar] to our case, we had to carefully adapt the implicit function theorem to the case of a piecewise-$C^1$ function.  The uniqueness follows by continuity and monotonicity of the implicit function. 

[^1]: $^\diamond$Fondazione Bruno Kessler, via Sommarive, 18 I-38123 Povo, Trento, Italy; $^\star$CERI/LIA, University of Avignon, 339, Chemin des Meinajaries, Avignon, France.  This research received funding from the European Union’s H2020 Research and Innovation Action under Grant Agreement No.671596 (SESAME project). 

[^2]: We refer to [@basarolsder] for an in depth discussion of the connection between mechanisms and fair share of resources of the type studied in this paper. 

[^3]: Both the Python scripts and the dataset used for validation can be downloaded at <https://www.dropbox.com/s/mm1hja2dbp4tw0x/caching_scripts.tar.gz?dl=0>.