Imagine the following particular inventory-routing problem. A set of automatic vendor machines are spread over a country or a city. They have a certain turnover time: the number of days in which a full machine will be sold out. Replenishment is done by vehicles. Let us assume that turnover times are machine dependent but not time dependent, and that it is highly undesirable to have an empty machine. However, the holding costs of the machine are negligible, so that we will always fill the machine to capacity. There is nothing against replenishing a machine before it has become empty, but then the next replenishment will due earlier as well. That is, the deadline of the next replenishment is always within the turnover time after the last replenishment. Equivalently, in any consecutive number of days equal to the turnover time, at least one replenishment has to take place. Replenishing a machine earlier to combine it with the replenishment of another machine that is due earlier may lead to cost savings. The feature that makes this problem so special w.r.t. existing literature, is that it can be compactly modeled by only specifying for every machine its location and the turnover time. The feature is very natural but has hardly been studied in the existing literature. There are intriguing basic open complexity questions, and some highly non-trivial results.
The motivation for studying this problem comes linea recta from a business project for the replenishment of ATMs in the Netherlands, in which some of the co-authors are involved. The replenishment of the ATMs of all the large banks in the Netherlands has been outsourced to a single company: Geld Service Nederland. Of course the real-life ATM replenishment problem is not as stylized as described above; the turnover time is not strictly the same over time but subject to variability, there are restrictions on the routes for the vehicles, etc. But the feature that is least understood in the ATM-problem is exactly the problem of how to deal with the trade-off between replenishing an ATM earlier than its due date leading to a higher frequency of replenishments and the savings on vehicle routing costs.
Formally, an instance of the problem that we study in this paper, which we baptize the replenishment problem with fixed turnover times (rftt), consists of a pair , where is a weighted graph with a designated depot vertex and weights on the edges , and turnover times , indicating that should be visited at least once in every interval of days.
A solution consists, for each day , of a tour in starting in and returning to the depot and visiting a subset of the vertices . It is feasible if , and . We will focus on solutions that repeat themselves after a finite amount of time, that is, in which for some , and all . Since all turnover times are finite, this is no real restriction.
We consider two versions of rftt. In the first version, called min-avg, the goal is to find a feasible solution that minimizes the average tour length. In the min-max problem, we want to find a feasible solution that minimizes the maximum tour length over all days.
We emphasize that the particular feature of this model, that jobs or visits to clients recur and need to be done within each job-specific consecutive time interval occurs naturally in many problem settings. It allows any job of a recurring task to be done before its deadline, but then the next job of the task comes earlier and hence its deadline. This is a feature that, despite its natural applicability, has hardly been studied in the literature from a theoretical point of view.
As mentioned before, our problem can be seen as a special case of the Inventory Routing Problem (IRP) . Here, clients (vertices) have their own storage with a certain capacity and for each day a demand is specified. The clients pay holding cost over their inventory. However, omitting inventory cost, we can interpret our problem as such an inventory routing problem in which the demand at any given location is the same every day, leading to a very small input description of our problem consisting only of a location and a turnover time (storage capacity divided by daily demand), which makes it incomparable to the inventory routing problem from a complexity point of view. Indeed it is unclear if the decision version of our problem is in NP or in co-NP.
Another closely related problem is the Periodic Latency Problem , which features the recurring visits requirement of rftt. We are given recurrence length for each client and travel distances between clients. Client is considered served if it is visited every time units. The server does not return to the depot at the end of each time unit (e.g. day), but keeps moving continuously between clients at uniform speed. Another difference between Periodic Latency Problem and rftt is the objective function. Coene et. al.  study two versions of the problem: one that maximizes the number of served clients by one server, and one that minimizes the number of servers needed to serve all clients. They resolve the complexity of these problems on lines, circles, stars, trees, and general metrics.
A problem that does share the compact input size and is in fact a very special case of our problem is known under the guise of Pinwheel Scheduling. It has been introduced to model the scheduling of a ground station to receive information from a set of satellites without data loss. In terms of our problem no more than one vertex can be replenished per day and all distances to the depot are the same; the interesting question here is if there exists a feasible schedule for replenishing the vertices. Formally, a set of jobs with periods is given, and the question is whether there exists a schedule such that , and .
Pinwheel Scheduling was introduced by Holte et al. , who showed that it is contained in PSPACE. The problem is in NP if the schedule is restricted to one in which for each job the time between two consecutive executions remains constant throughout the schedule. In particular this holds for instances with density . They also observed that the problem is easily solvable when and the periods are harmonic, i.e. is a divisor of or vice versa for all and . As a corollary, every instance with is feasible.
Chan and Chin  improved the latter result by giving an algorithm that produces a feasible schedule for Pinwheel Scheduling whenever . In , they improved this factor to . Later, Fishburn and Lagarias  showed that every instance with has a feasible schedule. All these papers work towards the conjecture that there is a feasible schedule if . That this bound is tight can be seen by the instance with , and , with large. This instance cannot be scheduled, but has a density of .
The complexity of Pinwheel Scheduling has been open since it was introduced. It was only recently shown by Jacobs and Longo  that there is no pseudopolynomial time algorithm solving the problem unless SAT has an exact algorithm running in expected time , implying for example that the randomized exponential time hypothesis fails to hold [5, 10]. Since the latter is unlikely, one could conclude that Pinwheel Scheduling is not solvable in pseudopolynomial time. It remains open whether the problem is PSPACE-complete.
Similar to Pinwheel Scheduling, the -server Periodic Maintenance Problem [21, 2, 11] has jobs, each with a specified periodicity and a processing time. Each server may serve at most one job per time unit. However, job is required to be served exactly every days apart rather than within every days. The case for all is analogous to Pinwheel Scheduling, except for the exact periodicity constraint. For any , Mok et. al.  have shown it is NP-complete in the strong sense. For the special case when are multiples of each other or when there are at most 2 different periodicities, they have shown it is in P. It was shown that even in the case of a single server and for all the problem remains coNP-hard .
d Other related problems with a compact input representation include real-time scheduling of sporadic tasks [1, 4], where we are given a set of recurrent tasks. On a single machine, EDF (Earliest Deadline First) is optimal. However, we remark that the complexity of deciding whether a given set of tasks is feasible has been open for a long time and only recently proved showing that it is coNP-hard to decide whether a task system is feasible on a single processor even if the utilization is bounded .
Another related problem is the Bamboo Garden Trimming Problem introduced by Gasieniec et. al. . There are bamboos, each having a given growth rate, which may be viewed as inducing a periodicity. On each day, a robot may trim at most one bamboo back to height . The goal is to minimize the maximum height of the bamboos. Gasieniec et. al. provide a -approximation for the general case and a -approximation for balanced growth rates.
We investigate the computational complexity of both the min-max and the min-avg version of rftt. Mostly we will relate their complexity to the complexity of Pinwheel Scheduling. Some interesting inapproximability results follow from this relation. After that, we will start with some special cases. In Section 3, we give our most remarkable result, a constant factor approximation for min-max on a tree, next to a less remarkable constant approximation for the min-avg version on the tree. In the same section, we show for min-avg that the problem can be solved to optimality in pseudopolynomial time on line metrics. Finally, in Section 4, we present logarithmic factor approximations for both problem versions on general metrics.
In this section, we investigate the computational complexity for both objectives. Since our problem requires finding a shortest tour visiting some subset of vertices for every day, it is at least as hard as the Traveling Salesman Problem (tsp). However it is also interesting to note that the problems are at least as hard as Pinwheel Scheduling as well. For the min-max objective there is a direct reduction showing that a factor 2 approximation is at least as hard as Pinwheel Scheduling: construct an unweighted star with the depot at the center and each leaf corresponding to a job in the pinwheel instance. This instance has value 2 only if there exists a pinwheel schedule and at least 4 otherwise.
For the min-avg rftt the reduction is a bit more involved, and given in the appendix.
On series-parallel graphs, min-avg rftt is at least as hard as Pinwheel scheduling.
We note that this hardness result is incomparable to the tsp reduction. Pinwheel is neither known to be NP-hard nor in NP, although it is conjectured to be PSPACE-complete.
Lastly, as Theorem 2.2 shows, the min-max rftt remains hard even on star graphs (where TSP is trivial). A reduction can be found in the appendix.
min-max rftt is NP-hard on star graphs.
3 Approximation on trees
In this section we give a 2-approximation for min-avg and a 6-approximation for min-max on trees.
We start out with a simplifying result, which will also be of use in the next sections. The proof of Lemma 1, which is not hard to derive, can be found in the appendix.
Given an instance of rftt, let be found by rounding every turnover time in down to a power of . Then for both min-avg and min-max objectives.
In the remainder we assume w.l.o.g. that is rooted at and that turnover times are increasing on any path from the depot to a leaf node in . Furthermore, for an edge in we define to be the set of vertices that are a descendant of . We also need the following definition.
Definition 1 (tt-weight of an edge)
For any edge in we define:
We call this quantity the tt-weight (turnover time-weight) of .
This definition allows us to express the lowerbound in Lemma 2.
Lemma 2 (tt-weighted tree)
For an instance of the rftt on trees it holds that the average tour length is at least:
This follows immediately from the fact that lower bounds the number of times edge must be traversed on average in any feasible solution.
Since the maximum tour length is at least the average tour length, Lemma 2 also provides a lower bound for the min-max objective.
An approximation for min-avg rftt is thus found by rounding all turnover times to powers of 2 and then visit each client on every day that is a multiple of . Since in that case the lower bound of Lemma 2 is exactly attained on the rounded instance, Lemma 1 implies the following theorem.
There is a 2-approximation for min-avg rftt on trees.
We will now show that we can achieve a -approximation for min-max rftt on trees by providing a -approximation algorithm if all turnover times are powers of and then applying Lemma 1.
The main idea is to take a TSP-tour and recursively split it to obtain a schedule for the clients with increasing turnover times. During the splitting process, we assign each client on that tour to a congruence classes for some , to indicate we want to visit on each day in . Similarly, we distribute all edges to a congruence class . We do this ensuring that on any given day, we can create a tour through all clients associated with that day, using the edges associated with that day plus a small set of extra edges.
Let us define some further notation. For a given congruence class , we denote the set of vertices and the set of edges assigned to that class. Note that and define the same congruence class, so . Then, for any we have that , the set of clients we need to visit on day , is
The assignment of vertices and edges to classes is guided by the recursive splitting of a TSP-tour in . The full procedure for constructing and is shown in Algorithm 1. The algorithm is initially called with , a TSP-tour visiting all vertices in , and and will determine the set of vertices to be visited on every day (i.e., those congruent to ). Then the first (second) recursive call determines the sets of vertices with turnover time
that will be visited on odd (even) days. Analougously,RecurseTreeSchedule() will return the set of vertices with turnover time to be visited on days in the congruence class and the two recursive calls will return the set of vertices with turnover time that are visited on days and , respectively.
In the remainder we assume that any call to and returns the empty set for any argument that is not explicitly handled in Algorithm 1. Note that we use the notation to denote the vertices incident to edges in .
After Algorithm 1 terminates, each vertex appears in some set for some .
Note that and that ; since is a connected set of edges then in each call to RecurseTreeSchedule, . Therefore no vertex is skipped in the construction of .
In order to find a tour on day through the vertices in we use edges in ; as we already observed this set of edges does not necessarily connect vertices in to the depot. The next lemma shows that a tree that connects all vertices in to the root can be found by considering and adding a shortest path from some vertex in to the depot.
Let be such that is nonempty. Let be the set of edges on the shortest path connecting some arbitrary edge in to the root of . Then the following edge set forms a connected component:
Moreover, spans .
To prove our first claim, we first show that for , either induces at most one connected component, or each component it induces is incident to a component induced by . Then, we will show that if induces at most one connected component, it is incident to .
Suppose does not induce at most one component. Note that is the subset of edges in some connected edge sequence through that have tt-weight . But by the way tt-weight is defined and the fact that is a tree, a simple path connecting disjoint edges with tt-weight , can only consist of edges with tt-weight at most . So every two components in are connected through a path of edges with tt-weight of at most . Moreover since the sequence used to construct is a subset of the sequence used to construct , by induction these connecting paths must be contained in , as required.
Next we show that for any such that , if is not incident to then it is incident to .
Let be the sequence that was used to construct . Since contains all edges in and contains at least one such edge, there exists a minimal path that contains some edge in such that is connected to . Moreover since is minimal and contains the root, must be the edge furthest away from the root on . This implies that all edges on have tt-weight or less. Now suppose that contains edges with tt-weight strictly less than . Then those edges are necessarily in and therefore is incident to that set. If not then is strictly contained in and therefore is connected to .
The first claim of our lemma now follows by induction. is clearly connected. If is connected, we get that is either empty or is connected to or to , and the result follows.
To prove our second claim, suppose that for some and it holds that no edge incident to , is in . We will show that that appears on , from which our claim immediately follows.
Let be the sequence used to construct . The edge incident to that is closest to the root, satisfies . So, it cannot be in otherwise it would be contained in . But this implies that cuts off every edge in from the root, and therefore appears on , as claimed, concluding the proof.
The next lemma allows us to bound the cost of edges included in .
During each (recursive) call to RecurseTreeSchedule, it holds that
The proof is by induction on . Since we initially call the algorithm with a TSP-tour in , which visits each edge twice, it clearly holds for .
Now for , suppose it holds for all smaller . Without loss of generality, suppose we have a call to the function with input , such that are the input parameters for its parent in the call stack.
For the first equality, we split the second sum into an part and an part. In the first inequality we used the way and are determined in Algorithm 1, in the second inequality we used that and in the last inequality we used the inductive hypothesis, concluding the proof.
We are now ready for the main theorem.
There is a -approximation for min-max rftt on trees.
We first round all turnover times down to powers of , which loses a factor of in the optimal solution. We then use Algorithm 1 to construct and thus determining the set of vertices to be visited on day . By Lemma 3 this defines a feasible schedule.
If we then take as in Lemma 4, we get a tree that spans . Moreover the weight of is at most : the contribution of is at most , since we need to reach any client at least on some day (and drive back), while the contribution of is at most , which can be seen by applying Lemma 5 for . Lastly, since we need a tour around , we lose another factor 2. This gives the approximation factor of .
It remains to show that Algorithm 1 runs in polynomial time, and that we can find a polynomial representation for the schedule. For the first claim, note that in each recursive call to the algorithm, the following equality holds ; hence the algorithm terminates after at most calls.
For the second claim, the crucial observation is that we only need to store the entries of for and such that is nonempty. Since at most one entry is defined in every call to the algorithm, and we can simply check if for all stored entries, the claim, and the theorem, follow.
3.2 MIN-AVG on the line
As an even more special underlying metric, we might consider the min-avg problem on the line (on a path). For the min-max version this case is trivial, but for the min-avg version its complexity is unclear: we do not know whether it is in NP, although we expect it to be NP-hard.
On the positive side we can show that the problem is not strongly NP-hard.
min-avg on the line can be solved in pseudopolynomial time.
The proof of Theorem 3.3 is deferred to the appendix, where we give a DP that finds an optimal schedule in polynomial time for any instance with polynomially bounded turnover times.
4 Approximation on general graphs
We will now present logarithmic approximations for both objectives. Note that an -approximation is readily achieved; simply treat the sets of clients with equal turnover time as independent instances. For min-avg, the problem with equal turnover times is simply tsp, for the min-max we get a problem sometimes called the -tsp, for which a approximation is known . Since by rounding to powers of 2, we ensure there are different turnover times, we get Theorem 4.1 (a formal proof can be found in the appendix).
min-max and min-avg rftt have an -approximation.
In the case of min-max it is relatively simple to adapt this idea for an -approximation by appropriately reassigning clients to lower turnover times, as per Theorem 4.2.
min-max rftt has an -approximation.
We start by assuming that every turnover time is a power of . Next, we split up the instance into two new instances. To this end we first define a turnover time to be saturated if . In the first instance we retain the set of vertices with saturated turnover times, and in the second all vertices with unsaturated turnover times. Now if all turnover times are saturated, then and we can find a -approximation using Theorem 4.1. So what remains is to find a -approximation for the second instance.
Since no turnover time is saturated, it is easy to see that we can partition the vertices in into sets , such that , and such that for all . For example we could first add all vertices with to for , and then arbitrarily distribute vertices with among the sets that have space. We now produce a schedule by visiting all clients in any set on different days. This is feasible and implies that at most clients are visited on a given day, which leads to -approximation factor, as required.
A more direct, and deterministic
-approximation is possible as well. In particular, we use the simple heuristic of visiting each client on every day that is a multiple of its turnover time, when turnover times are powers of 2. We call such a schedule asynchronized solution, and show that gives a logarithmic approximation.
The proof of this approximation factor, which is not trivial, works by show that a synchronized schedule is no more costly than a non-decreasing schedule, in which all tours are routed along a tree with turnover times non-decreasing from the root. We then show how to transform any schedule to a non-decreasing one, losing a logarithmic factor in the process. As a byproduct we show that the analysis is tight, an that a non-decreasing schedule must be times more costly than OPT in the worst case. The proof of Theorem 4.3 can be found in the appendix.
min-avg rftt has an -approximation.
It is an open question whether there exists a constant factor approximation algorithm for the general case. We observe that the approach of first finding a tree spanning all vertices and then using the algorithm of Section 3 is unsuccessful. In fact there exist instances of the problem on a graph with vertices, such that if we limit our attention to tours that for each day use only edges of a spanning tree of then the obtained solution is approximated. This implies that we need some new ideas, in order to improve the approximation of the previous theorem.
In this paper, we considered replenishment problems with fixed turnover times, a natural inventory-routing problem that has not been studied before. We formally defined the rftt problem and considered the objectives min-avg and min-max. For the min-avg rftt, we showed that it is at least as hard as the intractable Pinwheel Scheduling Problem on series-parallel graphs and we gave a 2-approximation for trees. For the min-max objective we showed NP-hardness on stars and gave a 6-approximation for tree metrics. We also presented a DP that solved the min-avg rftt in pseudopolynomial time on line graphs. Finally, we gave a -approximation for the min-max objective on general metrics.
The results that we present should be considered as a first step in this area and many problems remain open. An intriguing open problem is the complexity of the of rftt on a tree. Namely, for min-avg variant we conjecture that the problem is hard, and we ask whether the simple 2-approximation we provide can be improved. For the min-max variant it is open whether the problem is APX-hard and whether we can improve the 6-approximation,
Next to replenishing locations with routing aspects as we studied in this paper, scheduling problems modeling maintenance or security control of systems, form a class of problems to which this model naturally applies. It would be interesting to study such fixed turnover time problems in combination with scheduling. Would this combination allow for more definitive results?
-  Sanjoy Baruah and Joël Goossens. Scheduling real-time tasks: Algorithms and complexity. In Handbook of Scheduling: Algorithms, Models, and Performance Analysis. CRC Press, Boca Raton, 2003.
-  Sanjoy Baruah, Louis Rosier, Igor Tulchinsky, and Donald Varvel. The complexity of periodic maintenance. In Proceedings of the International Computer Symposium, pages 315–320, 1990.
-  Sanjoy K. Baruah, Rodney R. Howell, and Louis E. Rosier. Feasibility problems for recurring tasks on one processor. Theor. Comput. Sci., 118(1):3–20, 1993.
-  Vincenzo Bonifaci and Alberto Marchetti-Spaccamela. Feasibility analysis of sporadic real-time multiprocessor task systems. Algorithmica, 63(4):763–780, 2012.
-  Chris Calabro, Russell Impagliazzo, Valentine Kabenets, and Ramamohan Paturi. The complexity of unique -sat: An isolation lemma for -cnfs. Journal of Computer and System Sciences, 74(3):386–393, 2008.
-  Mee Yee Chan and Francis Y. L. Chin. General schedulers for the pinwheel problem based on double-integer reduction. IEEE Transactions on Computers, 41(6):755–768, 1992.
-  Mee Yee Chan and Francis Y. L. Chin. Schedulers for larger classes of pinwheel instances. Algorithmica, 9(5):425–462, 1993.
-  Leandro C. Coelho, Jean-François Cordeau, and Gilbert Laporte. Thirty years of inventory routing. Transportation Science, 48(1):1–19, 2013.
-  Sofie Coene, Frits C. R. Spieksma, and Gerhard J. Woeginger. Charlemagne’s challenge: The periodic latency problem. Operations Research, 59(3):674–683, 2011.
-  Holger Dell, Thore Husfeldt, Dániel Marx, Nina Taslaman, and Martin Wahlén. Exponential time complexity of the permanent and the tutte polynomial. ACM Transactions on Algorithms, 10(4):21:1–21:32, 2014.
-  Friedrich Eisenbrand, Nicolai Hähnle, Martin Niemeier, Martin Skutella, José Verschae, and Andreas Wiese. Scheduling periodic tasks in a hard real-time environment. In Proceedings of the 37th International Colloquium on Automata, Languages, and Programming, pages 299–311. Springer, 2010.
-  Pontus Ekberg and Wang Yi. Schedulability analysis of a graph-based task model for mixed-criticality systems. Real-Time Systems, 52(1):1–37, 2016.
-  Jittat Fakcharoenphol, Satish Rao, and Kunal Talwar. A tight bound on approximating arbitrary metrics by tree metrics. Journal of Computer and System Sciences, 69(3):485–497, 2004.
-  Peter C. Fishburn and Jeffrey C. Lagarias. Pinwheel scheduling: Achievable densities. Algorithmica, 34(1):14–38, 2002.
-  Greg N. Frederickson, Matthew S. Hecht, and Chul E. Kim. Approximation algorithms for some routing problems. In Proceedings of the 17th International Symposium on Foundations of Computer Science, pages 216–227, 1976.
-  Michael R. Garey and David S. Johnson. Computers and intractability: A guide to the theory of NP-completeness. 1979.
-  Leszek Gasieniec, Ralf Klasing, Christos Levcopoulos, Andrzej Lingas, Jie Min, and Tomasz Radzik. Bamboo garden trimming problem. In SOFSEM, pages 229–240. Springer, 2017.
-  Robert Holte, Al Mok, Louis Rosier, Igor Tulchinsky, and Donald Varvel. The pinwheel: A real-time scheduling problem. In Proceedings of the 22th Annual Hawaii International Conference on System Sciences, volume 2, pages 693–702, 1989.
-  Tobias Jacobs and Salvatore Longo. A new perspective on the windows scheduling problem. arXiv preprint arXiv:1410.7237, 2014.
-  Philip Klein and R Ravi. A nearly best-possible approximation algorithm for node-weighted steiner trees. Journal of Algorithms, 19(1):104–115, 1995.
-  Al Mok, Louis Rosier, Igor Tulchinksy, and Donald Varvel. Algorithms and complexity of the periodic maintenance problem. Microprocessing and Microprogramming, 27(1-5):657–664, 1989.
Appendix 0.A Proof of Theorem 2.1
Given an instance of Pinwheel Scheduling, create an instance of min-avg rftt. We define
where for ,
and , . All edge weights are 1. See Figure 1 for an illustration.
We claim that the instance has a solution of cost if and only if is a feasible Pinwheel Scheduling instance.
For the ‘if’-direction, suppose we have a feasible pinwheel schedule. Then we create a replenishment schedule as follows: we take the set of jobs visited on day , , where job is the job scheduled on day in the pinwheel solution (when no job is visited, pick one arbitrarily). The pinwheel schedule then guarantees that the periods of jobs in are satisfied, while jobs are visited every day, as required. Now since any tour has length 6, we can do this within the claimed cost.
For the ‘only if’-direction, note that any replenishment schedule must have cost at least, since no tour that visits costs less than that. Moreover, any tour visiting those three vertices that is not of the form , will cost strictly more than . It follows that if the cost of the replenishment schedule is , every tour visits at most one job from (and the same for ). Since for all , this directly implies that the Pinwheel Scheduling instance is feasible.
Appendix 0.B Proof of Theorem 2.2
In 3-Partition, we are given integers and an integer such that for all . The question is whether we can partition the integers into sets of three integers that add up to .
Given an instance of 3-Partition, create a weighted star graph with the depot at the center and for every integer a leaf vertex attached with an edge of weight . Finally set the turnover time to for every leaf. We will show that the rftt instance has value if and only if we have a YES-instance for 3-Partition.
Given a valid partition of the integers, clearly one can assign every set of 3 integers a unique day in and visit the associated leaf on every multiple of that day for a valid rftt solution. That the opposite direction works as well hinges on the fact that for all , so we cannot visit more than 3 clients on one day. Since after days all clients must have been visited due to the turnover times, it follows that the first days of the schedule corresponds to a valid partition.
Appendix 0.C Proof of Lemma 1
Let denote the instance found from by rounding every turnover time up to a power of . Since any schedule remains feasible if we round up the turnover times, we have that .
Suppose we have an optimal solution for in which is scheduled on day . We can construct a feasible schedule for by scheduling the concatenation of and on day . The maximum tour length in this schedule is at most twice that of the optimal solution for and every tour from the original schedule is visited exactly twice in the new schedule, so this yields a factor 2 increase in both the min-max and the min-avg objective.
Appendix 0.D A dynamic program that proves Theorem 3.3
In this section we will show how to solve the min-avg problem on the line in pseudopolynomial time. Since we are minimizing the average, it is easy to see that we can reduce this problem to two times the min-avg problem on the half-line (a path with the depot in one of the leaves). On the half-line each vertex has a distance from the origin. Suppose vertices are numbered such that . We present a pseudopolynomial time dynamic programming agorithm for this problem, based on the following observations.
First of all, we note that on any tour visiting vertex automatically visits every vertex . As in the tree case, we therefore assume that for . Thus, after visiting , all have a remaining turnover time of . For the dynamic program to work, we guess , the day on which vertex is visited for the first time and try all guesses between and .
The dynamic program now works as follows. Suppose we are given the optimal solution for vertices when only considering the days . Now we want to include in the optimal solution for the first days. If , it is not necessary to visit during the first days, and hence it is optimal to take the optimal solution for the first vertices and days. Otherwise, we need to visit on some day in . Before day , we only need to visit the vertices . Thus, we take the optimal tours for visiting the first vertices in the first days. After day , all vertices have the same remaining turnover time as they had at time zero. Hence, we can take the optimal tours for the first vertices and days.
Let We initialize and we use the recursion:
The optimal solution is the schedule that corresponds to the value minimizing . Note that the algorithm runs in time , implying the following.
min-avg on the line can be solved in pseudopolynomial time.
Appendix 0.E Proof of Theorem 4.1
By Lemma 1 we may assume every is a power of so that there are at most different turnover times. We simply treat the sets of vertices with the same turnover time as separate instances and concatenate the solutions. Our result then follows from the fact that for all these instances a constant factor approximation is available. In the case of the min-max objective we get the -tsp problem, where is equal to the turnover time of the vertices in the instance. In the case of min-avg, we need to minimize the sum over all tours. But since all turnover times are equal there is no advantage to visiting vertices on different days, hence we recover a simple tsp problem.
Appendix 0.F Proof of Theorem 4.3 and tightness of analysis
This section provides two proofs of Theorem 4.3, which shows that we can get a -approximation for the min-avg objective as well. The first proof is a direct application of metric tree embeddings.
Proof (Proof of Theorem 4.3)
We will apply the FRT tree embedding  of the initial instance and then use the -approximation for tree metrics to obtain the final solution. Given the instance , let be a random tree produced by the tree metric approximation with distortion. Then and . Let be the solution produced by the -approximation for min-avg rftt on the tree metric . Then by linearity of expectation on the sum over the edges.
The second proof arises from a more natural algorithm given by a simple greedy strategy. We round all periods to powers of 2 and delay visiting any client for as long as possible. Next, for every day we use any constant factor approximation for TSP to calculate a tour on the clients whose visit can no longer be delayed. We call this a synchronized solution. It takes some work to show this does indeed provide a logarithmic approximation though. We do this by showing that any synchronized solution is no more costly than a non-decreasing solution, in which every tour is based on a tree that has the clients ordered by ascending turnover times from root to leaves. We then show that such a non-decreasing solution costs at most times the optimal solution , and provide an example showing this analysis is tight. Moreover, we show that the optimal non-decreasing solution is at most twice as costly as the optimal synchronized solution. This implies that that any sub-logarithmic approximation algorithm must avoid finding such solutions.
As always we will assume that turnover times are rounded to powers of . Let us define a synchronized solution, as one where a client with turnover time is visited on each day that is a multiple of , for all . We define a non-decreasing tree as a tree on the depot and subset of clients, such that the turnover times on every path from the depot to the leafs are non-decreasing. A non-decreasing solution is a solution in which for each day the tour is given by visiting the clients of a non-decreasing tree in depth first order.
The following two lemmas show that optimal synchronized and non-decreasing solutions differ in cost by at most a constant factor.
The optimal synchronized solution costs at most two times the optimal non-decreasing solution.
Suppose we have a non-decreasing solution. Let be the non-decreasing tree associated with day , for . We will show that we can find a set of trees for that cost at most as much as on average, and such that any client appears in tree if is a multiple of . A synchronized solution can then be found by taking the tour on day to be a tour depth first search in , losing a factor .
Iteratively, from , we build the new trees. In iteration and for all , select all unmarked edges in that are used on a path from the depot to a client with , and mark them. Then insert these edges in the tree for the earliest following day that is a multiple of , so .
We now show by induction that after iteration , for each day that is a multiple of , is a tree connecting the depot to all clients with turnover time . The base case follows from the fact that the trees are non-decreasing and must contain every client with turnover time 1. For higher , it is easy to see that must contain a path from to for all clients with and some with . But already contains by our inductive hypothesis and the result follows.
We remark that we have corresponding converse result, as per Lemma 7.
The optimal non-decreasing solutions costs at most two times the optimal synchronized solution.
We may assume that any synchronized solution uses at most distinct tours, lets label them , where visits all clients with turnover time at most . Furthermore define and , for . Then it holds that the cost of the synchronized solution is
Now note that we can create a non-decreasing tree for any day with as its largest power of factor from the synchronized solution, by taking the union of where we shortcut every client with in tour . But the cost of such a solution is
Our main result follows from showing that we can always find a non-decreasing solution of cost times . We use the following tree pairing Lemma by Klein and Ravi .
Given any tree and an even subset of its vertices, there is a pairing of vertices covering such that the tree-path induced by the pairs are edge-disjoint.
Using the tree pairing Lemma 8, we will construct non-decreasing trees to approximate arbitrary trees. First we define the notations needed for the algorithm.
A non-decreasing arc of is the arc between and that points from the client with lower turnover time to the one with higher turnover time (ties are broken arbitrarily). The client with the lower (higher) turnover time is denoted by (). We denote by the unpaired clients and the arcs of the non-decreasing tree being constructed, and require that all arcs must eventually point away from the depot.
Given an arbitrary tree of cost , there is a non-decreasing tree of cost at most .
Let be a tree. We will construct a non-decreasing tree by iteratively pairing off the vertices and directing each pair in a non-decreasing manner.
In the algorithm, we apply the pairing procedure times to get a non-decreasing tree of the desired cost. In each round, we pair a largest subset of such that the pairs induce edge disjoint paths in . Then we direct each pair in ascending order of turnover times and delete the client with higher turnover time from consideration. These arcs are added to the arc set of . We can think of each pair as a connected component represented by the client with the smallest turnover time. In the end, is finalized when no unpaired vertices remain. Note that picking the vertex of minimum turnover time as the representative per connected component ensures that the final tree is indeed directed away from the depot.
In each round, we used each edge of at most once since all pair-induced paths were edge-disjoint. Let be the number of vertices at the beginning of round . Since each round paired off either all vertices or all but one vertex, we have . So the total number of rounds is . Hence .
Proof (Proof of Theorem 4.3)
Given an optimal solution, let be the minimum Steiner tree on the set of clients visited on day , which costs no more than the tour of that day. Using Lemma 9 we can find non-decreasing trees of cost at most . Turning the trees into tours loses only a constant factor, which gives us a non-decreasing solution of cost times . By Lemma 6 we may then turn this solution into a synchronized one as required, concluding the proof.
The bound in the proof of Theorem 4.3 is tight; as there exists a class of instances where requiring a solution to be non-decreasing introduces a logarithmic optimality gap. Together with Lemma 7, this implies that our algorithm does no better than as well.
There exists a class of instances in which there is a logarithmic optimality gap between the optimal and the optimal non-decreasing solution.
To show that the bound in the proof of Theorem 4.3 is tight, we first show that Lemma 9 is tight. Consider the following sequence of sequences where and is generated by alternatingly taking an element from and then from the sequence . For example:
Then define the (unweighted) graph as the path graph with vertices, where the th vertex has turnover time . See Figure 2 for an example.
The minimum spanning tree in costs . It is easy to check that the decreasing spanning tree produced by Algorithm 2 costs . Moreover, since the solution produced attaches every vertex to a nearest vertex with lower turnover time, it must be optimal.
To show tightness of our main theorem, we will define another class of graphs for that are constructed from . The idea is to make copies of each terminal , and then connect them in a regular way, for example like in Figure 3.
Formally is constructed as follows. For simplicity of description, we assume that is planarly embedded from left to right, and we assume that we keep a planar embedding of during construction.
We first copy node to . Now we work from left to right, starting from the second node. When we are at node , we put copies of vertically above each other and to the right of the copies of in . Then we connect them to the copies of in such that the graph remains planar and all copies of have the same degree, and all copies of have the same degree. This can be done in only one way. Furthermore we identify vertex 1 with the depot.
The instance induced by has a logarithmic optimality gap between the optimal and the optimal non-decreasing solution.
There exists an obvious solution that visits exactly one client of each turnover time per day, that costs .
Now suppose we impose non-decreasing constraints. In this case we need to use (on average) at least one edge pointing from a client with a lower turnover time to one with a higher turnover time per day. But from our reasoning on the decreasing minimum spanning tree in , we find that the cheapest set of edges that contains at least one edge pointing from a client with turnover time to one with lower turnover time for all , costs at least . Therefore the optimal solution under non-decreasing constraints is at least a logarithmic factor more expensive than the optimal solution.