Non-Preemptive Tree Packing

An instance of the non-preemptive tree packing problem consists of an undirected graph \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G=(V,E)$$\end{document}G=(V,E) together with a weight w(e) for every edge \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$e\in E$$\end{document}e∈E. The goal is to activate every edge e for some time interval of length w(e), such that the activated edges keep G connected for the longest possible overall time. We derive a variety of results on this problem. The problem is strongly NP-hard even on graphs of treewidth 2, and it does not allow a polynomial time approximation scheme (unless P=NP). Furthermore, we discuss the performance of a simple greedy algorithm, and we construct and analyze a number of parameterized and exact algorithms.

An instance of Nash-Williams' spanning tree packing problem. The optimal solution packs three spanning trees, as indicated on the right Fig. 2 The three edges in the graph on the left hand side have weights w(e 1 ) = w(e 2 ) = w(e 3 ) = 2. The schedule on the right hand side keeps the graph connected for a total of three time units maximum flow problems. Barahona [3] presents another algorithm with a better time complexity.
The tree packing problem may also be interpreted as a scheduling problem: Every edge e ∈ E is a resource that can be activated for a total of w(e) time units. The objective now is to activate the edges in such a way that the graph remains connected for the longest possible overall time. Figure 2 contains a simple illustrating example on the three-vertex cycle. There are three spanning trees (that each consist of two edges), and an optimal schedule uses each of these spanning trees for exactly one time unit. It is easy to see that in every optimal schedule, one of the three edges will be active during the first and the third time slot and will be inactive during the second time slot; in the language of scheduling, we say that the execution of that edge is preempted at time 1 and afterwards resumed at time 2. (In the schedule shown in Fig. 2, edge e 3 is the preempted edge.) The non-preemptive version of tree packing. We consider a non-preemptive variant of the above tree packing problem, where the execution of edges must not be preempted: Every edge e is activated at some time point τ (e) chosen by the scheduler, and then remains active without interruption during the full time interval [τ (e), τ (e) + w(e)]. The objective is again to activate the edges in such a way that the graph remains connected for the longest possible overall time. The resulting combinatorial optimization problem is called non-preemptive tree packing (N-TreePack for short), and the optimal objective value for a graph G = (V , E) with edge weights w : E → N 0 will be denoted ntp(G, w).
In the example in Fig. 2, every reasonable non-preemptive schedule will activate two of the edges at time 0. As there is no way of keeping the graph connected for more than two time units, the optimal objective value is ntp(G, w) = 2.
Related literature. The non-preemptive tree packing problem can be understood as a topic with connections to several different areas. First of all, it can be understood as a non-preemptive scheduling problem equipped with a structurally rich global constraint. In scheduling it is the conventional case to assume non-preemption of the scheduled tasks (see the seminal books of Pinedo [18] and Brucker [5]). This shows the importance of handling non-preemption also for more structured scheduling problems like tree packing. In the work of Adjiashvili et al. [1] the computational complexity of time-expanded packing problems with non-preemption constraints is studied and the authors obtain approximation algorithms for several of the studied problem variants.
Our model is also strongly related to the area of time-varying graphs (TVG). These are graphs over time, where every edge is equipped with the information at which time it is available. Time-varying graphs are used to model networks, where change in the network topology is an inherent part of the system. This includes for example delaytolerant networks where information links often fail, like satellite networks, vehicular or passenger networks.
In the seminal paper of Casteigts, Flocchini, Quattrociocchi and Santoro, different classes of TVGs are identified [6]. In particular, class 9 is the class of constant connected (also called 1-connected [15]) TVGs and contains those TVGs which are connected at every point in time. This class was for example used to always guarantee progression of a broadcast operation [16], or to enable consensus in a TVG [13]. Our problem of non-preemptive tree packing can therefore be understood as scheduling the edges in a dynamic network in such a way that the resulting time-varying graph is 1-connected for as long as possible.
Finally, our problem is a modification of the classic tree packing problem (like the classical results of Nash-Williams [14] and Edmonds [10]) with additional global constraints enforcing non-preemptiveness. A similar problem has been studied by Heuvel and Thomassé [12]. Translated to our vocabulary, their work is also an investigation of non-preemptive scheduling, but there are two key differences to our problem: First, they consider a cyclic scheduling where the lifetime of a scheduled element can wrap around from the end to the beginning of the schedule. Second, instead of finding the longest possible time such that the scheduled elements connect the graph at any time point, they consider a dual problem, where the goal is to find the shortest possible time such that the scheduled elements are acyclic at any time point.
Contributions of this paper. We analyze the computational complexity and the approximability of non-preemptive tree packing, and we also provide some parameterized and exact algorithms for it. The complexity results are devastating: -N-TreePack is strongly NP-hard, even on complete bipartite graphs K 2,n .
-N-TreePack is strongly NP-hard, even on graphs of bandwidth 2.
Since complete bipartite graphs K 2,n are series-parallel and since graphs of bandwidth 2 are outerplanar, our results yield strong NP-hardness for essentially all natural subclasses of graphs with treewidth 2. As edges of zero-weight are irrelevant for the objective value of N-TreePack, NP-hardness immediately propagates from graphs to supergraphs; hence our results also imply strong NP-hardness for all the standard families of specially structured graphs, like planar graphs, bipartite graphs, interval graphs, cographs, etc. The only notable exception are the trees and the cactus graphs. Furthermore, we analyze the complexity of cases with small objective values: Decid-ing whether ntp(G, w) ≥ β can be done in polynomial time for β = 3 and is NP-hard for β = 7; the intermediate cases with β ∈ {4, 5, 6} remain open.
With respect to polynomial time approximation, we introduce a simple greedy algorithm which has a worst case guarantee of n − 1 on n-vertex graphs. On cactus graphs it always succeeds in finding an optimal solution, whereas for every non-cactus graph G there exist edge weights w so that on the input (G, w) the greedy algorithm fails to find an optimal solution. We show by means of a gap-reduction that (unless P=NP) problem N-TreePack does not allow a polynomial time approximation algorithm with worst case ratio strictly better than 7/6; this of course excludes the existence of a PTAS.
Finally, we derive a number of FPT-results in the area of parameterized complexity. The special case of N-TreePack where both the treewidth and the maximum edge weight are bounded by a constant k allows an FPT-algorithm whose running time is linear in |E|. (The case where only the treewidth is bounded and the case where only the maximum edge weight is bounded are both para-NP-hard, and hence unlikely to belong to FPT.) Furthermore we design an exact algorithm for N-TreePack whose (exponential) running time is bounded by |E|! · poly(|E|).
Organization of the paper. Section 2 provides central definitions and summarizes the notation. Section 3 contains the NP-hardness results for specially structured graph classes. Sections 4 and 5 contain the negative and positive results for small objective values. Section 6 discusses the greedy algorithm, Sect. 7 states some parameterized and exact algorithms for N-TreePack, and Sect. 8 concludes the paper with some discussion.

