allocating objects in a network of caches: centralized and decentralized analyses
TRANSCRIPT
Allocating Objects in a Network of Caches:Centralized and Decentralized Analyses*
Mohit Tawarmalani
Karthik Kannan
Prabuddha DeKrannert School of Management, Purdue University, West Lafayette, IN 47907
[email protected] [email protected] [email protected]
We analyze the allocation of objects in a network of caches which collaborate to service requests from
customers. A thorough analysis of this problem in centralized and decentralized setups, both of which occur
in practice, is essential for understanding the benefits of collaboration. A key insight of this paper is that an
efficient implementation of cooperative cache management is possible since, in the centralized scenario, the
object allocation resulting in the best social welfare can be found easily as a solution to a transportation
problem. For the decentralized scenario involving selfish caches, it is shown that pure equilibria exist and
that the cache network always reaches a pure equilibrium in a finite number of steps starting from any point
in the strategy space. An auction mechanism is developed to derive prices that incentivize the caches to
hold objects in a manner such that the optimal social welfare is attained. In the special case of symmetric
caches, simple algorithms are devised to find the optimal social welfare allocation, the best pure equilibrium,
and the prices for sharing objects. The results obtained in this paper should be valuable in developing and
evaluating cache management policies. Resource-sharing problems with a similar cost structure exist in a
variety of other domains, and the insights gained here are expected to extend to those scenarios as well.
Key words : Collaborative Cache Management, Resource Sharing, Peer-to-Peer Network, Mathematical
Programming, Game Theory
History : Submitted July 2005; Revised April 2006; Revised April 2007; Revised October 2007.
*An earlier, abridged version of this paper, dealing only with symmetric caches, was presented at the Workshop on
Information Technologies and Systems (WITS) in December 2005.
1
2
1. Introduction
Caching is the process of replicating web contents in locations where they can be readily accessed by
end users. The objective is to expedite the delivery of the content and to reduce network bandwidth
usage by doing away with retrievals from the source for subsequent requests (Datta et al. 2003).
Caching may be performed at various levels, namely, at the browser, proxy-server, and web-server
(Mookerjee and Tan 2002, Podlipnig and Boszormenyi 2003, Hosanagar et al. 2005).
Dynamic replacement policies focus on minimizing the cost for the cache under consideration.
This cost typically captures one or more of the following: the miss ratio, the byte hit rate, and the
average latency experienced by the users of the cache. Most of these policies maintain a priority
queue that orders the objects according to some measure of the cost reduction realized by caching
those objects. This priority queue is then consulted to perform cache updates. Trace-driven sim-
ulation and analytical performance evaluations of these cache replacement strategies restricted to
single cache frameworks have appeared in the literature (Cao and Irani 1997, Mookerjee and Tan
2002).
Cooperative caching refers to the sharing of objects among a network of proxy caches (i.e., proxy
servers serving as caches). The key motivation is that, in the event of a cache miss (i.e., when a
requested object is not held by a cache), a “neighbor” cache that holds the object can deliver the
content faster than the originating web server (referred to as the origin server henceforth). Thus,
cooperative caches are designed to operate as follows: If an object is demanded from a cache that
does not possess a local copy, the object is sought from the neighbor caches, failing which the
request is forwarded to the origin server. Examples of cooperative caching include implementations
in public domains such as IRCache, JANET, and w3cache,1 as well as in private organizations
such as content delivery networks (CDN)–for example, Akamai2 and ChinaCache3–and Internet
service providers (ISP) such as Telstra.4 ISPs often connect to one another using Internet Business
1 http://www.ircache.net; http://wwwcache.ja.net; http://w3cache.icm.edu.pl/
2 http://www.akamai.com (Dilley et al. 2002, discuss the use of cooperative caching in Akamai)
3 http://en.chinacache.com
4 http://www.telstra.com
3
Exchanges (IBX) such as Equinix5 and purchase cache peering services from other IBX participants.
The economic rationale for trading cache resources across ISPs has been made in the literature
(see, for example, Geng et al. 2003). Cooperative caching is also becoming increasingly important
with the introduction of IPTV for the delivery of television and video signals over the Internet.6
Protocols for cooperative caching–for example, ICP and CARP–are supported by most well-known
proxy servers including Netscape Proxy Server, NetCache, and Squid.7
In the current cooperative caching frameworks, each object that results in a cache miss is repli-
cated locally by acquiring it either from a neighbor or from the origin server. Any cache following
this object replacement policy ignores the holdings at the other caches. Therefore, this alloca-
tion scheme is not able to minimize the total network access cost. Moreover, this ad-hoc strategy
(Ramaswamy and Liu 2004) is suboptimal even for individual caches since it disregards the ease
with which objects can be acquired from the neighbor caches.
The current implementations of protocols such as ICP–which are used, for example, in Chi-
naCache and IRCache–do not optimally allocate objects and, therefore, do not fully realize the
benefits of cooperative caching. Any attempt to design an alternative protocol to capture these
untapped benefits must first answer the following question: What is the optimal allocation of
objects, and can it be obtained efficiently? Further, is it possible to achieve this optimal allocation
in an autonomous caching environment like IRCache? By answering these questions, this paper
enables the design of effective cache management policies. Specifically, this paper develops ana-
lytical models that not only offer insights into the benefits of cooperative caching, but also help
identify allocation mechanisms to realize these benefits.
1.1. Literature Review and Problem Motivation
Caching has been studied extensively in the computer science literature. In recent years, interest in
caching has also been growing in the information systems community. There is a sizable literature
5 https://ecc.equinix.com/peering/
6 See http://en.wikipedia.org/wiki/Iptv for a discussion on sharing data delivery workloads in IPTV.
7 http://www.web-caching.com/proxy-caches.html
4
on caching in general, whereas cooperative caching, the subject of this paper, has received far less
attention so far. Prior research has studied different aspects of caching and addressed questions
such as the choice of objects to be stored, replacement policies, and frequency of replacements.
Interested readers are referred to the surveys on caching by Podlipnig and Boszormenyi (2003),
Datta et al. (2003), and Wang (1999). While algorithms and protocols for implementing cache
management policies have been extensively researched, analytical models to assess performance and
their economic implications are still sparse. Information systems researchers have recently become
interested in developing such models. For example, Mookerjee and Tan (2002) derive approximate
analytical performance measures for the Least Recently Used (LRU) policy. In their model, the
mean access rate of a document declines as the time after its last access increases. Hosanagar
et al. (2005) develop a pricing model involving a single profit-maximizing proxy cache and various
content publishers.
In the cooperative caching context, prior studies have mostly been concerned with the develop-
ment of protocols for searching and sharing objects among the caches. Examples of such protocols
include ICP (Wessels and Claffy 1998), and CARP (Valloppillil and Ross 1998). In ICP, the pro-
tocol typically used in public domain caches, if a cache does not have a local copy of the requested
object, it queries all other caches in the network to determine if any of them has a copy. Instead,
in CARP, a universally known hashing function is used to allocate objects to the caches. The same
hashing function then identifies the “neighbor” cache to query in the event of a cache miss. None
of the existing cooperative caching protocols is designed to allocate objects optimally, and most
use the ad-hoc mechanism described earlier (Ramaswamy and Liu 2004).
The allocation mechanism differs depending on whether the caches are controlled centrally or
operate in a decentralized environment. In the centralized framework, a central planner has com-
plete information about object demands at all caches and optimizes the caching decisions from the
perspective of the overall organization, thereby solving a social welfare problem. Such a scenario
often exists in CDNs and ISPs. In the decentralized framework, on the other hand, the caches act
selfishly in a strategic environment to minimize their own costs. However, this scenario is different
5
from the ad-hoc scheme mentioned above in that here the caches also take into consideration the
contents in the other caches, interacting with one another in a strategic manner. The public domain
caches as well as the ISPs involved in cache peering at an IBX fit the decentralized framework.
Few studies have addressed the problem of optimal placement of objects. Chun et al. (2004)
examine the optimal placement in the absence of capacity restrictions on the caches. Ramaswamy
and Liu (2004) develop a scheme for allocating objects to the caches based on the expiration ages of
the objects. This scheme does not, however, find an optimal allocation. Hosanagar and Tan (2004)
analytically study the duplication of objects in the centralized case with two caches having equal
capacities, each using the LRU policy, and where all objects exhibit identical demand patterns (at
each cache and across caches). Their idea of duplication, however, does not extend to a network
of more than two caches. In contrast, our paper analyzes the problem of allocating objects in a
network of capacity-constrained caches, with varying object and cache characteristics, under both
centralized and decentralized controls.
Update policies for single caches were motivated from analyses involving same-sized objects
(Young 1994, Cao and Irani 1997). In a similar spirit, we first consider same-sized objects in our
study of collaborative caches, and later show that the results also hold for arbitrary-sized objects
if the objects are allowed to be split across the caches. We formulate a mathematical program for
the social welfare problem and show that it can be solved in polynomial time. The decentralized
problem is addressed from a game-theoretic perspective. We show that every caching game has
a pure-strategy Nash equilibrium. Further, independent of the initial holdings, a finite number of
(best-response) moves by the caches always converge the network to a pure equilibrium.
As expected, in the absence of prices, the decentralized solution may not always attain the
optimal social welfare. On the other hand, if the caches charge prices to one another for sharing
objects, the social optimum can be achieved even in a decentralized scenario. We provide an
algorithm for determining such prices and show how the optimal allocation is achieved using an
auction mechanism.
6
In the case of symmetric caches (i.e., when all cache capacities are the same and the demand for
any object is the same at each cache), simple algorithms are developed to find the social optimal
allocation, the best pure equilibrium from the social welfare perspective, and the object prices. We
show that virtually all existing single-cache update policies, including the LRU scheme, are special
cases of our policies.
Although our analysis relates specifically to the cooperative caching problem, similar analyses
may apply to other contexts as well. For example, in grid computing and various other peer-to-peer
resource-sharing scenarios, a node may already have the required resource locally, or obtain it from
a neighbor in the grid, or acquire it from outside in case the grid does not have it. Another example
is that of accessing articles from libraries. One may get a copy from the local library, request it
from a consortium of libraries (e.g., cooperating university libraries in a region), or purchase it
from the publisher. Just as in the caching scenario, the costs for obtaining the resource in these
examples are also three-tiered.
The paper is organized as follows. In Section 2, the caching problem is formulated for both
centralized and decentralized scenarios. Analyses of these two scenarios are carried out in Section
3 and Section 4, respectively. A pricing mechanism for the decentralized scenario is developed in
Section 5. Generalizations pertaining to arbitrary object sizes and a dynamic caching environment
are discussed in Section 6. Finally, concluding remarks are provided in Section 7.
2. Basic Problem Statement
Let N = {1, . . . , n} denote a set of objects and M = {1, . . . ,m} a set of caches. The objects are
of unit size (we consider different object sizes later). The caches have fixed capacities which are
denoted by K = {k1, . . . , km}. Without the loss of generality, we assume kj ≤ n, ∀ kj ∈K. Unlike
in the setup of Chun et al. (2004), the cache capacities are fixed a priori in our analysis because
the capacity expansion decisions are long-term and not as frequent as cache updates. Fixed cache
capacities, however, link the allocation decisions across objects, thereby complicating the analysis
significantly.
7
The demands for objects are stochastic by nature. We denote the expected demand for object
i at cache j by αij and(α1j , . . . , αnj
)by Aj . Clearly, αij ≥ 0, ∀ i ∈N, j ∈M . The demands are
not assumed to be independent of each other. Since our analysis holds regardless of how frequently
the future demands are estimated, all our results continue to hold even if αijs are the expected
demand rates. As in the existing caching literature, we assume that a reasonable estimate of αijs
is available. LRU, for example, addresses the cache allocation problem in a myopic fashion by
storing objects in a priority order corresponding to the recency of object requests at the cache; a
reallocation is performed whenever an object request arrives. As we show later, our policies reduce
to LRU if αij corresponds to the demand rate experienced by cache j for object i and the demand
rates are updated whenever an object request arrives at any of the caches.
Our generalization of LRU to a network of caches exploits the magnitudes of object priorities
(instead of just their order). This information is also implicitly used in the existing single-cache
policies since priority-based orders are typically derived from magnitudes (for example, recency is
used to define the mean access rate for analyzing LRU in Mookerjee and Tan 2002). The demand
forecasts we use are, however, not restricted to depend only on recency; they may also depend
on other factors found to be significant in earlier studies (such as 24-hour seasonalities discussed
in Cao and Irani 1997). It can be argued that the magnitude requirement is, in fact, needed for
multi-cache setups; simple examples show that a priority-based order does not suffice to identify
the optimal allocation policy in this context.
Continuing our description of the model, suppose the cost of serving an object locally from the
cache where it is requested is cl, from the other caches in the network is cn, and from the origin
server is co.8 Consistent with our earlier discussion on cooperative caching, we assume throughout
that cl≤ cn≤ co. Our results carry through even if cl, cn, and co are dependent on i and j; however,
for notational convenience, we assume them to be constants.
8 Overhead costs, such as the fixed cost of sharing information regarding the objects held, are omitted as they areindependent of any particular allocation of objects and do not affect our analysis. Other potential costs, such as thoseincurred while changing a cache configuration, do not alter the insights offered by the paper. One must, however,realize that, in the presence of such costs, our policies would be myopic, just as those proposed in the prior literature(see, for example, Chun et al. 2004, for their treatment of placement costs).
8
We model the the expected total acquisition cost Cj incurred by cache j as follows:
Cj = cl
n∑i=1
αijxij + cn
n∑i=1
⎛⎜⎜⎝αij(1−xij)
⎛⎜⎜⎝1−
m∏j′=1
j′ �=j
(1−xij′)
⎞⎟⎟⎠⎞⎟⎟⎠+ co
n∑i=1
⎛⎝αij
m∏j′=1
(1−xij′)
⎞⎠ , (1)
where xij is 1 if object i is held in cache j and 0 otherwise. The first term in (1) accounts for the
objects served locally, while the second and the third terms account for the ones retrieved from a
neighbor cache and the origin server, respectively. Obviously, an object is obtained from a neighbor
only when it is not held locally and at least one of the neighbors holds it. The object is obtained
from the origin server only when it is not held by any of the neighbor caches. Equation (1) can be
rewritten as follows:
Cj = (cl− cn)n∑
i=1
αijxij + cn
n∑i=1
αij +(co− cn)n∑
i=1
⎛⎝αij
m∏j′=1
(1−xij′)
⎞⎠ . (2)
In the centralized scenario, the objective is to allocate the objects to the caches so as to minimize
the network cost,∑m
j=1 Cj, subject to the capacity constraints. In the decentralized scenario, on the
other hand, every cache j ∈M decides on its holdings xij ,∀i∈N , with the objective of minimizing
its individual cost Cj, subject to its capacity constraint.
3. Analysis of Social Welfare
In this section, we analyze the social welfare problem in the centralized case to find the optimal
holdings for the caches. In addition, we study the special case dealing with symmetric caches.
Using (2), the social welfare problem can be expressed as a nonlinear 0−1 program as follows:
(S) minm∑
j=1
⎧⎨⎩(cl− cn)
n∑i=1
αijxij + cn
n∑i=1
αij +(co− cn)n∑
i=1
⎛⎝αij
m∏j′=1
(1−xij′)
⎞⎠⎫⎬⎭
s.t.n∑
i=1
xij ≤ kj j = 1, . . . ,m (3)
xij ∈ {0,1} i = 1, . . . , n; j = 1, . . . ,m. (4)
Problem (S) can be linearized using the techniques of Glover and Woolsey (1974), by introduc-
ing binary variables yi to represent∏m
j=1(1− xij) and adding linear constraints that impose the
nonlinear relationship when all xijs are binary valued (see Tawarmalani and Sahinidis 2002, for
9
a recent treatment). In our context, yi is 1 if object i is acquired from the origin server and 0
otherwise. So, (S) becomes:
minm∑
j=1
{(cl− cn)
n∑i=1
αijxij + cn
n∑i=1
αij +(co− cn)n∑
i=1
αijyi
}
s.t. yi ≥ 1−m∑
j=1
xij i = 1, . . . , n (5)
yi ≥ 0 i = 1, . . . , n (6)
yi ≤ 1−xij i = 1, . . . , n; j = 1, . . . ,m (7)
(3), (4).
Although we have successfully linearized (S), finding an optimal solution to an integer program
is, in general, hard. Further, not all extreme points feasible to the above constraints are integral.
However, since max{0,1−∑m
j=1 xij} ≤ 1− xij′ for all j′ ∈ {1, . . . ,m} and co > cn, we can drop (7)
from the formulation. Consequently, the social welfare problem can be rewritten as:
(SL) min
{m∑
j=1
C′j∣∣∣∣ (5), (6), (3), (4)
},
where C′j =∑m
j=1 {(cl− cn)∑n
i=1 αijxij + cn
∑n
i=1 αij +(co− cn)∑n
i=1 αijyi}. The relaxation shown
here allows us to model (SL) as the well-known transportation problem. This fact is intriguing
because, although linearization techniques are commonly used to convert nonlinear 0−1 problems
into binary integer programs, seldom do they reduce the nonlinear problem to a network-flow
structure. The proof of the following theorem illustrates the construction involved, which is also
crucial in understanding the pricing mechanism for decentralized networks developed in Section 5.
Theorem 3.1. (SL) can be modeled as a transportation problem.
Proof. Consider a bipartite graph G = (V,E) with vertices V = N ∪M ∪ {D} and edges E =
N ×M ∪ {(i,D) | i ∈N}. The flow on arc (i, j) ∈N ×M corresponds to xij, whereas the flow on
arc (i,D) is yi (see Figure 1). The objects and the caches are mapped to the demand locations
and the suppliers, respectively, of the transportation problem. The dummy node D represents the
origin server in the caching context. The cost associated with an arc xij is (cl− cn)αij. The cost
10
1
i
n
1
j
m
D
x11
x1j
x1my1
xi1xij
xim
yi
xn1
xnj
xnm
yn
Objects: N Caches: M
1
1
1
k1
kj
km
n
Figure 1 Transportation Formulation of Social Welfare
associated with yi is (co− cn)∑
j∈M αij . The flow out of each i∈N must be no less than one, and
the flow into each j ∈M must be no more than kj. Since there are n objects, the maximum flow
into D is at most n.
Arguably, interpreting the social welfare problem as a transportation problem is one of the key
insights of this paper. A transportation problem is solvable in strongly polynomial time (Ahuja
et al. 1993), thus providing an efficient object allocation policy. The ability to solve the caching
problem quickly is indeed necessary to perform frequent updates, which is the common practice in
caching.
3.1. Symmetric Caches
In this section, we study the allocation problem with symmetric caches (i.e., a setup where the cache
capacities are identical and the demand for each object is the same across all caches). This setup
serves as a bridge between single-cache scenarios studied extensively in the literature and a network
of asymmetric caches studied in this paper. This is because priority-based greedy policies, such as
LRU, that are commonly used for single caches, extend to symmetric setups, but not to asymmetric
ones (see Proposition A.1 for a proof that the social welfare problem with an asymmetric setup
is at least as hard as the assignment problem (for a description of the problem, see Ahuja et al.
11
1993)). We show in this section that the greedy scheme used to compute the minimum network cost
for symmetric caches also provides an upper bound for the network cost when the cache capacities
remain identical, but the demands vary from one cache to another. Later, in Section 5.1, we show
that the greedy allocation mechanisms for symmetric caches are not only optimal, but also fair, if
the caches are allowed to charge prices to one another. In addition, symmetric setups are easier to
visualize and still capture many of the intuitions for a general network of caches. From a practical
standpoint, there are scenarios where similar demands for a given object across the caches can be
expected, especially when users are assigned to the caches at random or when the caches serve a
large number of users. This is probably why the assumption of equality of demand patterns across
the caches appears in the prior literature as well.
Consider a simple example with two objects and two caches, each with capacity one. First,
assume that cache 1 faces a demand of α for object 1 and no demand for object 2; similarly, cache
2 has a demand of α for object 2 and no demand for object 1. Then, it is clearly optimal for each
cache to hold the object for which it has a demand. Next, suppose that some of the demand β ≤ α2
for object 1 is shifted to cache 2 and a demand of β for object 2 is shifted to cache 1. Clearly, the
caches have to share the objects more as β increases, thereby leading to an increasing network cost
with higher values of β. Indeed, the maximum network cost is incurred when β = α2
i.e., when each
cache has the same demand for both objects. The following definition for symmetric cache setups
provides a natural context in which the above observation can be generalized. Two caches j and
j′ are deemed symmetric when kj = kj′ = k and for each object i, αij = αij′ = αi. The symmetric
caching problem is the one where all caches are symmetric. Theorem 3.2 formalizes our observation
of the increasing optimal network cost in passing from asymmetric setups to symmetric ones.
Theorem 3.2. If the cache capacities are identical and the total demand for each object is
distributed equally among the caches, then the minimum network cost for the resulting symmetric
setup is no less than the minimum network cost when the demand for an object varies from one
cache to another. (See Appendix A.2 for a proof.)
12
We now develop a greedy algorithm that solves the social welfare problem optimally for sym-
metric setups. Without the loss of generality, for i < i′, assume αi ≥ αi′ . Let xi be the number of
copies of object i held in the network. Then, xi =∑m
j=1 xij and (1− yi) = sgn(xi), where sgn(x) is
1 if x > 0 and 0 if x = 0. After some algebraic simplification, the network cost reduces to:
m∑j=1
C′j = mco
n∑i=1
αi−n∑
i=1
sgn(xi)((m− 1)
(co− cn
)αi +
(co− cl
)αi
)− n∑i=1
(xi− sgn(xi))(cn− cl
)αi.
When only one copy of i is cached, the cache holding i benefits (co− cl)αi, and each of the other
(m−1) caches gains (co−cn)αi, yielding a total benefit of di1 = (m−1)(co−cn
)αi +(co−cl)αi. Any
subsequent copy (t > 1) of i provides a total benefit of dit =(cn− cl
)αi. Let indx(x∈G) represent
the index of an item x in an ordered set G, and let it denote the tth copy of i. Then, the algorithm
in Figure 2 solves the symmetric caching problem.
Figure 2 Algorithm Symmetric Cache Global Solution (SCGS)
Input: cl, cn, co, m, n, k, and {α1, . . . , αn}.Output: xij
Steps:1. Construct G as a list of its.2. Sort G by dit in descending order, breaking ties by sorting with respect to i in ascending order
and then with respect to t in ascending order.3. for all i, where 1≤ i≤ n, let xi←max{t | indx(it ∈G)≤mk}.4. for all i and j, where 1≤ i≤ n and 1≤ j ≤m, let xij← 0.5. for all i, where 1≤ i≤ n, and l ∈ [1, xi], set xij← 1, where j = 1 +
(l− 1 +
∑i−1
t=1 xt
)mod m.
In this algorithm, G provides a list of object copies sorted by the benefits they add to the
network, and xi is the number of copies of i which appear among the mk items with the highest
valuations in G (recall that mk is the total cache capacity of the network). Step 5 allocates the
objects, ensuring that no cache stores more than one copy of the same object. Since the ordered
list G need not include any object with an index greater than mk, and αis are assumed to be
pre-sorted, the complexity of the above algorithm is O(min(mk,n)
).
Example 3.1. Consider 3 caches with a capacity of 2 each and 4 objects with demands
[70,36,15,5]. Suppose cl = 1, cn = 2, and co = 3. Then, G = {11,21,12,13,31,22,23,41,32,33,42,43}.
13
Noting that mk = 6, the optimal solution is as follows: cache 1 holds {11,21}, cache 2 holds {12,22},
and cache 3 holds {13,31}.
4. Decentralized Setup
In this section, we consider the case when each cache is selfish. As before, the cache capacities
and the demands for objects at each cache location are assumed to be known a priori. Let Oj
be the set of objects held by cache j and O denote⋃m
j=1 Oj. Cache j decides to hold Oj, which
must not have a cardinality of more than kj, such that its cost Cj is minimized, given the holding
strategies Oj′ of all j′ �= j. This leads us to consider a simultaneous-move game among the caches.
Of particular interest are the solutions where no cache benefits by unilaterally altering its holding
strategy. These solutions are the pure-strategy Nash equilibria.9
The caching game described above is different from the one considered by Chun et al. (2004)
because of the presence of capacity constraints in our setup. When there is no capacity constraint,
each object can be examined separately, and this observation plays a central role in simplifying the
analysis of Chun et al. (2004).
Example 4.1. Suppose there is a symmetric case with two objects and two caches, where each
cache can hold at most one object. Let α11 = α12 = α1 and α21 = α22 = α2. Then, the payoff matrix
for this game is the following:
Object 1 Object 2
Object 1 −clα1− coα2, −clα1− coα2 −clα1− cnα2, −cnα1− clα2
Object 2 −cnα1− clα2, −clα1− cnα2 −coα1− clα2, −coα1− clα2
In this example, we assume that cl < cn < co. Without the loss of generality, we also assume that
α1 ≥ α2. If α1 < co−clcn−cl
α2, then (2,1) and (1,2) are the pure equilibria and also the optimal social
welfare solutions. If co−clcn−cl
α2 < α1 < (co−cn)+(co−cl)
cn−clα2, (1,1) is the only pure equilibrium and the
optimal social welfare solution is obtained at (1,2) or (2,1). If α1 > (co−cn)+(co−cl)
cn−clα2, then the
pure equilibrium and optimal social welfare solution is (1,1). This simple example illustrates that
9 In this paper, we focus only on pure equilibria because, unlike in a mixed-strategy environment, we assume thatthere is instantaneous information sharing regarding the objects held and that the demands are realized over time.
14
pure equilibria and social optimal solutions may or may not be unique and that the former may
not always attain the optimal social welfare. The above observations about the equilibria and the
optimal social welfare solutions hold irrespective of the values of cl, cn and co, as long as α1 is
increased relative to α2.
4.1. Equilibrium Analysis
Given the strategy of every other cache j′ �= j, cache j solves the following problem.
(L) minx1j ,...,xnj
(cl− cn)n∑
i=1
αijxij + cn
n∑i=1
αij +(co− cn)n∑
i=1
⎧⎨⎩⎛⎝αij
∏j′ �=j
(1− xij′)
⎞⎠ (1−xij)
⎫⎬⎭ (8)
s.t.n∑
i=1
xij ≤ kj (9)
xij ∈ {0,1} i = 1, . . . , n. (10)
Here, xij′ is 1 if cache j′ holds object i and 0 otherwise. Consistent with our definition of pure
equilibria, xij′ is assumed to be fixed for all i and j′ �= j when cache j solves (L).
If cn = co, the pure equilibrium is the same as the optimal social welfare solution. This is because
(SL) decomposes into m problems, one for each cache. Each of these problems is the same as
problem (L) above, which in turn is independent of the strategies of the other caches. If cn = cl
and the caches are symmetric, no object is held by more than one cache in a pure equilibrium or
an optimal social welfare solution. The network of caches then behaves like a single cache facing
the aggregated demand. As a result, the optimal social welfare solutions are the same as the pure
equilibrium solutions. However, this is not the case with asymmetric demands, as shown below.
Example 4.2. Consider 3 objects and 2 caches, each with a capacity of 1. Let cl = cn = 0 and
co = 1; and A1 = [5,4,0] and A2 = [0,4,5]. The optimal social welfare solution is to hold object 1
or object 3 in one cache and object 2 in the other cache. On the other hand, the pure equilibrium
solution is to hold object 1 in cache 1 and object 3 in cache 2.
4.1.1. Existence and Attainment of Pure Equilibria Collecting the terms in (8) and
changing to maximization, (L) can be rewritten as:
(DL) maxx1j ,...,xnj
n∑i=1
⎡⎣αij
⎧⎨⎩(cn− cl) + (co− cn)
∏j′ �=j
(1− xij′)
⎫⎬⎭⎤⎦xij
15
−co
n∑i=1
⎧⎨⎩αij
∏j′ �=j
(1− xij′)
⎫⎬⎭− cn
n∑i=1
⎧⎨⎩αij
⎛⎝1−
∏j′ �=j
(1− xij′)
)⎞⎠⎫⎬⎭ (11)
s.t. (9), (10).
The solution to (DL) can be obtained using the algorithm in Figure 3 (see Lemma A.2 in the
Appendix for a proof of the correctness of this algorithm). Here, bij is the benefit that cache j
derives from holding i, given the holdings of the other caches. The algorithm relies on the following
optimality condition: there exists a bj for cache j such that, if an object i provides more value than
bj, i.e., bij > bj, then it must be held by j in every optimal solution to (DL).
Figure 3 Algorithm Local Solution
Input: cl, cn, co, j, kj, αij , and xij′ for all j′ �= j and i = 1, . . . , n.Output: xij for i = 1, . . . , nSteps:1. Let Q = [b1j, . . . , bnj ], where bij =
((cn− cl) + (co− cn)
∏j′ �=j
(1− xij′
))αij .
2. Let bj be the kthj highest value in Q.
3. Let Oj ⊆N be such that |Oj|= kj and for any i∈N\Oj, bij ≤ bj.4. Let xij← 1, if i ∈Oj and 0 otherwise.
A pure equilibrium is a strategy that satisfies the above optimality conditions (see Lemma A.2)
for each cache. Now, suppose that every cache j ∈M holds the kj objects with the largest demands
for itself, while ignoring the holding strategies of the other caches i.e., all the caches act as if
cn = co. This non-sharing strategy is equivalent to the ad-hoc strategy of Ramaswamy and Liu
(2004) discussed before. If the caches start from this strategy and sequentially move to their best
responses,10 we show that a pure equilibrium is attained after each cache has had an opportunity
to alter its holdings once. We assume that a cache does not replace an object with another object
of the same value.
Theorem 4.1. Every caching game has a pure strategy equilibrium. Further, if the system starts
at the non-sharing caching strategy and the caches move to their best responses, no cache has an
10 Sequential moves considered here do not imply that this is a sequential game; rather sequential moves are usedhere as steps in an algorithm to identify equilibria in a simultaneous (normal-form) game.
16
incentive to move more than once. (See Appendix A.3 for a proof.)
Theorem 4.1 proves the existence of a pure equilibrium following a sequence of moves starting
from the non-sharing strategy. Next, we show in Theorem 4.2 that any sequence of best-response
moves is finite in length. The proof of the theorem is relevant to networks cooperating using
protocols such as ICP and elucidates the nature of moves by each cache in such a setup. The proof
also clarifies the tradeoffs the caches face in holding unique objects versus objects already held by
the other caches, and establishes that the caches which switch holding strategies based on best-
response moves will not enter into a cycle of moves. The proof technique used here is reminiscent
of rationalizability, a concept used to ascertain the rational behaviors of players (Fudenberg and
Tirole 1991). We compute the fixed-point of best response moves, using reactions of one cache
at a time. This is in contrast to the use of reactions of all players in the celebrated proof of the
existence of mixed-strategy equilibria by Nash, as well as to the use of iterative dominance on
similar sublattice structures in the proofs of existence of pure equilibria in supermodular games
(Fudenberg and Tirole 1991).
Theorem 4.2. Starting from any point in the strategy space, a pure equilibrium is always
attained in a finite number of best response moves.
Proof. Since each cache is always filled to capacity, a move by cache j can be described using
a list of triples [(j, i1, i1), . . . , (j, ip, ip)], where each triple (j, ir, ir) signifies that cache j relinquishes
object ir in order to acquire ir and p≤ kj. Since the move is assumed to be a best response move,
we may assume, without the loss of generality, that for any distinct r and s, is �= ir and ir is of
strictly higher value to j than ir (i.e., birj > birj), given the holdings of the other caches at the
time.
We classify an object i as u or t according to whether it is held by one cache or more than
one cache. A triple (j, ir, ir) is classified as t1 → t2, where t1 ∈ {u, t} and t2 ∈ {u, t}, if ir is of
classification t1 before the move and ir is of classification t2 after the move. A triple of the form
t→ t and one of the form u→ u keep the number of objects held in the network constant. A triple
17
of the form t→ u increases, whereas a triple of the form u→ t decreases, the number of objects
held in the network.
We first argue that a triple (j, ir, ir) of classification u→ t exists only in the first move of cache j.
Let (j, ir, ir) be one of the triples in the lth move of cache j. Then, in the (l− 1)st move of cache j,
the value of ir was no more than what it is in the lth move (since no other cache holds it now) and
the value of ir was no less than what it is in the lth move (since some other cache holds it now).
Therefore, considering best response moves, ir should have been acquired in the (l− 1)st move. In
other words, after each cache has moved at least once, the number of objects held in the cache
never decreases.
Now, create a global list of triples by placing the lists of triples from each move in their order of
occurrence. Use the triples of classification t→ u and u→ t to split the list into sublists such that
no sublist contains any triples with classification t→ u or u→ t. Assume that, at the beginning,
the network holds a objects. Further, assume that there are b triples of classification t→ u and c
triples of classification u→ t. Since the total number of objects in the network is no more than∑m
j=1 kj, it follows that a + b− c ≤∑m
j=1 kj. Since each cache can have at most kj triples in the
first move, it follows that c≤∑m
j=1 kj. Since a≥ 0, it also follows that b≤ 2∑m
j=1 kj. As a result,
the number of sublists created is bounded from above by 3∑m
j=1 kj +1. To show finiteness, now we
only need to show that each sublist is of finite length.
Pick an arbitrary sublist created in the preceding step. All the triples in the sublist are either of
the type t→ t or u→ u. As such, the number of objects held in the network remains constant and
is bounded from above by∑m
j=1 kj. We show that the number of triples in the sublist corresponding
to an arbitrary cache j is finite. We assume, without the loss of generality, that j moves at least
twice in the sublist. Otherwise, the number of triples for cache j would be bounded by kj. Consider
any triple (j, ir, ir) in this sublist which is not from the first (partial) move by cache j. Clearly,
αirj < αirj. Otherwise, j would not relinquish ir in favor of ir. Let i′ be one of the least preferred
items held by j before the second move of j in this sublist. Define I = {i | αij > αi′j} ∪ {i | αij =
18
αi′j and j held i before the second move of j in this sublist}. We claim that |I| ≤∑m
j=1 kj. A con-
tradiction to |I|> ∑m
j=1 kj is derived by simply noting that the number of objects in the network
is bounded by∑m
j=1 kj and, therefore, after the previous move of j, there was an object i∈ I that
was not held in the network and that has a higher demand than i′, which is not possible for the
best response moves. Therefore, |I| ≤∑m
j=1 kj. The strategies of j are now limited to the objects
in I and form a finite sublattice11 of Rkj . With each triple, j moves to a strategy that dominates
the previous one. As a result, there are a finite number of triples of the form (j, ·, ·). The sublist
must, therefore, be of finite size since j is arbitrarily chosen.
Since the starting strategy in Theorem 4.2 is arbitrary, if a new cache enters the network and the
current caches in the network are already in a pure equilibrium, a sequence of best response moves
will lead the network to a pure equilibrium once again. The same argument works even when a
cache leaves the network.
4.1.2. Set of Pure Equilibria As we have already observed, the caching game is guaranteed
to have a pure equilibrium. The equilibrium may not, however, be unique. Moreover, different pure
equilibria often yield different social benefits. Since in the non-sharing strategy discussed before,
every cache holds its most demanded objects, it may seem that the equilibrium attained via the
best-response sequential moves starting from this strategy yields the maximum social benefit. In
reality, however, this is not the case even for symmetric caches, as illustrated below.
Example 4.3. Suppose there are 3 caches, each with a capacity of 4, and 9 objects, with
demands [34,33,27,18,17,15,14,13,10]. Let cl = 1, cn = 2, and co = 3. The network incurs the
minimum cost if cache 1, cache 2, and cache 3 hold objects {1,2,4,7}, {1,2,5,8}, and {1,3,6,9},
respectively. The total cost is then 804. This is not a pure equilibrium since cache 2 would rather
hold object 3 (even if it is held by cache 3 already) than hold object 8. The equilibrium attained
following the best-response sequential moves – without the loss of generality, in the order of their
indices – starting from the non-sharing strategy is as follows: cache 1 holds {1,2,5,6}, cache 2 holds
11 Z is a sublattice of Rn if, whenever (a′, b′) ∈ Z and (a′′, b′′) ∈ Z, then
(cmax(a′, a′′), cmax(b′, b′′)
) ∈ Z and(cmin(a′, a′′), cmin(b′, b′′)
) ∈Z. Here, cmin and cmax are the component-wise minimum and maximum, respectively.
19
{1,2,3,7}, and cache 3 holds {1,2,3,4}. The corresponding network cost is 836.12 Among all pure
equilibria, the one that yields the minimum network cost is as follows: cache 1 holds {1,2,4,5},
cache 2 holds {1,2,6,7}, and cache 3 holds {1,2,3,8}. The network cost here is 811. Interestingly,
not only do these three solutions incur different network costs, but the number of objects held in
the network is also different in each case.
The above example shows that there may be multiple pure equilibria and that one pure equilib-
rium may be better than another in terms of social welfare. This leads us to the problem of finding
the equilibrium that results in the minimum network cost. The pure equilibrium that minimizes the
network cost will be henceforth referred to as the best pure equilibrium. An integer-programming
formulation, which yields the best pure equilibrium as its optimal solution, is developed in Appendix
A.4 and the correctness of the formulation is proved in Proposition A.2 therein. The key ingredient
in this proof is that the optimality conditions of Lemma A.2 can be modeled using logical con-
straints. Interestingly, the size of our integer-programming formulation is polynomial in kj, n, and
m, even though the strategy space of each player is exponential. Following arguments similar to
those in Appendix A.4, the problem of finding the best/worst pure equilibrium from a particular
cache’s perspective can also be formulated as an integer program.
4.2. Symmetric Caches
We now analyze the best pure equilibrium for the symmetric setup. We assume, without the loss
of generality, that objects are sorted in the order of non-increasing demand. If an object is held
by only one cache, this cache benefits(co − cl
)αi since it does not need to acquire the object
from the origin server. Otherwise, the benefit is(cn− cl
)αi. For each object i, define wi = max{i′ |
(cn − cl)αi′ > (co − cl)αi}. Therefore, wi is the least demanded object that a cache will prefer to
hold jointly before it holds i uniquely. Algorithm SCBE is the key subroutine in identifying the
best pure equilibrium.
Theorem 4.3. A pure equilibrium that holds ri copies of object i, where ri is what Algorithm
SCBE returns, generates the best social welfare among all pure equilibria that hold objects {1, . . . , a}.12 Without the loss of generality, here we assume that cache 1 moves first, followed by 2, and then 3.
20
Figure 4 Algorithm Symmetric Cache Best Equilibrium (SCBE)
Input: cl, cn, co, k, αi for i ∈N , and a∈N .Output: fi for i = 1, . . . , a, ri for i = 1, . . . , aSteps:1. wi←max{i′ | (cn− cl)αi′ > (co− cl)αi}.2. a′
1← a, j← 1 and f ′i ← 0, ∀i.
3. if k < wa +1 return infeasible4. while a′
j > wa:5. if j = m+1 return infeasible6. if wa′
j> 0 then f ′
wa′j
← f ′wa′
j
+1
7. a′j+1← a′
j − (k−wa′j)
8. j← j +19. end while10. fi←
∑i≤i≤wa
f ′i for i = 1, . . . ,wa
11. fi← 1 for wa < i≤ a12. h← k(m− j) +wa− a′
j︸ ︷︷ ︸Empty spaces
13. l←max{i |∑i
i′=1(m− fi′) < h}+114. if (cn− cl)αl ≥ (co− cl)αa+1 return infeasible15. ri←m for i < l, rl = h + fl−
∑l−1
i′=1(m− fi′) and ri = fi for l < i≤ a.16. return r
The proof of Theorem 4.3 in Appendix A.5 uses the outputs of Algorithm SCBE to construct
the best pure equilibrium among those that hold objects {1, . . . , a}. Therefore, running Algorithm
SCBE for a = 1, . . . ,min(n,mk) and comparing the associated social welfares generated, one can
determine the best pure equilibrium and the corresponding social welfare in O(mk min(mk,n)
)time. It is surprising that finding the best pure equilibrium requires polynomially many steps in
n, m and k, even though the strategy space for each cache is exponential in those parameters
and there are(
nCk
)mstrategy profiles. Finding the best social welfare symmetric equilibrium is
NP-hard in general, even for two-player symmetric games (McLennan and Tourky 2006). While
this result does not apply directly to our scenario, it demonstrates the computational difficulty of
related problems.
Is it always bad to store redundant copies beyond the minimum number of copies required?
Although the decentralized solution is generally believed to be inefficient because it holds redundant
copies (Ramaswamy and Liu 2004), the following example shows that this is not always the case.
21
Example 4.4. Consider 4 symmetric caches, each with capacity 2, and 6 objects, with demands
[60,14,13,11,10,3]. Let cl = 1, cn = 2 and co = 6. There is a pure equilibrium as follows: 1 holds
{1,4}, 2 holds {1,5}, 3 holds {1,6}, and 4 holds {2,3}. The optimal social welfare solution, which
is also the best pure equilibrium, is, however, the following: 1 holds {1,2}, 2 holds {1,3}, 3 holds
{1,4}, and 4 holds {1,5}. So, we see that a pure equilibrium may hold fewer copies (equivalently,
more unique objects) than does the optimal social welfare solution.
5. Pricing Mechanism
We have seen in Section 4 that, in the decentralized setup with no monetary transactions among
caches, the optimal social welfare is not always attained. One might feel that the introduction of
prices would automatically lead to social optimality. However, that is not the case, as shown in the
following example.
Example 5.1. Consider three unit-sized objects and three caches, each with a capacity of one.
Let A1 = (9,0,0), A2 = (9,2,0) and A3 = (9,0,M), where M is large enough to ensure that cache
3 always prefers object 3 to object 1. Let cl = 1, cn = 2, and co = 10. The social optimal solution
is for cache 1 to hold object 1, cache 2 to hold object 2, and cache 3 to hold object 3, yielding a
cost of M + 47. We assume sharing of revenues if two or more caches hold the same object. By
construction, in a decentralized framework with pricing, there is no incentive for cache 3 to hold
any object other than 3. If cache 1 does not hold object 1, the optimal social welfare cannot be
attained. Therefore, assuming that cache 1 holds object 1, cache 2 will prefer object 2 to object
1 if and only if the price of object 1 is less than 23. Cache 1, on the other hand, prefers the price
of 8 over the price of 23
for object 1 in spite of sharing the revenue with cache 2. Therefore, cache
1 charges a price of 8 and holds object 1. Also, cache 2 holds object 1, yielding a social cost of
M +56, which is clearly suboptimal. Therefore, it follows that, even when the caches charge prices,
a pure equilibrium may not lead to social optimality.
In this section, we devise a scheme that will avoid the above predicament that the equilibrium
prices do not necessarily result in socially optimal holdings. The caches following this scheme
22
will charge prices for sharing objects with the other caches in such a manner that the optimal
social welfare is indeed attained. We also propose an auction mechanism to arrive at the optimal
allocation.
To achieve the optimal social welfare, we first investigate some properties of the centralized
object placement problem and its linear programming (LP) dual, which we can construct since the
constraint matrix of (SL) is totally unimodular (Ahuja et al. 1993). Define gij = (cn− cl)αij and
βi = (co− cn)∑m
j=1 αij . The LP dual of (SL) is as follows:
(DS) maxn∑
i=1
ui−m∑
j=1
kjvj −n∑
i=1
m∑j=1
zij
s.t. ui− vj − zij ≤−gij i = 1, . . . , n; j = 1, . . . ,m
0≤ ui ≤ βi i = 1, . . . , n (12)
vj ≥ 0 j = 1, . . . ,m (13)
zij ≥ 0 i = 1, . . . , n; j = 1, . . . ,m.
Since the coefficients of zij in the objective function of (DS) are negative, zij equals max{0, gij +
ui− vj} at the optimal solution. In other words, (DS) can be rewritten as:
(DD) max
{n∑
i=1
ui−m∑
j=1
kjvj −n∑
i=1
m∑j=1
max{0, gij +ui− vj}∣∣∣∣ (12), (13)
}.
Lemma A.5 in Appendix A.6 allows us to assume that vj ≤maxi{gij + ui | i = 1, . . . , n}. Since
ui ≤ βi, we can, in fact, relax the above condition to:
vj ≤maxi{gij +βi | i = 1, . . . , n}. (14)
As a result, we can rewrite (DD) as:
(DN) max
{n∑
i=1
ui−m∑
j=1
kjvj −n∑
i=1
m∑j=1
max{0, gij +ui− vj}∣∣∣∣ (12), (13), (14)
}.
23
Proposition A.3 in Appendix A.6 establishes that the capacities of caches are substitutes with
respect to social welfare. This implies that the cost decrease due to a capacity increase at a cache
reduces with the capacity increases at the other caches.
Next, assume that (x∗, y∗) is a binary-valued optimal solution to (SL). Then, any optimal solution
(u, v) satisfies the following conditions (Dantzig 1963):
(F) vj ≥ gij +ui if x∗ij = 0 (15)
vj ≤ gij +ui if x∗ij = 1 (16)
ui ≤ βi if y∗i = 0 (17)
ui = βi if y∗i = 1 (18)
ui = 0 ifm∑
j=1
x∗ij > 1. (19)
Further, any solution in (F) is optimal to (DN). The maximum (coordinate-wise) element in (F)
exists by Proposition A.3 and is the unique optimal solution to:
(M) max
{n∑
i=1
ui +m∑
j=1
vj
∣∣∣∣ (15), (16), (17), (18), (19)
}
Here, ui can be interpreted as the potential revenue that any object i offers to a cache willing to
hold it. Then, cache j that holds i obtains a revenue of ui, in addition to the cost saving gij realized
from local availability. Hence, ui + gij is the value for j from holding i. In the above, vj provides
a threshold of these valuations: objects with lower valuations are not held in j, as seen in (15),
while objects held have higher valuations, as seen in (16). If a cache holds i uniquely, the revenue
generated is at most βi (see (17)), whereas the potential revenue lost by a cache when it does not
hold an object i that is held nowhere in the network is βi (see (18)).
As shown in Example 5.1, in the absence of (19), two caches may hold the same object and
charge a price for sharing it, forcing the network to deviate away from the socially optimal hold-
ings. Interestingly, (19) provides the additional condition needed to attain social optimality. This
constraint is equivalent to forcing a competition among the caches for the right to hold any object
and charge a (non-zero) price for it.
24
Propositions A.4 and A.5 in Appendix A.7 show that, if the revenue earned from object i is ui,
then cache j’s optimal holding corresponds to an optimal social welfare allocation. In Appendix
A.7, we also argue that a cache has no reason to prefer one optimal allocation over another. We
do not, however, imply that the caches have incentives to truthfully reveal their demands; in fact,
the following example clearly shows that they may have incentives to do otherwise. Instead, we
assume that the demands are common knowledge.
Example 5.2. Consider two objects and two caches, the first with a capacity of two and the
second with a capacity of one. Let cl = 1, cn = 2 and co = 3. Suppose the first cache has a demand of
one for each object. Consider the case where the demand for cache 2 is A2 = (1+a,1), where a > 0.
The optimal dual solution is u = (0,min(a,2)). The cost to cache 2 is then (1+a)+(2 + min(a,2)
2
).
However, if the cache fakes its demand to be (1,1), the price for object 2 will be reduced to 0 and
the cost incurred would be reduced by min(
a2,1
). Therefore, it is not in the interest of cache 2 to
truthfully reveal its demand.
It turns out that an auction mechanism derived using myopic decisions for each cache results
in an optimal allocation for the network. Auction processes in assignment problems are discussed
by Demange et al. (1986) and, on a different version of the transportation problem from the one
discussed here, by Bertsekas and Castanon (1989). Our treatment here is heavily inspired by these
works. However, unlike the auction of Bertsekas and Castanon (1989), the caches here do not bid
for objects held by them. We assume that, even if the value of the best available object is 0 for a
cache (which is quite unlikely), the cache holds it rather than leaving the spot empty. Our setup is
also different from typical setups found in the auction literature (see Day 2004). First, unlike in a
two-sided market, the transactions here are among the caches themselves and each cache may pay,
as well as receive, payments for objects. Second, the price for an object is an agreement about the
amount that a cache can charge for each access of that object by a neighbor. Third, we require
that multiple copies of an object be allowed in the network only when the price for sharing that
object drops to zero. At that time, no further competition is required to cache that object.
25
The proposed auction mechanism is a descending-price auction, similar to the wireless spectrum
auctions of Milgrom (2000). An object i is initially priced at co−cn. There are rounds of the auction
and, in each round, the caches bid for the objects that they would like to hold and share with the
network at the bid price. The objects are assigned to prospective caches at the prices they have
already committed to. Sharing an object at the bid price generates a revenue for the cache, which
includes the amount collected from the other caches and also the amount the cache saves by not
having to pay for it. Therefore, we may refer to revenues instead of prices as the bid parameter.
Formally, at the beginning of round r, Orj is the set of objects allocated to a prospective cache
j and uri denotes the revenue from object i. The valuation of object i by cache j at the beginning
of round r is vrij = gij + ur
i if i ∈Orj . For a valid bid, the discount offered by a cache for acquiring
object i must be at least min{uri , ε}. In other words, the caches can either offer an object for free
or offer a discount of at least ε in each bid. Therefore, the valuation of i �∈Orj for cache j can be
calculated to be vrij = max{gij , gij + ur
i − ε}. At the end of each round of the auction, the object
is assigned to the cache offering the maximum discount. If the price of the object reduces to 0, it
is assigned to all the caches that are willing to share the object for free. The rounds of auction
terminate when there is no uncommitted spot left in any cache.
We assume that each cache’s behavior is myopic. Let T rj ⊆N\Or
j be a set of objects, of cardinality
kj−|Orj |, with the highest valuations for j at the beginning of round r. Let i′(r, j) be the next best
object after T rj in N\Or
j . If N\(Orj ∪ T r
j ) = ∅, let vri′(r,j)j = 0. It follows that cache j is willing to
acquire an object i∈ T rj as long as the revenue it generates (after accounting for the discount that
must be offered to acquire it) is not less than max{0, vri′(r,j)j − gij}.
Theorem 5.1. The above auction allocates objects in a manner that generates the optimal social
welfare as long as ε≤ 1∑mj=1 kj
. (See Appendix A.8 for a proof.)
The proof of this theorem relies on the gross substitutability (see, for example, Kelso and Craw-
ford 1982) of objects for the individual optimal allocation at each cache. The gross substitutability
in our case also follows from Theorem 3.1 of Day (2004). However, Theorem 5.1 departs from the
26
results of Day (2004) in that the structure of our game is different and that our theorem also
provides an upper bound on ε.
5.1. Symmetric Caches
The prices in the symmetric cache setup can be interpreted using the benefits dit of holding the
tth copy of object i. Such an interpretation leads to an alternate (dual) proof of the optimality
of Algorithm SCGS of Section 3.1 (see Appendix A.9 for details). In the context of symmetric
caches, it is natural to ask if the resulting pricing and allocation decision is fair for each cache. In
Appendix A.9, we show that the threshold valuations for a spot are identical across all caches i.e.,
vj = vj′ and that the resulting pricing and allocation decision is indeed fair. The following example
illustrates the valuations, prices, and optimal allocation in a symmetric setup.
Example 5.3. Consider Example 4.3, where the social optimal allocation is not a pure-
equilibrium. Let the revenue vector for the objects be u = {0,0,6,15,16,18,19,20,23} and let every
cache j have a threshold valuation of vj = 33 for each of its spots. Object 1 is the only one with
g1j > vj; so, all the caches hold this object. The other objects are all valued at vj. At least one copy
of objects 2, . . . ,9 must be held since the revenue ui is below βi, where βi is the revenue required
to bring the cost of acquiring the object down from co to cn (see (F) on Page 23). The remaining
spot is filled by another copy of object 2. This allocation exactly corresponds to the social optimal
one mentioned earlier for Example 4.3.
6. Generalization and Future Directions
In this section, we consider the generalization of our results to objects with arbitrary sizes. We also
discuss the application of our policies in a dynamic context, relating them to the existing dynamic
update strategies in the literature.
6.1. Arbitrary Object Sizes
The formulation of the social welfare problem can be generalized to handle the case where each
object has a different size si by simply replacing (3) with∑n
i=1 sixij ≤ kj for each j ∈M . Here, αij is
measured in the number of bytes, or the number of packets for transmission, or any other common
27
size unit. In terms of complexity, however, the problem now becomes much harder. Clearly, even
with just one cache, it is equivalent to the knapsack problem and is, therefore, NP-Hard. Actually,
the social welfare caching problem is strongly NP-hard even when all the caches have the same
capacity (see Appendix A.10 for a proof).
When cl = cn, there is no benefit from holding an object at two caches simultaneously. Therefore,∑m
j=1 xij ≤ 1. Here, yi = 1−∑m
j=1 xij, and the social welfare caching problem reduces to the multi-
dimensional knapsack problem. When cn = co, the problem decomposes into m knapsack problems.
The NP-Hardness of the social welfare problem with different object sizes stems from the fact that
we are not allowed to split an object and store the individual parts in different caches. Assuming
that we can indeed split the objects13 and prorate the cost of acquiring portions of an object, the
optimal social welfare is obtained by solving the following transportation problem:
(SS) minm∑
j=1
{(cl− cn)
n∑i=1
αij
si
χij + cn
n∑i=1
αij +(co− cn)n∑
i=1
αij
si
γi
}
s.t.n∑
i=1
χij ≤ kj j = 1, . . . ,m (20)
γi ≥ si−m∑
j=1
χij i = 1, . . . , n (21)
γi ≥ 0 i = 1, . . . , n
γi ≤ si−χij i = 1, . . . , n; j = 1, . . . ,m (22)
χij ∈ {0,1, . . . , si} i = 1, . . . , n; j = 1, . . . ,m. (23)
Here, χij is integer because we do not allow splitting below the common size unit in which αij is
expressed. Also, χij
siis the fraction of object i held by cache j and γi
siis the fraction of the object
acquired from the origin server. Clearly, γi = max{0, si−∑m
j=1 χij} ≤ si−χij . Therefore, (22) can
be dropped. Since (SS) is a transportation problem with integral right-hand sides, (23) can be
13 Typically, an object is divided into packets for transmission. So, assembly is required irrespective of whether theentire object is brought from one source or from a number of sources. Indeed, splitting the object and assembling itlater is used in practice (http://www.atzio.com/technology.htm) and known to have a very low overhead. Therefore,our assumption of proportionality of costs for split objects is reasonable in a caching context. On the contrary, in agrid computing environment in which we allocate jobs to processors, the cost of combining the split segments maybe too large to be ignored.
28
relaxed to 0 ≤ χij ≤ si (Ahuja et al. 1993). Also, since the total number of constraints in (20)
and (21) is m+ n, any extreme point optimal solution to the transportation problem has at most
m+n variables that are not at their bounds. For the caching problem, where typically m� n, this
implies that objects are not split heavily.
When cl = cn, (SS) reduces to
max
⎧⎨⎩
n∑i=1
⎛⎝ m∑
j=1
αij
si
m∑j′=1
χij′
⎞⎠ ∣∣∣∣ m∑
j=1
χij ≤ si ∀i,n∑
i=1
χij ≤ ki ∀j⎫⎬⎭ .
The optimal allocation here is for the objects to be ordered by∑m
j=1
αij
siand allocated in a greedy
manner. When cn = co, (SS) decomposes into m problems, each of which can be solved greedily.
Clearly, the results presented in the previous sections, except for the algorithmic complexity of
computing the best pure equilibrium, continue to hold for objects with arbitrary sizes as long as
they are allowed to be split.
6.2. Dynamic Policies
In the literature, dynamic cache update policies are typically implemented using priority queues
where the priority of an object is determined by a cost metric that may be cache and/or object
dependent and may evolve with time (see Cao and Irani 1997, Mookerjee and Tan 2002). Thus
far, we have used αij to signify the demand (or demand rate) for object i experienced by cache
j. Such an interpretation is, however, not needed in our analysis. In fact, αij may as well be any
priority-order cost parameter consistent with the policies used in the literature. Here, we have
absorbed in αij any cost that is dependent on the object-cache pair in consideration. The only role
played by cl, cn and co is to proportionately scale the cost metrics depending on the location from
which the object is accessed.
In the single-cache framework, the distinction among cl, cn and co is unnecessary. If m = 1, the
cost expression in (2) simplifies to co
∑n
i=1 αi1 − (co − cl)∑n
i=1 αi1xi1. The first part of the above
expression is constant, and (co− cl) may be scaled to one. Therefore, (SL) becomes:
(PO) max
{n∑
i=1
αi1xi1
∣∣∣∣ n∑i=1
xi1 ≤ k1, xi1 ∈ {0,1}}
.
29
The optimal solution to (PO) is trivially obtained by retaining the objects with the highest pri-
orities. The algorithm for optimally solving (PO) is, therefore, greedy in nature. Interestingly, as
shown earlier, a greedy algorithm is optimal even for a network of caches with a symmetric setup,
whereas such algorithms cannot be devised for asymmetric setups.
Cache update policies for objects with different sizes have been proposed in the literature by
replacing the object priority measures with priority-to-size ratios. We show next that these policies
are optimal in the setup for arbitrary object sizes. If m = 1, (SS) reduces to
(PS) min
{co
n∑i=1
αi1− (co− cl)n∑
i=1
αi1
si
χi1|n∑
i=1
χi1 ≤ k1, χi1 ∈ {0,1, . . . , si}}
.
Assume, without the loss of generality, that αi1si
>αi′1si′
whenever i < i′ (i.e., the objects are ordered
based on priority-to-size ratios). Let r be the largest index such that∑r
i=1 si < k1. The optimal
solution to (PS) is the following:
χi1 =
⎧⎪⎨⎪⎩
si if i≤ r,
k1−r∑
i=1
si if i = r +1,
0 otherwise.
The above allocation matches the dynamic policies proposed in the literature for all objects except
the (r +1)th one, which is not held in the dynamic policies but is partially held in this allocation.
The above solution can also be obtained by viewing (PS) as a continuous knapsack problem. When
m = 1, any cn between cl and co yields the same solution.
To our knowledge, Mookerjee and Tan (2002) and Hosanagar and Tan (2004) are the only studies
that analytically evaluate the performance of the popular LRU strategy using metrics such as
the expected waiting time and the hit ratio. Mookerjee and Tan (2002) consider a single-cache,
single-user framework. Their results critically depend on two tacit assumptions: object accesses
are independent of one another; and for every object and a given time duration, the unconditional
probability that the object has not been requested during that time interval is the same (i.e., all
objects have similar access patterns that are just temporally shifted with respect to one another).
Our analysis, on the other hand, does not make these simplifying assumptions. In fact, even for
30
single-cache frameworks, an analytical calculation of the expected waiting time is still an open
question if one relaxes these assumptions.
Hosanagar and Tan (2004) consider a two-cache, cooperative caching, centralized scenario. In
addition to the assumptions of Mookerjee and Tan (2002), they assume that the object requests
are independent across caches. The similarity and the independence assumptions of the object
demands (at each cache and across caches) are restrictive, but necessary for their analysis. These
assumptions imply that, given a set of objects, any ordering of objects is equally likely in terms of
temporal locality. Incidentally, the intuitions gained from their analysis can also be derived quite
easily in our framework (which does not make similar assumptions). In particular, the intuitions
regarding the latency effects on schemes like CARP and ICP can be found by setting cn = cl and
cn = co, as discussed in Section 6.1.
In order to implement dynamic cache update policies for cooperative caches in the centralized
framework, we propose to update αij and solve the transportation problem at certain points (which
can be determined by the time since the last update). As we have already argued, this policy
reduces to the existing cache update policies in a single-cache environment. One need not solve a
single transportation problem over all the caches in the network, and may instead partition the
network heuristically and solve a separate problem for each partition.14 Thus, generalizations of the
existing cache update policies can be easily derived from our work; we leave their specific analyses
for future investigation.
Currently, cooperative caches employ protocols such as ICP where each cache has its own priority
queue according to which its allocation decisions are made (Cao and Irani 1997, Ramaswamy
and Liu 2004). Such a setup can be modeled as the decentralized setup of Section 4. In fact, as
long as the individual priority queues are such that local access is preferred to access from the
neighborhood, which in turn is preferred to access from the origin server, Theorems 4.1 and 4.2
will hold. This is because the proofs of these results only make use of the stated property for object
14 One may not have to create many partitions since transportation problems can be solved relatively quickly anyway(see http://plato.asu.edu/ftp/network.html for recent benchmarks for network-flow problems).
31
access preferences and not the particular structure of the cost expressions. Without substantial
changes, the integer program for locating the best pure equilibrium, alluded to in Section 4.1.2
and described in Appendix A.4, can also be adapted to account for cache-specific priority queues.
Therefore, the decentralized analysis presented in the paper is applicable to the current cooperative
caching contexts.
7. Conclusions
We have analyzed object allocation mechanisms for web caching in both centralized and decentral-
ized scenarios. The comprehensive analysis presented here draws tools from operations research
and game theory. The social welfare problem is shown to reduce to the well-known transportation
problem, which can be solved efficiently. When the caches act selfishly, it is shown that pure equi-
libria always exist and can be characterized by an integer program. More interestingly, starting
with arbitrary holdings, myopic reactions by the caches always lead to a pure equilibrium in a
finite number of steps. Unfortunately, for many instances, there are no equilibria that achieve the
optimal social welfare. However, when the caches charge prices for sharing objects, the auction
mechanism presented here results in an allocation that yields the optimal social welfare.
The paper addresses the two key questions motivating this study and raised in the introductory
section: The allocation that yields the optimal social welfare can be found using efficient and well-
known algorithms; and if the caches charge prices for sharing objects, the optimal social welfare
can indeed be attained in an autonomous environment. Our work provides a number of other useful
managerial insights as well: First, using the fact that the social welfare problem can be expressed
as a transportation problem, we show that cache capacities are substitutes, i.e., increasing the
capacity at one cache has a lesser effect on social welfare if the capacities at the other caches
are also increased. This should be helpful in allocating capacities to caches. Second, if the cache
capacities are identical and the overall demand for each object is given, then the symmetric setup,
as defined in the paper, incurs the highest social network cost. Since the symmetric setups are
solved very easily, they may be used to quickly determine a bound on the optimal social cost.
32
Third, interesting responses by the caches operating under autonomous control are observed. For
example, contrary to popular belief, the caches in a pure equilibrium may hold more objects in
the network than in the socially optimal allocation; and when the equilibrium is not unique, which
is often the case, the network cost and the number of objects held in the network may both be
different in different equilibria. Fourth, for a symmetric setup, in the absence of prices for sharing
objects, a necessary condition for a strategy to be a pure equilibrium is that the network holds
at least a certain number of copies of an object. If this criterion is not met by the optimal social
welfare allocation, none of the pure equilibria will produce as good an allocation. Fifth, prices are
simultaneously maximized for all objects, yielding the maximum revenue to each cache, and these
prices can be easily obtained.
We believe that the ideas presented in this paper will help develop effective cache management
policies. Future work would benefit from our results in deciding how to allocate capacities to the
caches, whether to invest in extra capacities, how demand changes will affect the overall network
cost, and whether or not to share objects in a given scenario. If sharing is found profitable, our
work would help design protocols geared toward achieving the maximum profit and also aid in
developing policies that would incentivize the caches to participate in a collaborative manner.
The directions provided in Section 6 show promise in addressing problems involving objects with
different sizes and in developing dynamic cache update policies for a network of caches. The design
of online mechanisms and the development of allocation schemes where the underlying network
is not a complete graph would be interesting future extensions. The insights gained in this paper
may also benefit research on other resource-sharing problems that have a similar three-tiered cost
structure.
Acknowledgments
We thank Dan Kovenock, Rabee Tourky, and the seminar participants at CMU, Indiana University, Michigan
State University, University of Alberta, University of Texas, Dallas, and University of Washington for their
comments. We also thank Chetan Kumar for his involvement in the initial stage of this project. In addition,
we thank one anonymous reviewer, in particular, for his/her careful reading and suggestions.
33
References
Ahuja, R. K., T. L. Magnanti, J. B. Orlin. 1993. Network Flows. Theory, Algorithms and Applications .
Prentice Hall, Englewood Cliffs, NJ.
Bertsekas, D. P., D. A. Castanon. 1989. The Auction Algorithm for the Transportation Problem. Annals of
Operations Research 20 67–96.
Cao, C., S. Irani. 1997. Cost-aware www proxy caching algorithms. Proceedings of the 1997 Usenix Symposium
on Internet Technologies and Systems. 193–206.
Chun, B.-G., K. Chaudhuri, H. Wee, M. Barreno, C. H. Papadimitriou, J. Kubiatowicz. 2004. Selfish Caching
in Distributed Systems: A Game-Theoretic Analysis. Proceedings of the Twenty-Third Annual ACM
Symposium on Principles of Distributed Computing. 21–30.
Dantzig, G. B. 1963. Linear Programming and Extensions . Princeton University Press, Princeton, NJ.
Datta, A., K. Dutta, H. Thomas, D. VanderMeer. 2003. World Wide Wait: A Study of Internet Scalability
and Cache-Based Approaches to Alleviate It. Management Science 49 1425–1444.
Day, R. 2004. Expressing preferebces with price-vector agents in combinatorial auctions. Ph.D. thesis,
University of Maryland, College Park.
Demange, G., D. Gale, M. Sotormayor. 1986. Multi-item auctions. Journal of Political Economy 94 863–872.
Dilley, J., B. Maggs, J. Parikh, H. Prokop, R. Sitaraman, B. Weihl. 2002. Globally distributed content
delivery. IEEE Internet Computing 6 50–58.
Fudenberg, D., J. Tirole. 1991. Game Theory. MIT Press, Boston.
Garey, M. R., D. S. Johnson. 1979. Computers and intractability. A guide to the theory of NP-completeness..
A Series of Books in the mathematical Sciences. San Francisco: W. H. Freeman and Company.
Geng, X., R. Gopal, R. Ramesh, A. Whinston. 2003. Trading capacities: Capacity provision networks. IT
Professional 5 30–36.
Glover, F., E. Woolsey. 1974. Converting a 0−1 polynomial programming problem to a 0−1 linear program.
Operations Research 22 180–182.
Horn, R. A., C. R. Johnson. 1990. Matrix Analysis . Cambridge University Press, Cambridge, UK.
Hosanagar, K., R. Krishnan, J. Chuang, V. Choudhary. 2005. Pricing and Resource Allocation in Caching
Networks with Multiple Levels of QoS. Management Science 51(12).
34
Hosanagar, K., Y. Tan. 2004. Optimal Duplication in Cooperative Web Caching. Proceedings of the Four-
teenth Annual Workshop on Information Technologies and Systems . 92–97.
Kelso, A. S., V. P. Crawford. 1982. Job matching, coalition formation and gross substitutes. Econometrica
50 1483–1504.
McLennan, A., R. Tourky. 2006. Simple complexity from imitation games. Games and Economic Behavior
Forthcoming.
Milgrom, P. 2000. Putting auction theory to work: The simultaneous ascending auction. Journal of Political
Economy 108 246–272.
Mookerjee, V. S., Y. Tan. 2002. Analysis of a Least Recently Used Cache Management Policy for Web
Browsers. Operations Research 50 345–357.
Podlipnig, S., L. Boszormenyi. 2003. Survey of Web Cache Replacement Strategies. ACM Computing Surveys
35 374–398.
Ramaswamy, L., L. Liu. 2004. An expiration age-based document placement scheme for cooperative web
caching. IEEE Transactions on Knowledge and Data Engineering 16 585–600.
Tawarmalani, M., N. V. Sahinidis. 2002. Convexification and Global Optimization in Continuous and Mixed-
Integer Nonlinear Programming: Theory, Algorithms, Software and Applications. Kluwer Academic
Publishers, Dordrecht.
Topkis, D. M. 1998. Supermodularity and Complementarity. Princeton University Press, Princeton, NJ.
Valloppillil, V., K. W. Ross. 1998. Cache Array Routing Protocol v 1.0 Internet Draft. http://www.globcom.
net/ietf/draft/draft-vinod-carp-v1-03.html.
Wang, J. 1999. A survey of web caching schemes for the internet. ACM Computer Communication Review
29 36–46.
Wessels, D., K. Claffy. 1998. ICP and Squid Web Cache. IEEE Journal on Selected Areas in Communications
16 345–357.
Young, N. 1994. The k server dual and loose competitiveness for paging. Algorithmica 11 525–41.
1
Appendix/Online Supplement
A.1. Minimum Network Costs with Identical Cache Capacities
Proposition A.1. An assignment problem can be reduced to (SL), where each cache capacity is one.
Proof. Consider an assignment problem with m jobs and m workers where the profit from assigning job
i to worker j is pij . It is sufficient to consider instances of assignment problems where, for each job i, there
is at least one worker j such that pij > 0. The instance of (SL) is created by mapping jobs to objects and
workers to caches. Set cl = 0, cn = 1, co = maxi,j(αij)
mini∑m
j=1 αij+ 1 + ε for an arbitrarily chosen ε > 0. Further, set
αij = pij.
We prove by contradiction that for all objects, yi = 0 in any optimal solution to the constructed instance
of the (SL) problem. Each cache holds an object. If not, placing any unassigned object in the vacant cache
improves the objective function value. Now, consider an i such that yi = 1 in an optimal solution to (SL).
Then, by the pigeon hole principle, there exists an object i′ which is held by at least two caches, say, j and
j′. Consider an alternative solution to (SL) where yi = 0, xij = 1, and xi′j = 0. The constructed solution is
clearly feasible, and the objective function decreases by (co − 1)∑m
j′′=1 αij′′ + αij − αi′j , a quantity larger
than zero.
From (5), it follows that∑m
i=1
∑m
j=1 xij ≥m. Also, from (3), it follows that∑m
i=1
∑m
j=1 xij ≤m. Therefore,∑m
i=1
∑m
j=1 xij = m and, consequently,∑m
i=1 xij = 1 and∑m
j=1 xij = 1. Furthermore, any assignment solution
can be translated to a feasible solution of (SL) with the same objective function value.
A.2. Technical Results Concerning Cost Sensitivity to Demand Changes
Let A = [A1, . . . ,Am] ∈ Rn×m be the demand matrix and E be an m×m matrix of all ones. Further, let
OptCost(A) denote the minimum cost experienced by the network facing a demand of A. We show that
OptCost((1−λ)A+ λ
mAE
)is an increasing function of λ for λ∈ [0,1].
Lemma A.1. If the cache capacities are identical, then OptCost(A)≤OptCost(UAV ), where U ∈Rn×n
and V ∈Rm×m are doubly stochastic matrices.1
Proof. By linear programming sensitivity analysis, OptCost(A) is concave in A. Clearly, permuting the
objects does not alter the cost. Since the caches have the same capacity (i.e., kj = kj′ = k for all j and j′),
OptCost(A) remains the same when the caches are permuted.
1 A matrix is doubly stochastic if each of the elements is non-negative and each row and each column sums to one.
2
There exist I and J , which are each finitely sized; non-negative λij for i ∈ I and j ∈ J such that∑i∈I,j∈J
λij = 1; and Si ∈Rn×n for i ∈ I and Tj ∈R
m×m for j ∈ J which are permutation matrices so that:
OptCost(UAV ) =∑
i∈I,j∈JOptCost(λijSiATj) ≥
∑i∈I,j∈J
λij OptCost(SiATj) =∑
i∈I,j∈Jλij OptCost(A) =
OptCost(A). The first equality follows from Birkhoff’s Theorem (Horn and Johnson 1990), the first inequal-
ity follows from the concavity of OptCost(A), and the second equality follows from permutation invariance
with respect to caches and objects.
Proof of Theorem 3.2 Since Em
and the identity are both doubly stochastic matrices, it follows directly
from Lemma A.1 that OptCost(A)≤OptCost(
1m
AE).
A.3. Local Optimality Condition for Each Cache and Existence of Pure Equilibria
Lemma A.2. A pure strategy Oj corresponds to the optimal solution in (DL) if and only if it satisfies
the condition in Step 3 of Algorithm Local Solution.
Proof. First note that (11) is linear in xij . Further, the coefficient of xij is non-negative since cn ≥ cl,
co ≥ cn, and 0≤ xij ≤ 1. Consider an arbitrary set Oj of cardinality kj . Since the cardinality of the set {i′ |
bi′j > bj} is less than or equal to kj −1 (by Step 2 of Algorithm Local Solution), there exists an i′′ ∈Oj such
that bi′′j ≤ bj. We prove the result by contradiction. If there is an i∈N\Oj with bij > bj, then Oj\{i′′}∪{i}
yields a higher objective function value than Oj . Therefore, Oj cannot be the optimal solution of (DL).
Proof of Theorem 4.1 A cache is said to acquire an object if it did not hold this object prior to the
move and holds it subsequently. Consider an arbitrary cache j. We first argue that, in its first move, j does
not acquire an object which is held by another cache. An object i already held by another cache yields a
benefit of (cn − cl)αij to j. The objects held by j in the non-sharing strategy have demands larger than or
equal to αij, and all these objects yield at least a benefit of (cn− cl)αij .
A cache is said to relinquish an object if it held this object prior to the move and does not hold it
subsequently. We argue that a cache j does not relinquish an object i that is held uniquely by it before its
first move. An object i′ with lesser demand αi′j cannot provide more value to j (i.e., bi′j ≤ bj) irrespective
of whether it is available for unique holding or is being held by another cache. Since i is among the top kj
demanded objects, j does not relinquish it in its first move.
We prove by contradiction that no cache moves a second time. Assume that cache j is the first cache to
have an incentive to move a second time. Meanwhile, no cache has acquired an object held by j. This implies
3
that the values of the objects held by cache j have not reduced since it made the first move. Since j is the
first cache wanting to move again, no cache has relinquished a uniquely held object in the meantime. It
follows that an object i, that was not available for unique holding during the first move of j, is not available
before its second move either. In short, the value of the objects regarded inferior by cache j during its first
move has not increased since then.
Thus, the values of inferior objects have not increased and the values of preferred objects have not reduced.
Consequently, j has no incentive to move again, yielding a contradiction.
A.4. Integer-Programming Formulation for the Set of Pure Equilibria
To develop this formulation, we use variables xij and yi as defined in the paper. In addition, we introduce
variables oij to linearize 1 −∏j′ �=j
(1 − xij′). In our context, oij is 1 if some cache j′ �= j holds i and 0
otherwise.
Using these variables, the problem of finding the best social equilibrium can be formulated as:
(BP) minm∑
j=1
{(cl− cn)
n∑i=1
αijxij + cn
n∑i=1
αij + (co− cn)n∑
i=1
αijyi
}
s.t. xij′ ≤ oij ≤∑j′ �=j
xij′ ∀i; ∀j; ∀j′; j′ �= j (24)
1− yi≥ xi′j ∀i; ∀j; ∀i′; αij > αi′j (25)
xij ≥ xi′j + oi′j + yi′ − 1 ∀i; ∀j; ∀i′; αij > αi′j (26)
1− yi≥ xi′j + oi′j + yi′ − 1 ∀i; ∀j; ∀i′; (co− cl)αij > (cn− cl)αi′j (27)
xij ≥ xi′j ∀i; ∀i′;∀j; (cn− cl)αij > (co− cl)αi′j (28)
1− xij ≤ yi + oij ≤ 1 ∀i; ∀j (29)n∑
i=1
xij = kj ∀j (30)
xij , oij , yi ∈ {0,1} ∀i; ∀j.
It is interesting to note that the size of (BP) is polynomial in kj , n, and m, whereas the strategy space of
each player is exponential.
Proposition A.2. The set of pure equilibria is identical to the set of feasible solutions to (BP).
Proof. First, note that yi = (1− oij)(1− xij). In other words:
xijoij = xij + oij + yi− 1 ∀i; ∀j.
4
In order that a feasible solution to (BP) corresponds to a pure equilibrium, it is necessary and sufficient
by Lemma A.2 that it satisfies:[(cn− cl)(αi′j −αij)+ (co− cn)
(αi′j
∏j′ �=j
(1− xi′j′
)−αij
∏j′ �=j
(1− xij′
))]xi′j(1− xij)≥ 0
for any j which holds i′ instead of i. By substituting oij and oi′j for the nonlinear products, the above
constraint can be simplified to:[(cn− cl)(αi′j −αij)+ (co− cn)
(αi′j(1− oi′j)−αij(1− oij)
)]xi′j(1− xij)≥ 0. (31)
A solution violates (31) if and only if xi′j = 1, xij = 0, and the expression in the brackets is negative. We
now obtain the conditions when this expression is negative. Clearly, it is so if (co−cl)αi′j < (cn−cl)αij , which
yields (28). Now, assume that (co− cl)αi′j ≥ (cn− cl)αij . If αij > αi′j then the expression is negative if either
oij = 0 (equivalently, yi = 1), which yields (25); or if oi′j = 1 (equivalently, xi′joi′j = 1), which yields (26). If
αij ≤ αi′j and (co− cl)αij > (cn− cl)αi′j , then the expression is negative if oi′j = 1 (equivalently, xi′joi′j = 1)
and oij = 0 (equivalently, yi = 1), which yields (27). Constraints (24) linearize oij =∏
j′ �=j(1− xij′), whereas
constraints (29) linearize yi = (1− oij)(1−xij). Constraint (30) models the capacity of cache j. This proves
that all constraints of (BP) are satisfied by a pure equilibrium, and vice versa.
Proposition A.2 allows us to find equilibria with the minimum social welfare by maximizing the objective
function of (BP). We can also find the best/worst pure equilibrium from a particular cache’s perspective by
minimizing/maximizing (cl− cn)∑n
i=1 αijxij + cn
∑n
i=1 αij + (co− cn)∑n
i=1 αijyi.
A.5. Technical Results for Pure Equilibria of Symmetric Caches
Lemma A.3. There exists a pure equilibrium that attains the maximum social welfare, where the set of
objects held in the network is {1, . . . , a} and each cache that holds an object i ∈ {1, . . . ,wa} also holds all
objects in {1, . . . , i}.
Proof. Consider a pure equilibrium such that a cache j holds a. We prove by contradiction. Let i′ =
max{i′′ | i′′ < a; i′′ �∈ ∪mj=1Oj}. Since this is a pure equilibrium, αi′ ≤ αa. But i < a implies that αi′ ≥ αa.
Therefore, αi′ = αa. Consider the pure equilibrium where j caches i′ instead of a. Clearly, the social welfare
remains the same. This proves the first condition. If j caches a, it must also cache {1, . . . ,wa}. Now, consider
a cache j′ that holds i∈ {1, . . . ,wa}, but not i′ < i. Clearly, j′ does not hold any object a′ such that wa′ ≥ i′
or else i′ must be held. Therefore, j′ can relinquish i in favor of i′ without reducing social welfare while
keeping the caches in equilibrium.
5
In the following, we only consider pure equilibria that satisfy the conditions of Lemma A.3.
Lemma A.4. Any pure equilibrium that satisfies the conditions of Lemma A.3 holds at least fi copies of
object i, where i∈ {1, . . . ,wa} and fi is as generated by Algorithm SCBE in Figure 4.
Proof. Consider a pure equilibrium E, with r′i copies of object i. Let tj = max{i | i≤ wa, i ∈Oj}. We
order the caches such that for any j′ < j, tj′ ≥ tj. By Lemma A.3, for any i ≤ wa, i is held by caches in
{1, . . . , r′i}. We prove by contradiction. Let i′ = max{i′′ | i′′ ≤ wa, r′
i′′ < fi′′}. Now, consider the caches in
{1, . . . , r′i′}. Each of them holds objects {1, . . . , i′}. Also, these caches hold r′
i copies of objects in {i | i′ < i≤
wa}. Furthermore, since no other cache holds object i′, caches in {1, . . . , r′i′} hold objects in I = {i | i′ ≤wi}.
Since fi =∑
i≤i≤waf ′
i ,
kr′i′ ≥ i′r′
i′ +∑
i′<i≤wa
r′i + |I| ≥ i′r′
i′ +∑
i′<i≤wa
fi + |I|= i′r′i′ +
∑i′<i≤wa
∑i≤i≤wa
f ′i + |I|. (32)
In Algorithm SCBE, a′j does not decrease and, therefore, wa′
jdoes not increase with j. Let us consider
the execution of the while loop starting at Step 4 when j = r′i′ + 1. We show that wa′
j= i′. If wa′
j< i′,
then fi′ =∑
i′≤i≤waf ′
i ≤ r′i since precisely one f ′ increases in each iteration. If wa′
j> i′, then fwa′
j
≥ 1 +∑wa′
j≤i≤wa
f ′i = 1+ r′
i′ > r′i′ ≥ r′
wa′j
≥ fwa′
j
yielding a contradiction. Now, a′j = a− r′
i′k+∑
i′≤i≤wa
∑i≤i≤wa
f ′i .
Since∑
i′≤i≤waf ′
i′ = r′i′ , it follows that:
|I|> a− a′j = r′
i′k−∑
i′≤i≤wa
∑1≤i≤i
f ′i = r′
i′k− r′i′ i
′−∑
i′<i≤wa
∑i′<i≤i
f ′i = r′
i′k− r′i′ i
′−∑
i′<i≤wa
∑i≤i≤wa
f ′i ,
a contradiction to (32).
Consider Example 4.3. The optimal social welfare solution is not a pure equilibrium. In fact, it does not
satisfy the minimum copy requirements specified in Lemma A.4. If objects {1, . . . ,8} are held in the network,
then the minimum copy requirements for objects 1, 2, and 3 are 2, 2, and 1, respectively. These requirements
are satisfied by the best pure equilibrium described in the example.
Proof of Theorem 4.3 Consider the pure equilibrium satisfying the conditions of Lemma A.3 such
that yi = 1 for all i > a and 0 otherwise. Define r′i =
∑m
j=1 xij , p = max{i | (cn − cl)αi ≥ (co − cl)αa+1}, and
ui = 1 if i > p and m otherwise. Clearly, yi = 0, (24), and (29) imply that there exists a j′ such that xij′ = 1.
Therefore, for p < i≤ a, (27), and (24) imply that xij′′ = 0 for all j′′ �= j. In other words, r′i ≤ ui. By Lemmas
A.3 and A.4, r′i ≥ fi. Therefore, r′
i is a feasible solution to:
min
{(cl− cn)
a∑i=1
αir′i + cn
n∑i=1
mαi + (co− cn)n∑
i=a+1
mαi
∣∣∣∣ fi ≤ r′i ≤ ui,
a∑i=1
r′i = mk
}, (33)
6
and has the same objective function value as in (BP). Let r′i = ri as in Step 15 of Algorithm SCBE. Then:
km = k(m− j)+ wa− a′j + kj−wa + a′
j = h +a∑
i=1
fi =a∑
i=1
(ri− fi)+a∑
i=1
fi =a∑
i=1
ri, (34)
where the second equality follows from Step 12 and Steps 4 to 9, and the third from Step 15. This solution
is optimal to (33) since the objects are ordered with non-increasing demand, and if i′ < i and ri > fi, then
ri′ = m. Consider the case with l > wa. For i∈ {1, . . . , l}, allocate i to the caches in {1, . . . , rl}. Then, allocate
the remaining objects arbitrarily. Now, let l ≤ wa. Fill each cache in j′ ≤ fl with objects in {1, . . . ,wa′j} ∪
{a′j+1 +1, . . . , a′
j}. For j′ ∈ {fl+1, . . . , rl}, allocate all objects in {1, . . . , l} and, for j′ ∈ {rl +1, . . . ,m}, allocate
all objects in {1, . . . , l−1}. It can be verified that each object in {1, . . . ,wa} is allocated to ri caches. By (34),
there is enough space to allocate the remaining objects once; allocate them arbitrarily. Clearly, the caches
in {1, . . . , fl} are in equilibrium. The caches in {fl + 1, . . . , rl} are also in equilibrium since wa′fl+1
< l.
A.6. Sensitivity of Social Welfare with Cache Capacities
Lemma A.5. There exists an optimal solution to (DD) where vj ≤maxi{gij + ui | i = 1, . . . , n}. In fact,
if kj > 0, then vj ≤maxi{gij + ui | i = 1, . . . , n} in every optimal solution.
Proof. The objective function of (DD) increases with vj only if max{0, gij +ui− vj} increases for some
i. This is possible only if vj ≤ gij + ui. If kj > 0, then any increase beyond maxi{gij + ui} decreases the
objective function value because of the presence of −kjvj in the objective.
Proposition A.3. The optimal social cost is supermodular2 in K = (k1, . . . , km). Further, the set of opti-
mal solutions to (DN) is decreasing as a function of K. The set of optimal solutions to (DN) is a sublattice,
whose minimum/maximum element is decreasing3 in K.
Proof. Since∑n
i=1 ui is linear, it is supermodular in (u1, . . . , un). Clearly, −kjvj is supermodular in
(vj ,−kj) (see Example 2.6.2(c) in Topkis 1998). Further, −max{0, gij + ui − vj} is a concave function of
ui− vj. Therefore, by part (b) of Lemma 2.6.2 in Topkis (1998), −max{0, gij + ui− vj} is supermodular in
(ui, vj). Also, by part (b) of Lemma 2.6.1 in Topkis (1998), the objective function of (DD) is supermodular in
(u1, . . . , un, v1, . . . , vm,−K). Whenever (u′, v′) and (u′′, v′′) are feasible to (DN), (cmax{u′, u′′}, cmax{v′, v′′})
2 A function f(x) is said to be supermodular over Rn if for any x′ ∈ R
n and x′′ ∈ Rn: f(x′)+f(x′′)≤ f(cmax(x′, x′′))+
f(cmin(x′, x′′)), where cmax{x′, x′′} and cmin{x′, x′′} denote, respectively, the component-wise maximum and mini-mum of x′ and x′′ (see, for example Topkis 1998).
3 A set X ′ is set to be smaller than X ′′ if for each x′ ∈X ′ and x′′ ∈ X ′′, cmax{x′, x′′} ∈X ′′ and cmin{x′, x′′} ∈X ′.
7
and (cmin{u′, u′′}, cmin{v′, v′′}) are also feasible to (DN). Therefore, the feasible set of (DN) is a sublattice
of Rn+m. By Theorem 2.7.6 in Topkis (1998) and strong duality of linear programming (see Dantzig 1963),
the optimal value of (SL) is supermodular in −K. If we denote the optimal value of (SL) for a given K by
f(K), then for any K ′ and K ′′ in Rm,
f(K ′)+ f(K ′′) = f(−(−K ′))+ f(−(−K ′′))≤ f(− cmax{−K ′,−K ′′})+ f(− cmin{−K ′,−K ′′})
= f(cmin{K ′,K ′′})+ f(cmax{K ′,K ′′}),
where the equalities are trivial and the inequality follows from the supermodularity of the optimal value
with respect to −K. Therefore, f(K) is supermodular. By Theorem 2.7.1 of Topkis (1998), the set of
optimal solutions is a sublattice, and by Theorem 2.8.2 of Topkis (1998), the set of optimal solutions to
(DN) is decreasing. Because the dual variables are non-negative, the set of optimal solutions is bounded.
Since the set of optimal solutions is decreasing as a function of K, by Lemma 2.4.2 in Topkis (1998), the
minimum/maximum element also decreases.
Even though the warehouse capacities have already been shown to be substitutes in a transportation
problem (see Theorem 3.4.1 in Topkis 1998), Proposition A.3 does not directly follow. In particular, it
still needs to be verified whether the substitutability property continues to hold even with upper bound
constraints on the arc costs (since (4) constrains xij to be less than or equal to 1).
A.7. Prices and Optimal Social Welfare Allocation
In an optimal allocation, let o∗ij be 1 if i is held by some cache j′ �= j and 0 otherwise. Further, any object
held by the other caches is available to j at the price of qi. Assume that cache j offers an object at the price
pi. For analytical convenience, let ti be 1 if pi < qi and 0 otherwise. Then, the objective of cache j is to
maximize:n∑
i=1
(pixij(1− o∗
ij)∑j′ �=j
αij′ + pitixijo∗ij
∑j′ �=j
αij′
− clαijxij − (cn + qi)(1− xij)o∗ijαij − co(1− xij)(1− o∗
ij)αij
),
which can be simplified to:n∑
i=1
((cn + qi− cl)αijo
∗ij + pitio
∗ij
∑j′ �=j
αij′ +
((co− cl)αij + pi
∑j′ �=j
αij
)(1− o∗
ij)
)xij
−n∑
i=1
(co(1− o∗
ij)− (cn + qi)o∗ij
)αij .
8
Since the caches can always acquire an object from the origin server, it should be clear that
pi ≤ co− cn. (35)
Proposition A.4. Let (u′, v′) be a feasible solution to (F). Assume that qi = u′i∑
mj′=1
αij′. Then, v′
j ≤ (cn +
qi− cl)αijo∗ij + pitio
∗ij
∑j′ �=j
αij′ +((co− cl)αij + pi
∑j′ �=j
αij
)(1− o∗
ij), if x∗ij = 1 and
pi ≥ u′i∑m
j′=1 αij′. (36)
Proof. First, consider x∗ijo
∗ij = 1. By (19), u′
i = 0. Therefore, qi = 0 and ti = 0. So, by (16), vj ≤ gij =
(cn− cl + qi)αij + piti
∑m
j′=1 αij′ . Second, consider x∗ij(1− o∗
ij) = 1. Then,
v′j ≤ gij + u′
i ≤ gij + pi
m∑j′=1
αij′ = (cn− cl)αij + pi
m∑j′=1
αij′ ≤ (co− cl)αij + pi
∑j′ �=j
αij ,
where the first inequality follows from (16), the second from (36), and the last from (35).
Proposition A.5. Let (u′, v′) be a feasible solution to (F). Assume that qi = u′i∑
mj′=1
αij′. If x∗
ij = 0, then
v′j ≥ (cn + qi− cl)αijo
∗ij + pitio
∗ij
∑j′ �=j αij′ +
((co− cl)αij + pi
∑j′ �=j αij
)(1− o∗
ij).
Proof. First, consider (1− x∗ij)o∗
ij = 1. Since piti ≤ qi, then by (15),
v′j ≥ gij + u′
i = (cn− cl + qi)αij + qi
∑j′ �=j
αij′ ≥ (cn− cl + qi)αij + piti
∑j′ �=j
αij′ .
Second, consider (1− x∗ij)(1− o∗
ij) = 1. Then,
v′j ≥ gij + u′
i = (cn− cl)αij + (co− cn)m∑
j′=1
αij′ ≥ (co− cl)αij + pi
∑j′ �=j
αij ,
where the first inequality follows from (15) and the last from (35).
We now argue that a cache has no reason to prefer one optimal allocation over another. It is well known that
an optimal flow can be obtained from another by flow augmentation along paths/cycles with zero reduced
cost on each arc. The augmenting paths (and obviously cycles) do not start/end at any caches (assuming
that they are completely full in both solutions). Therefore, each cache trades an object for another. Let
(u, v) be optimal to (M). Cache j incurs a loss of gij + ui when it relinquishes i. If i is also held by another
cache, then ui = 0. On the other hand, if i is left to be served by the origin server, then ui = βi. Otherwise,
j loses revenues from the other caches and pays to the cache which acquires the object. Similarly, the object
that j acquires yields a benefit of gij + ui. If the object has already been held by another cache and is not
relinquished by it, then ui = 0. Otherwise, the cache earns revenues from the other caches and does not pay
itself. Therefore, in each augmentation, every cache has the same welfare as before.
9
A.8. Proof of Theorem 5.1
We say that a solution satisfies ε−CS (ε− complementary slackness) conditions before round r if for each
i and j such that i ∈ Orj , vr
ij ≥ vri′(r,j)j and for each object i �∈ ⋃m
j=1 Orj , ur
i = βi. Further, uri ≥ 0,∀i, and
if i ∈ Orj ∩Or
j′ for some j �= j′, then uri = 0. In particular, the starting solution of u1
i = βi and O1j = ∅, ∀j,
satisfies ε−CS conditions.4
We show by induction that ε−CS conditions are satisfied after each round if the initial solution satisfies
the conditions. By the rules of the auction, an assigned object always remains assigned and the prices do
not go up. Assume that a solution satisfies ε− CS conditions before round r. Let I1 ⊆ Orj be the set of
objects that j loses and I2 be the set of objects j acquires in the rth round. Since I2 ⊆ T rj , it follows that for
any i ∈ I2, vr+1ij ≥ vr
i′(r,j)j . Further, by our induction hypothesis, for each i ∈Orj , vr+1
ij ≥ vri′(r,j)j . Now, there
must be kj −|Or+1j | objects in N\Or+1
j with a valuation of at least vr+1i′(r+1,j)j. Since objects with a valuation
more than vri′(r,j)j at the end of rth round must be in I1 ∪T r
j \I2, there are at most kj − |Or+1j | such objects.
Therefore, for any i∈Or+1j , vr+1
i′(r+1,j)j ≤ vri′(r,j)j ≤ vr+1
ij . Further, the object is not allocated to more than one
location unless ur+1i = 0. In other words, ε−CS conditions are satisfied at the end of round r.
For i∈ T rj , the bid by cache j is max{0, vr
i′(r,j)j − gij} ≤max{0, vrij− gij}= max{0, ur
i − ε}. There are three
possibilities. First, the price of an object is bid down by ε. Since prices cannot reduce forever, the number
of such rounds is finite. Second, there is a possibility that the price of at least one of the objects is reduced
to zero. Since there are finitely many objects, the number of such rounds is also finite. The third case is
where all the objects in T rj for all caches j have a price of 0. In this case, the auction terminates since no
uncommitted spots remain.
We have shown that the final allocation obeys ε−CS conditions and has no uncommitted spots. If the
final allocation is not optimal, there exists a path/cycle that only uses arcs with a non-zero residual capacity
and is such that the resulting change in the objective is negative (see Theorem 3.5 in Ahuja et al. 1993).
This is because the difference between any two solutions can be expressed as a sum of the flows on such
paths/cycles. It can be easily verified that ui = uri for i = 1, . . . , n and vj = vr
i′(r,j)j for j = 1, . . . ,m is a dual
feasible solution (see DD). Then, each arc (i, j) where i is not held by j has a reduced cost of at least −ε since
for i �∈Orj , vr
i′(r,j)j − crij − ur
i ≥ vri′(r,j)j − vr
ij − ε≥−ε. Each arc with i ∈Orj has a non-negative reduced cost
since gij + ui− vri′(r,j)j ≥ vr
ij − vri′(r,j) ≥ 0. Any arc of the form (i,D) has a non-negative reduced cost. If the
4 Other starting prices are possible as long as they satisfy the ε−CS conditions described later.
10
path ends at an object node i, then ui = 0. If the path ends at the dummy node, vD = 0. If the starting node
is an object or the dummy node, the corresponding dual is non-negative or zero, respectively. Therefore, the
change in the objective (see Property 9.2 in Ahuja et al. 1993) is greater than or equal to −ε∑m
j=1 kj . If gij
and βi are integer (or appropriately scaled, if rational) and ε < 1∑mj=1 kj
, then the sum of the arc-costs must
be zero or larger.
A.9. Symmetric Caches and Pricing
Here, we interpret the prices in terms of the benefits dit as defined in Section 3.1 and used in Algorithm
SCGS. Let gi = (cn− cl)αi here. If (u∗, v∗) is the optimal solution to (DD), then v∗j = v∗
j′ = q for all j and j′,
by the symmetry of (DD) with respect to j. Otherwise, each component of v∗ is not individually maximized.
Given (x∗, y∗), an optimal solution to (SL), we classify the objects in the optimal allocation as follows:
Let A0 be the set of objects not held by any cache, A1 be the set of objects held uniquely by a single cache,
A2 be the objects held by at least two caches but not all, and A3 be the set of objects held by all caches.
Now, consider the following cases:
1. i∈A0. In this case, u∗i = βi, q ≥ gi + βi, and max{0, gi + u∗
i − q}= 0.
2. i∈A1. Then, q≥ gi + u∗i for cache j, whereas q ≤ gi + u∗
i for j′. Therefore, q = gi + u∗i and max{0, gi +
u∗i − q}= 0.
3. i∈A2. Then, u∗i = 0 and, therefore, as above, q = gi.
4. i∈A3. Then, u∗i = 0 and q ≤ gi and max{0, gi + u∗
i − q}= gi− q.
The objective of (DD) reduces to:
∑i∈A0
βi +∑i∈A1
(q− gi)−mkq−m∑i∈A3
(gi− q) =∑i∈A0
βi−∑i∈A1
gi−m∑i∈A3
gi−(mk− |A1| −m|A3|
)q.
Notice that the first three terms are constants. Further, for all i ∈ A0, q ≥ gi + βi; for all i ∈ A1, gi ≤ q ≤
gi +βi; for all i∈A2, gi = q; and for all i∈A3, q≤ gi. Evidently, |A1|+m|A3| ≤mk. When, |A1|+m|A3|<
mk, A2 �= ∅, and, therefore, the feasible set of q is a singleton. Actually, q equals gi for any i ∈ A2. In
the remaining case, |A1|+ m|A3| = mk and the objective is independent of q. Then, by maximality, q =
min{mini∈A1
(gi + βi
),mini∈A3 gi
}. Clearly, for all objects, gi + βi equals di1 and, for t > 1, gi is dit. Also,
dit ≥ q if indx{it ∈G}< mk and, in particular, q is the valuation of the mkth element in G. Then, u∗i = q−gi
if i∈A1 and u∗i = 0 otherwise. The prices and valuations can be computed in O(
min(mk,n))
time. Since the
11
constructed (u∗, v∗) and the solution from Algorithm SCGS obey complementary slackness, this provides an
alternate proof that the allocation of Section 3.1 is a socially optimal one.
What prices generate the above revenues? If p∗i = u∗
i
mαiis the price for i, then, for the cache that holds i,
the revenue from the other caches and the savings from not having to pay for object i, adds up to u∗i . As a
result, the cost to every cache can be calculated as:∑n
i=1(cn + p∗i )αi−
∑i∈A3
gi− (k− |A3|)q. Since the cost
is the same for every cache, this pricing arrangement is fair.
A.10. Arbitrary Object Sizes and NP-Hardness.
Consider an instance of the Bin Packing Problem (BPP), which is known to be strongly NP-Complete (Garey
and Johnson 1979) and is defined as follows: Let M be a set of m bins and N a set of n items. Each bin has
a capacity k and each item has a size si. Is it possible to pack all the items in the bins?
Proposition A.6. The social welfare caching problem is strongly NP-Hard even if all the caches have the
same capacity and αij, ∀ i∈N, j ∈M , is a fixed constant greater than zero.
Proof. We prove the claim by reducing an instance of BPP to an instance of the social welfare problem,
where all caches have the same capacity and the demands are positive. For each bin, we create a cache, and
for each item, we create an object. The capacity of each cache is k, and the size of object i is si. We define
cl = 0, cn = 0, and co = 1. If O is the set of objects cached by at least one cache in a solution of the social
welfare problem, then the total cost incurred is due only to the objects brought from the origin server, which
is∑
i∈N\O
∑m
j=1 αij . Therefore, the optimal solution to the social welfare caching problem has a value of 0 if
and only if BPP has a solution.
References
Garey, M. R., D. S. Johnson. 1979. Computers and intractability. A guide to the theory of NP-completeness..
A Series of Books in the mathematical Sciences. San Francisco: W. H. Freeman and Company.
Horn, R. A., C. R. Johnson. 1990. Matrix Analysis . Cambridge University Press, Cambridge, UK.