All articles published by MDPI are made immediately available worldwide under an open access license. No special
permission is required to reuse all or part of the article published by MDPI, including figures and tables. For
articles published under an open access Creative Common CC BY license, any part of the article may be reused without
permission provided that the original article is clearly cited. For more information, please refer to
Feature papers represent the most advanced research with significant potential for high impact in the field. A Feature
Paper should be a substantial original Article that involves several techniques or approaches, provides an outlook for
future research directions and describes possible research applications.
Feature papers are submitted upon individual invitation or recommendation by the scientific editors and must receive
positive feedback from the reviewers.
Editor’s Choice articles are based on recommendations by the scientific editors of MDPI journals from around the world.
Editors select a small number of articles recently published in the journal that they believe will be particularly
interesting to readers, or important in the respective research area. The aim is to provide a snapshot of some of the
most exciting work published in the various research areas of the journal.
The Dynamic Facility Location problem is a generalization of the classic Facility Location problem, in which the distance metric between clients and facilities changes over time. Such metrics that develop as a function of time are usually called “evolving metrics”, thus Dynamic Facility Location can be alternatively interpreted as a Facility Location problem in evolving metrics. The objective in this time-dependent variant is to balance the trade-off between optimizing the classic objective function and the stability of the solution, which is modeled by charging a switching cost when a client’s assignment changes from one facility to another. In this paper, we study the online variant of Dynamic Facility Location. We present a randomized -competitive algorithm, where m is the number of facilities and n is the number of clients. In the first step, our algorithm produces a fractional solution, in each timestep, to the objective of Dynamic Facility Location involving a regularization function. This step is an adaptation of the generic algorithm proposed by Buchbinder et al. in their work “Competitive Analysis via Regularization.” Then, our algorithm rounds the fractional solution of this timestep to an integral one with the use of exponential clocks. We complement our result by proving a lower bound of for deterministic algorithms and lower bound of for randomized algorithms. To the best of our knowledge, these are the first results for the online variant of the Dynamic Facility Location problem.
The Facility Location problem is an extensively studied combinatorial optimization problem, which has many practical applications. In this problem, we are given a single metric on a set of clients and facilities, where each facility is associated with an opening cost. The goal is to find a set of facility locations that minimize the opening cost for all facilities plus the connection cost for all clients, where a client’s connection cost is its distance to the nearest facility.
In many natural location and network design settings, client locations are not known in advance. Motivated by this fact, Ref.  introduced online facility location problems, where clients arrive one-by-one and must be irrevocably assigned to a facility upon arrival. In practical settings related to online data clustering, new data points arrive and the decision of clustering some data points together should not be regarded as irrevocable .
Understanding the dynamics of temporally evolving social or infrastructure networks has been the central question in many applied areas recently. Eisenstat et al.  introduced the Dynamic Facility Location problem, which models the temporal aspects of such networks. In this time-dependent variant of Facility Location problem, clients or facilities may change their location over time and the goal is to achieve the best trade-off between the optimal connections of clients to facilities and the stability of solutions between consecutive timesteps. The temporal aspect of the Dynamic Facility Location problem is modeled by T metrics given on the same set of clients and facilities, each representing the metric at time step . This is the key difference between the classic Facility Location problem, which is solved in a fixed metric space M that does not develop over time. Therefore, the Dynamic Facility Location is a Facility Location problem in an evolving metric , which changes at each timestep .
In this paper, we study the online variant of the Dynamic Facility Location problem, denoted as ODFL, where the metrics on clients and facilities are revealed one by one at each round. The online algorithm must make its decision before the metric of the next round is revealed and without knowing the total number of rounds. This is the key difference between ODFL and the offline variant of Dynamic Facility Location in , where the T metrics are known beforehand. Therefore, ODFL attempts to capture realistic settings, where the input data are revealed piece-by-piece and the algorithm must make its decision before upcoming input pieces are revealed. The online aspect of the problem poses new challenges and precludes many algorithmic techniques used to deal with offline problems. Next, we give a formal definition of ODFL.
Model. In Online Dynamic Facility Location, we are given a set of facilities , a set of clients C, , a switching cost g and a facility opening cost f. At each round , a new metric between clients and facilities is revealed with the form of a dimensional vector , which has entries corresponding to distances over . We denote by the distance between client j and facility i at time t. At each round t, the goal is to find a subset of open facilities and an assignment of clients to open facilities so as to minimize the objective:
where is the indicator function of proposition p. The assignment of round t is chosen without knowing the distance vectors of upcoming rounds. The objective function is the sum of the hourly opening costs for each open facility plus the connection costs of each client plus the switching costs (g per change of facility per client). We note that any solution pays switching cost at round , since it switches to an initial assignment of the clients to facilities.
We measure the performance of our online algorithm using the notion of the competitive ratio. Given a request sequence , let denote the cost paid by an online algorithm on and let denote the cost paid on by an optimal offline algorithm, which knows in advance. The online algorithm is c-competitive if there exists a constant a such that:
for all request sequences . The factor c is called the competitive ratio.
Related work. The offline and online variants of Facility Location have been studied extensively in the literature. For the offline Facility Location problem, the approximability is  for the non-metric case while, for the metric case, the best lower bound is , and the best algorithm has an approximation ratio . Online Facility Location is known to have a competitive ratio of in the adversarial case for both deterministic and randomized algorithms  and a constant competitive ratio if the clients are drawn from a known distribution .
The study of Dynamic Facility Location so far concerns the offline case where the changes between distances of clients and facilities are known in advance. Eisenstat et al.  showed an upper bound of for the most interesting variant of Dynamic Facility Location with hourly facility costs, where facilities can be closed and are paid for all rounds in which they remain open. This result was later improved by , which gave an -approximation algorithm.
In , they provided a framework for designing competitive online algorithms using regularization, which is a widely used technique in online learning. They designed a -competitive deterministic algorithm for generating a fractional solution that satisfies a time-varying set of constraints, where m is the number of variables. Then, they provided an -competitive randomized algorithm for the online set cover problem with a service cost, where m is the number of sets and n is the number of elements. The first step of our online algorithm, which provides a -competitive fractional solution, where m is the number of facilities, is inspired by the approach of  and a large part of the analysis follows their proof. In the second step of our online algorithm, we show a rounding scheme that works favorably with the fractional solution to obtain a non-trivial additive competitive ratio of , where n is the number clients. To the best of knowledge, this is the first upper bound for ODFL.
In this work, we study the competitive ratio of ODFL. We start by proving lower bounds for deterministic and randomized algorithms for ODFL. Our first result is the following.
The competitive ratio of any deterministic online algorithm isand the competitive ratio of any randomized online algorithm against the oblivious adversary isfor the Online Dynamic Facility Location problem, where m is the number of facilities.
Our second result is a randomized algorithm, which is -competitive. In order to achieve this, we express the offline Dynamic Facility Location problem as a linear program P (Figure 1a). Then, we apply the following two algorithms at each round t.
Algorithm 1 (Regularization algorithm): It solves a linear program minimizing the objective function of P modified to include a smooth convex regularization term and obtains the fractional solution .
Algorithm 2 (Rounding algorithm): It rounds the fractional solution of Algorithm 1 to an integral solution using competing exponential clocks.
Algorithm 1 The regularization algorithm
Parameters: , Initialization: Set and . At each round : Let be the distance cost vector and let S be the set of feasible solutions. Solve the following linear program to obtain the fractional solution :
Algorithm 2 The rounding algorithm
1: Initialization: Choose i.i.d. random variables . 2: At each round t: 3: Let be the fractional value of round t obtained by Algorithm 1. 4: For each client j, open and connect j to i.
Algorithm 1 solves online a linear program to produce a fractional solution at each round t involving the current distance vector . This algorithm is essentially the general algorithm presented in , which we adapt to ODFL. The performance of the general regularization algorithm is proved by Theorem 1.1 in  for the case of time varying covering constraints. Although we follow the same steps to prove the existence of a -competitive fractional solution for ODFL, where m is the number of facilities, we must also address the presence of both covering and precedence constraints in ODFL.
Algorithm 2 is the randomized procedure that rounds the fractional solution provided from Algorithm 1 to an integral solution. Our contribution here is that we use an appropriate rounding which works favorably with Algorithm 1 so as to produce a solution, which is -competitive for ODFL. The rounding algorithm makes use of competing exponential clocks, which have been applied in many similar problems like the Dynamic Facility Location problem  and the Online Set Cover with a Service Cost problem .
There is a randomized algorithm which is-competitive for the Online Dynamic Facility Location problem, where m denotes the number of facility locations and n denotes the number of clients.
Organization. In Section 3, we present lower bounds on the competitive ratio of deterministic and randomized algorithms for ODFL. Then, we present Algorithm 1 in Section 4 and Algorithm 2 in Section 5 and prove their guarantees in the respective sections.
3. Lower Bounds
In this section, we prove lower bounds of deterministic and randomized algorithms for ODFL. In both cases, the metric space is a star graph with a client lying on the center of the star for all rounds.
The core idea of the proofs is to force the online algorithm to pay the switching cost at each round. By carefully selecting the parameters of ODFL, we can prove that any deterministic online algorithm is -competitive. For the randomized lower bound, we use Yao’s principle (see examples in Chapter 8 in ). Specifically, we choose a randomized instance such that the expected performance of any deterministic algorithm against the optimal offline algorithm is . By Yao’s principle, any randomized algorithm has the same lower bound.
Let OPT denote the optimal cost and ALG denote the cost of an online algorithm. The instance consists of a star graph with m edges and the number of rounds is . Facilities can only be opened in the leaves (a total of m leaves), and there is one client () sitting at the center of a graph for all rounds. The distance of every leaf j to the center is initially . Then, the adversary has the following simple strategy at each round :
For every leaf j, such that the online algorithm connects the client to the facility in j, becomes arbitrarily large. At round T, the distances remain the same as in the previous round.
Observe that there is only one leaf with distance d from the center of a star for all rounds. The optimal offline solution just opens a facility at this leaf and connects the client to it for all rounds, thus paying . On the other side, any competitive online algorithm will prefer to open a new facility at distance d and connect the client to this facility at the start of each round instead of paying the large distance. Therefore, the cost incurred by any online algorithm is at least . By setting , we have that
Turning to the randomized case, the instance consists of the same metric as the deterministic case and the only difference is that we will use randomized adversarial requests. Then, by showing that any deterministic algorithm has a competitive ratio of at least and by Yao’s principle, we will prove the lower bound for randomized algorithms.
Now, the adversary chooses uniformly at random an edge e, which has length d (has not yet become arbitrarily large) at each round and makes its length arbitrarily large. At round T, where only one leaf has distance d, the distances remain the same as in the previous round. Again, the optimal solution uses the leaf in distance d at all rounds and pays . However, the expected switching cost of any competitive algorithm is:
since at each round t the edge that the algorithm uses becomes arbitrarily large with probability . By setting ,
This concludes this section with the lower bounds. In the following sections, we present a randomized algorithm for the ODFL problem with a nearly matching bound of .
4. The Regularization Algorithm
In this section, we show that the regularization algorithm of  can be applied to ODFL and that it produces a fractional solution at each round, which is -competitive, where m is the number of facility locations. We will prove the following theorem:
The Regularization Algorithm produces an-competitive fractional solution for the Online Dynamic Facility Location problem, where m is the number of facilities.
Before proceeding to the details of Algorithm 1, we first express the offline Dynamic Facility Location as a linear program, denoted as P (Figure 1a). Algorithm 1 will solve a linear program at each round, which will be constructed from P combined with a regularization function. Finally, we will show that the fractional solution of is -competitive with respect to the solution of the dual program D (Figure 1b) of P, which serves as lower bound on the optimal offline solution.
Now, we express offline Dynamic Facility Location as an integer program, which will be relaxed to obtain the linear program P. Recall that are the number of rounds, clients, and facility locations, respectively. The first term of the objective function is the total facility opening cost, where f is the cost to open a facility. The second term is the total connection cost, where is the distance between facility i and client j in round t, and the third term is the total switching cost, where each change of a client’s connection to a facility costs g.
We use the decision variables , and , where ; if facility i is open at round t and otherwise, if client j is connected to facility i at round t and , otherwise, if client j was connected to facility i at round t but not connected to the same facility i at round and , otherwise. The value of the variable is imposed from the third constraint, which expresses the switching cost. The first constraint () ensures that, whenever a client j is connected to a facility i, the facility i is open. The second constraint () guarantees that every client is connected to a facility. Finally, relaxing the decision variables to take non-negative real values, we obtain the LP of Figure 1a, denoted as P.
Next, we are ready to present Algorithm 1. The algorithm is given at each round t a distance vector containing the distances between clients and facilities. Then, Algorithm 1 finds the minimizer of the linear program at each round t, which has two differences from P. The first one is that the last term of the objective function in P (the switching cost) is substituted by the regularization function in . The second is that the constraint relative to the switching cost in P is omitted in . We note that the regularized objective function includes both the previous solution as well as the current cost vector. Thus, the solution in each round is determined greedily and independently of rounds prior to .
To analyze the performance of Algorithm 1, we will need to construct a lower bound on the optimal offline solution. Therefore, we derive the dual D of P (Figure 1b), which has the following variables (corresponding to the primal constraints on the left):
→ for all , ,
→ for all ,
→ for all , ,
We will prove Theorem 3 by showing that the set of dual variables of the solutions that returns is a feasible solution for D within a factor of of the optimal offline solution, where is a small constant. Specifically, we will use the KKT optimality conditions of (the regularized LP) in each round. The constraints define dual variables, which will be plugged in the formulation of the dual D in Figure 1b. This way, we will construct a dual solution to the original online problem, which will serve as a lower bound on the optimal offline solution. Ref.  mentions that their technique can be generalized to facility location problems, without providing any further technical details. In the next lemmas, we verify their claim, by adjusting their approach and proof techniques to ODFL. Recall that the constraint is omitted in . In order to define a feasible solution for D, we introduce the variable corresponding to this constraint and we let be the optimal dual variables of corresponding to the precedence and covering constraints, respectively.
The set of optimal solutions for each round t of the dual LP D* of P*, which satisfy the KKT conditions for an appropriate, consist of a feasible solution for D.
Let be the optimal solution of P* at round t. Set the variables of D at time t to be:
To prove that the solution above is feasible for D, we prove that it satisfies its constraints one by one. This is achieved using the following KKT conditions that hold for P* and its dual:
The first group of constraints of the dual D (Figure 1b) () follows easily from KKT condition (3). The same holds for the last two groups of constraints ( and ) due to KKT conditions (1) and (2). Furthermore, by (4) and the construction of , we have that:
The above inequalities prove that the second, third, and fourth group of constraints of D also hold, thus completing the proof of the lemma. □
We are now ready to prove Theorem 3, by showing that the dual we constructed can pay for the facility, connection, and switching cost of Algorithm 1. Since we bound together the facility cost and connection cost, we will simply refer to them as the service cost. Throughout the proofs, we will use the following relations:
Equalities (5)–(8) are the KKT conditions of and its dual and the remaining two inequalities are standard logarithmic inequalities. Theorem 3 will follow from the next two lemmas. The analysis is similar to that of Theorem 1.1 in  adapted to the objective of ODFL and also dealing with the presence of precedence constraints.
The switching cost M of Algorithm 1 is at most times the cost of the dual feasible solution of Lemma 1.
Let be the switching cost of Algorithm 1 at round t. The summation below is taken over increasing values of connection variables, i.e., , since decreasing values only decrease the fractional switching cost:
This concludes the proof of the lemma. □
The total service cost S of Algorithm 1 is less than the cost of the dual feasible solution of Lemma 1:
Notice that that the two terms in the bracket of the right-hand side of the inequality above cancel each other out, since:
Therefore, it holds that
We can now easily prove the performance of Algorithm 1 stated in Theorem 3.
of Theorem 3. Let OPT(D) and OPT(P) denote the optimal solutions of the D and P, respectively. By Lemmas 2 and 3, the total cost of Algorithm 1 is:
The proof of Theorem 3 concludes this section.
5. The Rounding Algorithm
In this section, we present Algorithm 2, which makes use of the exponential distribution to round the fractional solution to an integral solution at each round. The analysis shows that the fractional solution grows up to a factor logarithmic in n regarding the facility cost and up to constant factors regarding the switching and connection cost. Before proceeding to the details of Algorithm 2, we give the definition of an exponential random variable and some of their properties.
A random variable X is distributed according to the exponential distribution with rate λ, denoted as , if it has density for every , and otherwise. We will use the following properties of exponential random variables:
If and , then .
Let be independent random variables with :
If and are independent, then
The rounding algorithm samples independently a total of (one for each client-facility connection) random variables from the exponential distribution with rate at the beginning of its execution, which will be used throughout all rounds. Then, at each round t, it chooses for each client j the connection minimizing the ratio , where is the fractional variable of this connection obtained by Algorithm 1. Notice that, by the properties of Definition 1, the ratio is also an exponential random variable. This technique is referred to as competing exponential clocks, since a random variable wins the competition if it has the smallest value among all others (minimizes the ratio in our case).
The high level idea of the analysis is that connection and switching cost of the rounded solution add only constant factors to the cost of the connection and switching cost of the fractional solution at each round t. The reason is that they favor connections to facilities that are dependent on the increase/decrease of the fractional variables . This fact combined with the properties of the exponential distribution leads to a rounding of the right connections indicated by the fractional solution. On the other side, this leads to more open facilities, since we prove that the rounding adds a factor logarithmic in n to the cost of the fractional solution.
Next, we will analyze the performance of Algorithm 2 by bounding separately the facility, connection, and switching cost. We will simply calculate the probabilities of opening any facility, connecting a client to a facility and changing a connection.
Facility cost. We start with the facility cost of the rounding algorithm, which is -competitive with respect to the facility cost of the fractional solution.
Let denote the event that for some client j and let be chosen later. The probability of equals:
By choosing , we have the result. □
Connection cost. Next, we show that the connection cost of the rounding algorithm is -competitive with the connection cost of the fractional solution. Again, let be chosen later.
Similar arguments to the previous proof show that the probability to choose connection is:
By choosing a sufficiently small a (for example ), we have the result. □
Switching cost. Finally, we show that every step that incurs a fractional switching cost of d in a connection variable incurs an expected increase of at most in the randomized solution. Thus, the expected number of new connections is .
We break down the total movement from time to t in the fractional solution into intermediate steps, on each of which only the value of exactly one is changed. We take first all the ’s whose value increases and then all the ’s whose value decreases, thus managing to preserve a feasible solution in all the intermediate steps. This way, the total switching cost from time to time t of the fractional solution does not change while the integral switching cost could only increase due to possible changes in the intermediate steps. First, we will prove the bound in the case the connection variable decreases: . Let , where for . When the value of decreases, the value of increases. Therefore, connection cannot be chosen a time t if is not chosen at time . However, due to the increase of , another connection could turn minimal that had not been chosen in the previous time step. This is the only case, when a switching cost is incurred. The probability of this event is bounded by:
This expression is maximized when , and therefore is less than
Now, we turn to the case where . When increases, the ratio decreases. Therefore, if facility i was chosen in the previous step, it will be chosen again in this step, thus not incurring switching cost. If facility was not chosen in the previous step, it will be chosen in this step with probability
which is no more than , following the exact same analysis with the case of the decreasing connection variables. □
Finally, it is easy to provide the proof of Theorem 2, which concludes this section.
of Theorem 2. First, notice that, by Lemma 3, the fractional solution of Algorithm 1 is optimal with respect to the facility and connection cost. Therefore, Algorithm 2 will round the solution to an integral one only losing a factor of in the facility cost and a factor in the connection cost, thus being competitive with the optimal offline solution. Regarding the switching cost, by Lemma 2, the fractional solution is competitive with the fractional solution. The cost of this solution will only increase by a factor of after the randomized rounding, thus proving the result. □
We studied the online variant of the Dynamic Facility Location problem, where we proved lower bounds for deterministic and randomized algorithms and an almost matching upper bound for randomized algorithms.
An interesting future direction is to determine the competitive ratio for ODFL in the randomized case and close the gap between the lower bound and the upper bound. Another interesting direction is to study the ODFL problem in the case where the vector of positions between clients and facilities is drawn from a known distribution. Finally, it would be interesting to consider the online variant of other dynamic problems like the Dynamic Sum-Radii Clustering problem.
Conceptualization, D.F., L.K., and L.Z.; methodology, D.F., L.K., and L.Z.; validation, D.F., L.K., and L.Z.; formal analysis, D.F., L.K., and L.Z.; investigation, D.F., L.K., and L.Z.; writing–original draft preparation, D.F., L.K., and L.Z.; writing–review and editing, D.F., L.K., and L.Z.; supervision, D.F. All authors have read and agreed to the published version of the manuscript.
Dimitris Fotakis was partially supported by the Hellenic Foundation for Research and Innovation (H.F.R.I.), project BALSAM, HFRI-FM17-1424. Loukas Kavouras is partially supported by a scholarship from the State Scholarships Foundation, granted by the action “Scholarships Grant Programme for second cycle graduate studies”, which is co-financed by Greece and the European Union (European Social Fund—ESF) through the Operational Programme “Human Resources Development, Education and Lifelong Learning 2014–2020”.
Conflicts of Interest
The authors declare no conflict of interest.
Meyerson, A. Online Facility Location. In Proceedings of the 42nd Annual Symposium on Foundations of Computer Science (FOCS), Las Vegas, NV, USA, 14–17 October 2001; pp. 426–431. [Google Scholar] [CrossRef][Green Version]
Eisenstat, D.; Mathieu, C.; Schabanel, N. Facility Location in Evolving Metrics. In Automata, Languages, and Programming, Proceedings of the 41st International Colloquium (ICALP 2014), Copenhagen, Denmark, 8–11 July 2014; Part II; Esparza, J., Fraigniaud, P., Husfeldt, T., Koutsoupias, E., Eds.; Springer: Berlin/Heidelberg, Germany, 2014. [Google Scholar]
Hochbaum, D.S. Heuristics for the fixed cost median problem. Math. Program.1982, 22, 148–162. [Google Scholar] [CrossRef]
Guha, S.; Khuller, S. Greedy Strikes Back: Improved Facility Location Algorithms. J. Algorithms1999, 31, 228–248. [Google Scholar] [CrossRef]
Li, S. A 1.488 approximation algorithm for the uncapacitated facility location problem. Inf. Comput.2013, 222, 45–58. [Google Scholar] [CrossRef]
Anagnostopoulos, A.; Bent, R.; Upfal, E.; Hentenryck, P.V. A simple and deterministic competitive algorithm for online facility location. Inf. Comput.2004, 194, 175–202. [Google Scholar] [CrossRef][Green Version]
An, H.; Norouzi-Fard, A.; Svensson, O. Dynamic Facility Location via Exponential Clocks. ACM Trans. Algorithms2017, 13, 21:1–21:20. [Google Scholar] [CrossRef]
Buchbinder, N.; Chen, S.; Naor, J. Competitive Analysis via Regularization. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2014, Portland, OR, USA, 5–7 January 2014; pp. 436–444. [Google Scholar]
Borodin, A.; El-Yaniv, R. Online Computation and Competitive Analysis; Cambridge University Press: Cambridge, UK, 1998. [Google Scholar]
(a) The linear program P for dffline Dynamic Facility Location. (b) The dual D of the linear program P.
(a) The linear program P for dffline Dynamic Facility Location. (b) The dual D of the linear program P.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely
those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or
the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas,
methods, instructions or products referred to in the content.