Preliminaries
We write N 0 = N ∪ {0} for the set of nonnegative integers. For a ≤ b, the term [a, b] denotes the time slot starting at a and ending at b. For an integer t ≥ 1, the time slot [t −1, t] is often called the t-th time slot or time slot t. Every graph G = (V , E) in this paper is simple, undirected and without loops. We write V (G) = V and E(G) = E. For V ⊆ V , the edge cut δ(V ) is the set of edges with one endpoint in V and one For all other graph-theoretic concepts used in the paper, we refer the reader to the text book by West [19].

Formal Problem Definition
An instance for problem N-TreePack is a weighted graph (G, w), where G = (V , E) and w : E → N 0 . A schedule for instance (G, w) is a map σ : E → N 0 , that maps each edge e to its activation time σ (e). For a schedule σ and an edge e, the activity interval of e is [σ (e), σ (e) + w(e)]. For t ≥ 1, we let denote the set of edges that are active in the t-th time slot, and we let G σ t = (V , E σ t ) denote the graph on vertex set V with all the edges that are active in the t-th time slot. Finally, we define the objective value ntp(σ ) of schedule σ as the number of time slots [t − 1, t] for which G σ t is connected. When the schedule σ is clear from the context, we often simply write E t and G t instead of E σ t and G σ t . We clarify a few points in this definition: First, the time during which G is connected does not necessarily have to be one continuous time interval. Formally, if C(σ ) = {t ∈ N : G σ t is connected} denotes the set of time slots where the graph is connected by schedule σ , then ntp(σ ) = |C(σ )| is simply the cardinality of C(σ ). Second, there can be a time slot t, where G σ t is connected and contains more edges than a spanning tree, that is, the set of active edges contains a cycle. By our definition, such a time slot also increases ntp(σ ) by one. At first glance, it seems like these are important details in the definition of ntp(σ ). However, this is not the case -the next lemma shows that one can always assume without loss of generality that an optimal schedule connects the graph for a continuous time interval and does so by using only spanning trees.

Further Definitions
Throughout the paper, we investigate the (parameterized) complexity of nonpreemptive tree packing with respect to different graph classes and structural graph parameters.
The treewidth of a graph is a popular parameter in the area of parameterized algorithms and measures in some sense how close the graph is to a tree. It can be defined as the minimum integer k > 0 such that G is subgraph of a k-tree [4]. A k-tree is constructed by starting with a (k + 1)-clique and then repeatedly connecting a new vertex to all vertices of an existing k-clique. Two popular subclasses of treewidth-2 graphs are series-parallel graphs and outerplanar graphs. An undirected graph G is series-parallel, if there exist two vertices s, t in G, such that G has a series-parallel decomposition with respect to the source s and the sink t (see for example [4, p. 22] for details). A graph is outerplanar if it has a planar drawing where all the vertices belong to the outer face. Every outerplanar graph is subgraph of a series-parallel graph [4]. The bandwidth of a graph is the minimum width of a linear arrangement, where a linear arrangement of a graph is a labeling which assigns to each vertex v a distinct integer f (v) and the width of a linear arrangement is max{| Graphs of bandwidth 2 are outerplanar.
A problem is strongly NP-hard if it is NP-hard even if all its numerical parameters are bounded by a polynomial (see Garey and Johnson [11]). For an introduction to parameterized complexity and formal definitions of those concepts we refer the reader to the book of Cygan et al. [9]. A matroid is a pair (E, F), where E is a finite set called the ground set and F is a family of subsets of E with the following properties: (i) We have ∅ ∈ F. (ii) For all F ∈ F and F ⊆ F we have F ∈ F. (iii) For all F, F ∈ F such that |F | < |F|, there exists an element e ∈ F − F such that F ∪ {e} ∈ F. The sets in F are called independent and a maximal independent set is called a base.
An important class of matroids are the graphical matroids, where E is the edge set of some graph and a set F ⊆ E of edges is independent if it does not induce a cycle. The bases in a graphical matroid correspond exactly to the spanning trees of the graph.
Proof Let G = (V , E). We proceed in two steps: First, we prove that one can always make the schedule connected, then we prove that one can always turn the graphs G σ 1 , . . . , G σ β into spanning trees. For the first step, assume that σ : E → N 0 is an optimal schedule with ntp(σ ) = β, but σ is not connected during all of the first β time slots, that is C(σ ) = {1, . . . , β}. Then let s be the smallest integer for which G σ s is disconnected. This corresponds to the s-th time slot [s − 1, s]. By our assumption we have 1 ≤ s ≤ β. We now partition the edge set E into two sets. The set E A contains all edges e with σ (e) < s − 1 and the set E B contains all edges e with σ (e) ≥ s − 1. Now consider the new schedule σ defined by In other words, σ is created from σ by scheduling all edges of E B one time unit earlier. Because the edges in E A connect the graph in σ for all time slots 1, . . . , s − 1, we immediately see that also all the graphs G σ 1 , . . . , G σ s−1 are connected. Furthermore, for every t ≥ s, we claim that E σ t ⊇ E σ t+1 . Indeed, if some edge e is contained in E σ t+1 , then there are two cases: If e ∈ E B , then it is scheduled one time unit earlier in the schedule σ and hence it is also contained in E σ t . In the other case, if e ∈ E A , then by definition we have σ (e) < s − 1. But together with the assumption e ∈ E σ t+1 , nonpreemptiveness implies that e ∈ E σ t . Because σ (e) = σ (e) we also have e ∈ E σ t . This proves the claim. In total, we have that if G σ t+1 is conneted, then so is G σ t for all t ≥ s. This proves that ntp(σ ) ≥ ntp(σ ). If the new schedule σ still does not connect the graph for the first continuous β time slots, we can again repeat this procedure, until we arrive at a schedule with the desired property.
For the second step, assume that σ is a schedule which already connects the graph for the first β time slots (that is C(σ ) = {1, . . . , β}), but not all of the graphs G σ 1 , . . . , G σ β are spanning trees. Then let s be the smallest integer such that G σ s contains a cycle. Because G σ s−1 does not contain a cycle, there is some edge e on the cycle, which is activated for the first time in the s-th time slot [s − 1, s], that is σ (e ) = s − 1. Consider the new schedule σ which results from σ by scheduling the edge e one time unit later, that is σ (e ) = σ (e ) + 1 and σ (e) = σ (e) for all other edges. Because e was closing a cycle in G σ s , we have that G σ s = G σ s − e is still connected. Because the only change in the new schedule σ in comparison to the old schedule σ is that we increased the activation time of e by one, we obtain that ntp(σ ) ≥ ntp(σ ).
In summary, the preceding argument shows that if we select a schedule σ with the property that e∈E σ (e) is maximal among all the schedules that keep the graph connected for the first consecutive β time units, then all the graphs G σ 1 , . . . , G σ β are spanning trees. This proves the lemma.
The ideas presented in Lemma 1 also provide a formal proof that the problem N-TreePack is indeed a nonpreemptive variant of Nash-Williams' tree packing problem. Indeed, consider the problem of keeping the weighted graph (G, w) connected, but in the case where edge preemption is allowed. We claim this problem is equivalent to Nash-Williams' tree packing problem. Indeed, if (T 1 , . . . , T β ) is a sequence of β spanning trees, then we can schedule in the i-th time slot exactly the edges of the i-th tree T i (this is feasible, since preemption is allowed). On the other hand, if we can find a schedule that keeps the graph connected for β time units, we can in the same manner as in the proof of Lemma 1 transform the schedule in such a way that all the graphs given by the active edges in the first β time slots are spanning trees. Therefore, it is possible to pack β spanning trees.

NP-Hardness
In this section, we establish the NP-hardness of problem N-TreePack for certain families of highly restricted graphs (Fig. 3). All proofs are done by reductions from the strongly NP-hard 3-Partition problem; see Garey & Johnson [11].
Problem 3-Partition: Instance: Positive integers q 1 , . . . , q 3n with sum 3n i=1 q i = n Q that satisfy Q/4 < q i < Q/2 for all i. Question: Is there a partition of these 3n numbers into n into triplets, such that the numbers in every triplet sum up to Q?
In the following, we show that N-TreePack is strongly NP-hard for complete bipartite graphs K 2, (Theorem 1). As the graph K 2, has unbounded bandwidth, one could hope that the problem becomes easy for graphs of bandwidth 2. But as we show in Theorem 2, also in this case the problem stays strongly NP-hard. As the graph Fig. 3 A complete bipartite graph K 2, and a graph of bandwidth 2. Problem N-TreePack is NP-hard even on these simple graphs K 2, is series-parallel and bandwidth-2 graphs are outerplanar, it follows that problem N-TreePack is intractable even on popular subclasses of treewidth-2 graphs.

Theorem 1 Problem N-TreePack is strongly NP-hard, even on complete bipartite graphs K 2, .
Proof Let q 1 , . . . , q 3n be an instance of 3-Partition as defined above. Let β = n Q +n −1. We construct an instance of N-TreePack on the complete bipartite graph K 2,4n−1 with bipartition {a, b} and {x 1 , . . . , We claim that the constructed instance of N-TreePack possesses a schedule with objective value β, if and only if the underlying 3-Partition instance has answer YES.
(Only if) Assume that for the constructed N-TreePack instance there exists a schedule σ with objective value β. Note that for every i ∈ {1, . . . , n − 1}, we have Hence the sum of all the edge weights in the graph is (n − 1)(β + 1) + 3nβ + (β − n + 1) = 4βn. As every spanning tree for K 2,4n−1 has 4n edges, each of the connected graphs G 1 , . . . , G β must have exactly 4n edges (and must actually be a spanning tree). The fact that the sum of all edge weights is 4βn furthermore implies that the activity interval of every edge is contained in . . , β} so that the edge set E k contains both edges incident to vertex x i . Because there are only two possibilities for the two activity intervals of , we see that either k = i(Q + 1) or k = (n − i)(Q + 1) holds, and we say that this value k is associated with vertex x i . If some value k is associated with two distinct vertices x i and x j , then G k contains a cycle; a contradiction. We conclude that each of the values k ∈ {Q + 1, 2(Q + 1), . . . , (n − 1)(Q + 1)} is associated with exactly one of the vertices x 1 , . . . , x n−1 . This means that for the corresponding time slots [k−1, k], vertex a is connected to vertex b via the two edges that are incident to the associated vertex x i . The remaining β − n + 1 time slots form n (maximal) intervals each of length Q. It is easily verified that during each such interval exactly three vertices y i , y j , y ensure the connection between a and b, and that the weights of the three edges {y i , a}, {y j , a}, {y , a} satisfy q i + q j + q = Q. Hence the corresponding triplets form a solution for the 3-Partition instance.
(If) Now assume that the 3-Partition instance has a solution. Theorem 2 Problem N-TreePack is strongly NP-hard, even on graphs of bandwidth 2.
Proof Let q 1 , . . . , q 3n be an instance of 3-Partition as defined above. We construct an instance of N-TreePack as follows. The graph G has 4n + 1 vertices u 0 , . . . , u n and v 1 , . . . , v 3n . We will sometimes denote vertex u k also by the name v k−n , for In the ordering u 0 , u 1 , . . . , u n , v 1 , v 2 , . . . , v 3n , every edge either connects two adjacent vertices or two vertices at distance 2. Hence, the constructed graph G = (V , E) has bandwidth 2.
We will study schedules σ of objective value β. As the sum of all edge weights in G equals β(|V | − 1), each of the graphs G σ 1 , . . . G σ β is a spanning tree and the activity interval of every edge is contained in [0, β]. We will discuss the behavior of σ on the induced subgraph Since the only connections between H i and the rest of the graph are via the two vertices u i−1 and u i , during any time slot [t − 1, t] with 1 ≤ t ≤ β, graph H i will consist of one or two connected components under schedule σ . If there is a single connected component, we say that H i is fully-connected during the t-th time slot. If there are two connected components (one containing vertex u i−1 , the other one containing vertex u i ), we say that H i is semi-connected during the t-th time slot. Note that if H i is semi-connected during the t-th time slot, then the edge {u i−1 , u i+1 } must be active during that slot, as there are no other edges that would be able to connect the component containing u i−1 to the rest of the graph.
The graph H 1 consists of the vertices u 0 and u 1 and of the edge {u 0 , u 1 } of weight (2n − 2)Q. Suppose for the sake of contradiction that H 1 is neither fully-connected during the first time slot nor during the β-th time slot. Then the edge {u 0 , u 2 } (of value 2Q) must be contained both in E 1 and in E β , which is impossible. By symmetry, we will henceforth assume that under schedule σ the graph G 1 is fully-connected during the β-th time slot. This implies that {u 0 , u 1 } is active during [Q, β] and that

A Negative Result for Objective Value Seven
In this section, we show that it is NP-hard to decide whether there exists a schedule of objective value at least 7. The reduction is from the following version of the Hamilton cycle problem; see Akiyama, Nishizeki & Saito [2] Problem Hamilton-3-reg Instance: A bipartite, 3-regular graph H . Question: Does H possess a Hamilton cycle?
The reduction is done in two steps. The first step transforms an instance H of Hamilton-3-reg into a new 4-regular graph H with the properties described in Lemma 2. The second step then transforms the 4-regular graph H from Lemma 2 into a corresponding instance of problem N-TreePack.  For claim (i), assume that H has a Hamilton cycle C . Then we obtain a Hamilton cycle C in H using the edge {u, z} in the following fashion: We start at the vertex u, and traverse all the vertices of A x in such an order that we can proceed to go to x 1 afterwards. Now we follow the edges of the cycle C , switching alternatingly between H 1 and H 2 after each edge. Precisely, whenever we follow an edge of C to encounter a new vertex v 1 in H 1 (v 2 in H 2 , respectively), we traverse all the vertices of A v and go to v 2 (v 1 , respectively) and then follow the next edge of C . Because the graph H has an even number of vertices (it is bipartite and 3-regular), we will end up at x 2 . We then complete the tour by traversing all vertices of A x and going along the edge {u, z} at the end. This describes a Hamilton cycle of H which uses the edge {u, z}.

Lemma 2 There is a polynomial time algorithm that takes an instance H of
For claim (ii), we prove the contrapositive. Assume that H has a Hamilton path P = (w 1 , . . . , w n ) starting at vertex u, we have to prove that H has a Hamilton cycle. Consider the second vertex w 2 on the path P. Note that if w 2 = z, then w n is in A x . On the other hand, if w 2 is in A x , then w n is in A x . We first assume that w 2 ∈ A x and w n ∈ A x . We claim that the Hamilton path P necessarily switches between H 1 and H 2 after every of its edges in H 1 or H 2 . Indeed, let v = x be a vertex of H and assume without loss of generality that from the two vertices v 1 and v 2 the path P first encounters v 1 . If the path does not immediately switch to v 2 , then it will at a later stage need to visit v 2 . But in this case, it has to visit A v after visiting v 2 , in contradiction to the fact that the path has to return to A x . This proves that P switches between H 1 and H 2 after every egde in H 1 or H 2 . Then looking at the edges of P which lie in H 1 or H 2 , we see that H has a Hamilton cycle. Finally, an analogous statement holds in the case w 2 = z. So we have proven the claim. Now let H be a 4-regular bipartite graph as described in Lemma 2. Let U = {u 1 , . . . , u k } and Z = {z 1 , . . . , z k } denote the two parts in the bipartition of H , and let {u k , z k } be its special edge. We create an instance (G, w) of N-TreePack from H . An informal sketch of this instance (G, w) is depicted in Fig. 5. Formally, it is described the following way: The graph G has the vertex set is called the i-th gadget of type L and has edges and edge weights as depicted in  Now assume that (G, w) allows some schedule σ of objective value 7. During any time slot [t − 1, t] with 1 ≤ t ≤ 7, the i-th gadget of type L will consist of either one or two connected components under schedule σ . If there is a single connected component, we say that L i is fully-connected during the t-th time slot. If there are two connected components (one containing x, and one containing u i ), we say that L i is semi-connected during the t-th time slot. In the same manner, during the t-th time slot, gadget R i is either fully-connected or semi-connected with x and z i in different components. Likewise, the gadget C is either fully-connected, or semi-connected with x and z k in different components. Proof Note that the sum of all edge weights in G is 8k −1+32k +16k +8 = 56k +7 = 7(8k + 1) = 7(|V (G)| − 1). This implies that each of the graphs G 1 , . . . , G 7 is a tree (in particular, it is acyclic) and that the activity interval of each edge is contained in [0, β]. For the proof of (i), consider the vertex v i1 in the gadget R i . There is exactly one time slot [t − 1, t] during which both edges incident to v i1 are active, and we have t = 2 or t = 6. Analogously, there is exactly one time slot [t − 1, t ] during which both edges incident to the vertex v i2 are active, and we have t = 2 or t = 6. As t = t yields the contradiction that G t has a cycle, we conclude {t, t } = {2, 6} and (i) follows. Claims (ii) and (iii) can be proven in the same manner.

Lemma 4
Let the graph H and the special edge {u, z} be as described in Lemma 2,and let (G,w) be the corresponding N-TreePack instance. If H contains a Hamilton cycle which uses the special edge, then ntp(G, w) ≥ 7.
Proof It is easy to see that a schedule σ with these properties does indeed exist. Table 1 provides a schematic description of the schedule, by indicating for each number t, which edges are scheduled and which gadgets are fully connected during the the t-th time slot [t − 1, t]. Notice that the active edges in H form a matching of H during the time slots 1,2,3,5,6, and 7, and form a Hamilton path of H during the time slot 4. By checking each of the cases t = 1, . . . , 7, it is easily seen that each of the graphs G σ 1 , . . . , G σ 7 is connected. We therefore conclude that ntp(σ ) = 7.
Note that the four edges in δ(z i ) ∩ E(H ) each have weight at most 2 (in the case i = k we have four times weight 2, and for i = k we have three times weight 2, and w(e 0 ) = 1). For the sake of contradiction, assume d 1 (z i ) > 1. Then from the four edges in δ(z i ) ∩ E(H ) at least two are scheduled at time 0. This is a contradiction to d 3 Hence d 1 (z i ) = 1. By the same argument, d 7 (z i ) = 1. A similar argument shows that e 0 / ∈ E 4 . Next, consider the graph G 1 of active edges in the first time slot. We know that d 1 (z i ) = 1 for all i = 1, . . . , k. Hence the induced subgraph G 1 [U ∪ Z ] on 2k vertices is acyclic, has k edges, and therefore has k connected components. But because G 1 is connected, and because all the gadgets of type R and the gadget C are semi-connected during time slot 1, this implies that every single gadget of type L is actually fullyconnected during time slot 1. The same argument holds for time slot 7. In total, together with Lemma 3, we have that a gadget of type L is fully-connected during the t-th time slot, if and only if t ∈ {1, 3, 5, 7}. This in turn implies that for all i = 1, . . . , k, one has Finally, we claim d 4 (u k ) = 1. In fact, d 4 (u k ) = 0 is impossible, because gadgets of type L are semi-connected during time slot 4. For the sake of contradiction, assume d 4 (u k ) > 1. We know that d 2 (u k ) ≥ 1, d 6 (u k ) ≥ 1 and e 0 / ∈ E 4 and w(e 0 ) = 1. So our assumption d 4 (u k ) > 1 is only possible if e 0 ∈ E 2 or e 0 ∈ E 6 . But for the vertex z k , we also know d 1 (z k ), d 3 (z k ), d 5 (z k ), d 7 (z k ) ≥ 1. This is a contradiction to e 0 ∈ E 2 ∪ E 6 , hence our assumption was wrong and d 4 (u k ) = 1. In summary, during time slot 4, all gadgets of type L and R are semi-connected. We also have for all i = 1, . . . , k that d 4 (u i ) ≤ 2 and d 4 (z i ) ≤ 2. Furthermore, we have d 4 (u k ) = 1. However, G 4 is connected. These facts together imply that the induced subgraph G 4 [U ∪ Z ] is a Hamilton path in H starting at u k = u.
By combining Lemmas 2, 4 and 5 we get the following summarizing theorem.

Theorem 3
For N-TreePack it is strongly NP-hard to decide whether there exists a schedule of objective value at least 7.
All edge weights in the above reduction are in the set {1, . . . , 7}. A minor modification yields the following corollary.  Figure 7 shows a modified version of this gadget that emulates the edges of weight 7 by edges with weights in {1, . . . , 6}. One easily verifies that the functionality of the gadget remains the same and that in particular Lemma 3 still holds true.
As it is NP-hard to distinguish between N-TreePack instances with optimal objective value 6 and N-TreePack instances with optimal objective value 7, we also get the following in approximability result. Corollary 2 Unless P=NP, there is no polynomial time approximation algorithm for N-TreePack with worst case guarantee better than 7/6.

A Positive Result for Objective Value Three
In Sect. 4, we have established the NP-hardness of deciding whether there exists a schedule of objective value at least 7. As a complementary result, we now show that it can be decided in polynomial time whether there is a schedule of objective value at least 3. E). We partition the edge set E into set W 1 (edges of weight 1), set W 2 (edges of weight 2), and set W ≥3 (edges of weight at least 3). In a schedule of objective value 3, we may activate all edges in W ≥3 at time 0. We interpret an edge in W 2 as a pair of two edges of weight 1: one of these two edges is scheduled during the middle time slot [1,2]; the other edge can either be scheduled during slot [0, 1] or during slot [2,3]. Edges in W 1 are scheduled during one of the three slots [0, 1], [1,2], [2,3].

Theorem 4 For an instance of N-TreePack on a graph with m edges, it can be decided in
By Lemma 1, we may assume that in a feasible schedule of length 3 the graphs (V , E t ) with t = 1, 2, 3 are trees. Let H 3 be the graph that results from G after contracting the edge set W ≥3 , and let H 23 be the graph that results from G after contracting the edge set W 2 ∪ W ≥3 . We introduce three matroids: -The matroid F 1 has the ground set W 1 ∪ W 2 . A set F ⊆ W 1 ∪ W 2 is independent in F 1 , if and only if F is acyclic in graph H 3 . -The matroid F 2 has the ground set W 1 . A set F ⊆ W 1 is independent in F 2 , if and only if F is acyclic in graph H 23 . -The matroid F 3 has ground set W 1 ∪ W 2 , and coincides with F 1 .
Recall that a base of a matroid is a maximal independent set. By construction, the bases of F 1 , F 2 and F 3  Now observe that scheduling an edge of weight 1 is equivalent to choosing in which of the three time slots 1,2 or 3 it is scheduled. Scheduling an edge 2 is equivalent to always schedule it in time slot 2 and choose whether it is scheduled in time slot 1 or 3. From these facts together with Lemma 1, we can deduce that we can connect the graph during time slots 1,2 and 3 (that is ntp(G, w) ≥ 3 holds), if and only if there exist three pairwise disjoint subsets S 1 , S 2 , S 3 of W 1 ∪ W 2 , such that S t forms a base of the matroid F t for t = 1, 2, 3. This can be checked in O(m 3 ) time by using Edmond's matroid partitioning algorithm [10].

The Greedy Algorithm
We introduce a greedy algorithm that maintains connectivity by always activating edges of the largest possible weight. Formally, we let F t ⊆ E t denote the set of edges whose activity intervals end at time t. By U t = E − (E 1 ∪ E 2 ∪ · · · ∪ E t ) we denote the set of edges that have not been used and activated before time t. Now the Greedy algorithm starts its work by initializing E 0 := ∅, F 0 := ∅, and U 0 := E. For t ≥ 0, the set E t+1 for time slot [t, t + 1] is computed as follows. If the graph (V , E t − F t ) is a tree, we set E t+1 := E t . If the graph (V , E t − F t ) is a forest with c components, we turn it into a tree by adding a maximum weight subset A ⊆ U t of cardinality c − 1; then we set E t+1 := (E t − F t ) ∪ A. In case no such set A exists, the Greedy algorithm terminates. (The set A can be computed for instance by applying Kruskal's algorithm for maximum spanning trees; ties are broken arbitrarily.) Theorem 5 For every graph G = (V , E) on n vertices and for every w : E → N 0 , the Greedy algorithm computes a schedule of length at least ntp(G, w)/(n − 1). Furthermore, there exist instances on which the schedule computed by the Greedy algorithm is a factor n/2 below the optimal objective value.
Proof For the positive result, we consider the time slot [T , T + 1] at which Greedy terminates. Then the graph (V , (E T − F T ) ∪ U T ) is not connected. We consider the vertex set C ⊆ V of one of the components of that graph, and the corresponding edge cut δ(C). Then the weight w(δ(C)) = e∈δ(C) w(e) yields a trivial upper bound for the optimal objective value: Since every edge set E j with 1 ≤ j ≤ T induces a tree, we have |E j | = n − 1 and hence |E j ∩ δ(C)| ≤ n − 1. As all edges in the cut δ(C) have been activated and run to completion before the time slot [T , T + 1], we conclude T ≥ w(δ(C))/(n − 1), which together with (1) yields the desired approximation guarantee. For the negative result, we consider the complete graph K n = (V , E) on n vertices with weights w(e) = 1 for all e ∈ E. A folklore result (see for instance Palmer [17]) says that the maximum number of edge-disjoint spanning trees that can be packed into K n is n/2 . This implies ntp(K n , w) = n/2 . On the other hand, if the Greedy algorithm at time 0 activates the n − 1 edges in the edge cut δ(v) for some v ∈ V , the objective value of the resulting schedule equals 1. Proof We first show that (i) implies (ii). Since cut-vertices split an N-TreePack instance into smaller instances that do not interact with each other, it is sufficient to prove the statement for two-connected cactus graphs. Hence we will assume that G is a cycle on n vertices, and we let e 1 , . . . , e n denote the edges in the cycle ordered by increasing weight so that w(e 1 ) ≤ w(e 2 ) ≤ · · · ≤ w(e n ). It is easily seen that the optimal objective value for (G, w) equals min{w(e 1 ) + w(e 2 ), w(e 3 )}. As the Greedy algorithm activates the n − 1 edges e 2 , . . . , e n at time 0 and activates the final edge e 1 at time w(e 2 ), it yields the optimal objective value. In order to show that (ii) implies (i), we first consider the graph H on the four vertices v 1 , v 2 , v 3 , v 4 and the edge weights w H depicted in Fig. 8. As the Greedy algorithm at time 0 activates the three edges {v 1 , v 2 }, {v 1 , v 4 }, {v 3 , v 4 } (that carry the weights 3, 2, 2, respectively), at time 2 there remains no further possibility of connecting vertex v 4 to the rest of the graph; hence Greedy generates a schedule of value 2. On the other hand, the optimal schedule results by activating the three edges the corresponding optimal objective value is ntp(H , w H ) = 3. Hence Greedy fails to solve this instance (H , w H ) to optimality. Now let G = (V , E) be an arbitrary connected graph that is not a cactus. This implies that G does contain a subdivision (V , E ) of the four-vertex graph H = (V H , E H ) in Fig. 8. Let E ⊆ E be a subset of cardinality |V − V |, so that the graph (V , E ∪ E ) is connected. We construct edge weights w : E → N 0 as follows. For every edge e / ∈ E ∪ E we set w(e) = 0, and for every edge e ∈ E we set w(e) = 3. Finally, we fix the weights w(e) of the edges e ∈ E so that they emulate the weights w H : E H → N 0 in the four-vertex graph H ; if an edge e ∈ E belongs to the subdivision of some edge f ∈ E H , we define w(e) = w H ( f ). It is easily verified that the resulting instance (G, w) satisfies ntp(G, w) = 3, whereas the Greedy algorithm only yields an objective value of 2.

Parameterized Complexity
In this section, we show that problem N-TreePack is fixed parameter tractable with respect to various parameters. As the problem is already NP-hard even for highly restricted graphs, we can only hope for positive parameterized complexity results for quite restricitive graph parameters, or when additionally the edge weights are restricted. Note that Theorems 1 and 3 imply the NP-hardness of problem N-TreePack, even if either the treewidth or the edge weights are bounded by a constant.

Theorem 7
Problem N-TreePack is fixed parameter tractable with respect to w max + t, where w max is the maximum edge weight and t the treewidth of the input graph.
Proof As the graph G = (V , E) has treewidth t, there is a vertex v ∈ V of degree at most t (here we use the property that G is a simple graph, that is, it has no parallel edges.). As every edge incident to v has weight at most w max , we conclude ntp(G, w) ≤ w 2 max . For every T = 1, . . . , w 2 max , we construct a formula T in monadic secondorder graph logic MSO 2 , so that T is satisfiable if and only if there exists a schedule of objective value at least T . We introduce Boolean variables x e,t for every e ∈ E and every t ∈ {1, . . . , T } to denote whether e ∈ E t . The following statement can be formulated in MSO 2 by routine methods (see for example [9, chapter 7.4
Proof By Lemma 1, we may assume that in an optimal schedule σ of length T all graphs G σ 1 , . . . , G σ T are trees. As these trees are uniquely determined by the ordering in which σ activates the edges, we only need to check and evaluate |E|! cases. Each case is easily checked and evaluated in O(|E| 2 ) time.

Theorem 9
Problem N-TreePack is fixed parameter tractable with respect to the size k of a feedback edge set. There is a kernel with O(k) vertices and edges.
Proof Note that the input graph G = (V , E) satisfies |E| ≤ |V | − 1 + k. We first prove an auxiliary observation on the largest edge weight w max in the graph: We claim that |V | ≥ k + 2 implies ntp(G, w) ≤ w max . Consider an optimal schedule as in Lemma 1, so that |E 1 | = |V | − 1. As every edge in E 1 is certainly inactive from time w max onwards, there remain at most |E| − |E 1 | = |E| − |V | + 1 ≤ k edges that could become active during the next time slot [w max , w max + 1]. As a spanning tree needs at least |V | − 1 ≥ k + 1 edges, this proves the auxiliary observation. As a consequence we get that in an optimal schedule an edge with weight w max without loss of generality may be activated at time 0. Now the kernelization procedure is clear: As long as |V | ≥ k + 2 holds, we contract an edge with largest edge weight. Note that the contraction maintains the inequality |E| ≤ |V | − 1 + k. The resulting kernel satisfies |V | ≤ k + 1 and |E| ≤ 2k.
The last theorem of this section shows that problem N-TreePack is tractable on instances that in a certain sense are close to the preemptive tree packing problem of Nash-Williams. Proof Let E = {e ∈ E : w(e) = 1}. For a schedule σ of objective value T , we denote by D σ = {t : E σ t ∩ E = ∅} the set of time slots [t − 1, t] during which at least one edge of E is active. For every t ≤ T with t / ∈ D σ , graph G t = (V , E t ) is a connected graph in which all edges have weight 1. For each such t with t / ∈ D σ , we introduce another schedule π , where the edge set E t is scheduled in the last time slot [T − 1, T ] instead of the t-th time slot, and all edges activated during [t, T ] are activated one time unit earlier instead. Formally, schedule π is such that Observe that π is also a schedule of objective value T . By repeating this procedure often enough, we conclude that there always exists an optimal schedule σ so that D σ ⊆ {1, . . . , k 2 }. Due to Lemma 1, we can additionally require that each of G 1 , . . . , G T is acyclic. Therefore, the following is an algorithm to solve problem N-TreePack: Iterate over all possible k 2k choices of (σ (e)) e∈E ∈ {1, . . . , k 2 } k . For each fixed choice, the only edges left to schedule are edges of weight one. This can be done optimally the following way: For t = 1, . . . , k 2 , let W t = {e ∈ E : σ (e) < t ≤ σ (e) + w(e)} be the set of edges in E , which are active during the t-th time slot. If some W t has a cycle, we immediately skip to the next choice of (σ (e)) e∈E . Otherwise, consider the matroid F t = {F ⊆ E(G) − E : W t ∪ F is acyclic}. We extend the definition of F t to t > k 2 by setting W t = ∅ in this case. The matroid F t is isomorphic to the graphic matroid of G after contracting each connected component of W t to a single vertex. Now we run Edmond's Matroid Partitioning algorithm [10] to determine the maximal T ∈ N 0 such that E(G) − E contains disjoint sets F 1 , . . . , F T such that F t is a base of F t for all t ∈ {1, . . . , T } (that is, we solve the problem of packing as many bases as possible into a matroid). As Edmond's Matroid Partitioning algorithm runs in O(m 3 ) time, the claimed time complexity follows.

Conclusion
We have analyzed the computational complexity and the algorithmic behavior of nonpreemptive tree packing. The problem is strongly NP-hard even on highly structured and extremely simple graph classes, and we only have a handful of positive results.
There remain many open questions. (Q1) We have shown that N-TreePack can be approximated in polynomial time within a factor of n − 1, and that no approximation factor better than 7/6 is possible (unless P=NP). Where is the true approximation threshold? In particular, we would like to know whether our problem allows a polynomial time approximation algorithm with some constant worst case guarantee. A major step towards an answer might be the analysis of the gap between the non-preemptive optimum and the polynomially computable preemptive optimum. (Q2) If all edge weights are equal to 1, problem N-TreePack coincides with the preemptive problem version and hence is polynomially solvable. On the other hand the problem is NP-hard, if all edge weights are in {1, . . . , 6}. What is the complexity of N-TreePack, if all edge weights are in {1, 2}? (Q3) The problem of deciding whether ntp(G, w) ≥ β is polynomially solvable for every β ≤ 3 and NP-hard for every β ≥ 7. What is the complexity of this question for β ∈ {4, 5, 6}? by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.