1.1. The Minimum -Section Problem
We start with a few definitions. A -section in a graph is a partition of its vertex set into sets whose sizes are as close to equal as possible. The width of a -section is the number of edges between the sets and is denoted by . The minimum width among all -sections in a graph is denoted by . The goal of the Minimum -Section Problem is to compute and a corresponding -section for a given graph and an integer . This problem has many applications, e.g. in parallel computing, when tasks have to be evenly distributed to processors while minimizing the communication cost.
The special case where , which is also called the Minimum Bisection Problem, is known to be NP-hard for general graphs, see . Jansen et al.  use dynamic programming to compute a minimum bisection in a tree on vertices in time. Their method can be turned into an algorithm for computing a minimum -section in trees, whose running time is polynomial in but not in . However, when is part of the input, cannot be approximated in polynomial time within any finite factor on general graphs unless PNP, see . The reduction presented there is from the strongly NP-hard 3-Partition Problem and it is easy to adjust it in order to show that the Minimum -Section Problem restricted to forests cannot be approximated within any finite factor unless PNP.
Feldmann and Foschini  studied minimum -sections in trees, and pointed out some counterintuitive behavior even on this rather restricted class of graphs. Moreover, they showed in  that the Minimum -Section Problem remains APX-hard when restricted to trees with maximum degree at most 7, and that, for any , it is NP-hard to approximate within a factor of for trees with constant diameter.
Here, we study the Minimum -Section Problem in trees and focus on bounded-degree trees with linear diameter. Moreover, we extend our results to tree-like graphs. Our first result gives an upper bound on the width of a minimum -section in trees and a corresponding algorithm.
For every integer and for every tree on vertices, a -section in with
can be computed in time.
Here, as usual, and denote the maximum degree of and the diameter of , respectively, where the latter is defined as the length of a longest path in . Obviously, for , any graph on vertices has essentially only one -section, so we can assume without loss of generality that and, hence, the running time in Theorem 1 is always polynomial in the input length.
Let and be two constants. Then, for any tree on vertices with and , the factor from the previous theorem is bounded by a constant that depends only on and . As every -section of a tree has width at least , this yields a constant-factor approximation for for such a class of trees.
For all and , there is a constant such that the following holds. Let be a class of trees such that every tree on vertices satisfies and . Then there is a -approximation for the Minimum -Section Problem restricted to the class . In particular, one can choose .
Next, we extend our focus in this paper in two ways. On the one hand, we can improve the upper bound so that it becomes polylogarithmic in . Moreover, we now move from trees to graphs with a given tree decomposition. Here, instead of bounding the width of a -section in terms of the diameter, we define a parameter that roughly measures how close the tree decomposition is to a path decomposition, which is defined as a tree decomposition where the decomposition tree is a path. For example, suppose that we were given a graph with a path decomposition of of width . Then it is easy to see that allows a bisection of width at most by walking along the path until we have seen vertices of in the clusters, and then bisecting there. In other words, finding a -section of the graph of small width becomes easier when there is a path in the tree decomposition of whose clusters contain many of the vertices of .
For the precise definition of the parameter , consider a tree decomposition of a graph with . The relative weight of a heaviest path in is denoted by
where denotes the number of vertices of . Observe that . Moreover, define the size of as , which roughly measures the encoding length of .
For every integer , for every graph and every tree decomposition of of width at most , a -section in with
can be computed in time, when the tree decomposition is provided as input.
Again, as in the case of trees in Theorem 1 and Corollary 2, a constant-factor approximation for a certain class of tree-like graphs is obtained. More precisely, fix , , and define . Consider a class of connected graphs such that every graph satisfies and allows a tree decomposition of width at most and . Then, there is a -approximation for the Minimum -Section Problem restricted to the graph class .
1.3. Related Work
The results presented here rely on our earlier work concerning the Minimum Bisection Problem, in particular the following theorem.
Theorem 4 (Theorem 1 in ).
For every tree a bisection in with
can be computed in time.
Although Theorem 1 and Theorem 4 look quite similar, it does not seem possible to directly apply Theorem 4 to yield a recursive construction of a -section that satisfies the bound presented in Theorem 1. Indeed, it is known that, even when is a power of , the natural approach to construct a -section in a graph by recursively constructing bisections can give solutions far from the optimum, even when a minimum bisection is used in each step, see . Furthermore, in the setting that we are considering here, i.e., bounded-degree trees with linear diameter, nothing is known about the diameter in the two subgraphs that are produced by Theorem 4. So, after the first iteration, the diameter of one part of the bisection could be as low as , and indeed such parts can be produced by the algorithm contained in Theorem 4. For example, consider the tree obtained from a perfect ternary tree on vertices and a path on vertices by inserting an edge joining the root of and a leaf of . The algorithm111To give some more details, this algorithm computes a longest path in , which must contain all vertices from as well as . Then, it computes a -labeling, as introduced in Section 3.2 ahead, which can label the vertices of with and the vertices in with . Then, the algorithm checks whether there is a vertex such that where we identified the vertices with their labels. This is the case for and, hence, the bisection with and is output. For further details see Section 6.1 in . contained in Theorem 4 can output the bisection with and , which is in fact the unique minimum bisection in . In the next round, a bisection in is needed, which has width . Thus, a -section of width is obtained, whereas creftype 1 promises that allows a -section of constant width.
Observe that, when only the universal bound is available for the diameter of a bounded-degree tree on vertices, then creftype 4 yields a bound of for the width of a bisection.
1.4. Further Remarks
The results presented in creftype 1 and creftype 3 do not only hold for -sections but also for cuts , i.e., partitions of the vertex set of the considered graph, where the sizes of the sets are specified as input. Furthermore, the bound in creftype 1 can be improved to
Observe that this is slightly stronger than the bound implied by creftype 3 and the fact that every tree allows a tree decomposition of width at most one with and . Moreover, extensions to -sections in trees with weighted vertices have recently been investigated, see .
1.5. Organization of the Paper
Section 2 introduces some notation for cuts in general graphs as well as some tools for trees, which will then be used in Section 3 to show creftype 1. Moreover, in Section 3.4, it is argued that the bound on the width of the -section in creftype 1 can be improved as claimed in (1). Section 4 concerns tree-like graphs. First, in Section 4.1, the notation for tree decompositions is settled and selected tools for tree-like graphs are presented. Second, the proof for creftype 3 is given in Section 4.2-4.4. Since the proofs in Section 3 and Section 4 follow the same ideas, we do not repeat the full details for the case of tree-like graphs in Section 4 but focus on the aspects that become more involved when dealing with a tree decomposition and refer to Section 3 whenever possible.
First, for , define . Moreover, for a real denote by the largest integer and denote by the smallest integer . Consider an arbitrary graph on vertices. For a set , we use to denote the subgraph of induced by and for we define . A cut in is a partition of , where is arbitrary and empty sets are allowed. An edge of is cut by a cut if there are distinct with and . The width of a cut in is defined as the number of edges of that are cut by and is denoted as . For , a -section in is a cut in with for all . A -section in that satisfies for all -sections in is called a minimum -section in and its width is denoted by .
Recall that the diameter of a tree is the length of a longest path in , i.e., . In the following, we need to compare the diameter of trees with different numbers of vertices and during our construction also non-connected forests may arise. Consider a forest on vertices and denote by the connected components of . Then, the relative diameter of is defined as
The term denotes the number of vertices on a longest path in the component and for a tree the relative diameter equals the proportion of vertices on a longest path in . Using this notation, we can state the version of creftype 4 which we will employ in Section 3. It follows from Theorem 1 in  and the comments in Section 1.4 there. When considering a cut in a graph with exactly two sets, we use and for these sets and refer to them as the black and the white set of the cut.
Theorem 5 (similar to Theorem 1 in ).
For every forest on vertices, for every , a cut with and
can be computed in time.
The previous theorem allows to cut off an arbitrary number of vertices in a bounded-degree tree and guarantees a small cut width if the diameter is large. The next tool relaxes the size-constraint on the set . Let be a graph. For an integer , a cut in is called an approximate -cut if . The next lemma states that every bounded-degree tree allows an approximate cut of small width, even when the diameter is small.
Lemma 6 (approximate cut in forests).
Let be a tree on vertices and fix a vertex . For every integer , an approximate -cut with and can be computed in time.
The previous lemma is similar to Lemma 7 in  but as the bound on claimed here is smaller we present a sketch of its proof.
Sketch of Proof for Lemma 6..
Let , , , and be as in the statement. If , define . Otherwise, root in and, for , denote by the set of descendants of . It is easy to check that there is a vertex such that and for all children of . If there is a child of with , define . Otherwise, the set can be constructed greedily from the sets where is a child of . Then, the cut with has the desired properties and can easily be computed in linear time. ∎
3. Minimum -Section in Trees
The aim of this section is to prove creftype 1 about -sections in trees. Section 3.1 introduces the main lemma that immediately implies the existence part of the desired theorem and Section 3.2 presents the proof of the main lemma. All algorithmic aspects of creftype 1 are presented in Section 3.3. Finally, Section 3.4 argues that the bound on the width of the -section in creftype 1 can be improved as stated in (1).
3.1. Proof of creftype 1
The aim of this section is to prove our main result for trees. As mentioned in Section 1.3, constructing a -section by bisecting the graph repeatedly does not yield the bound provided by creftype 1. So we follow a different approach: The main idea is to cut off one set for the -section at a time while ensuring that the relative diameter of the remaining forest does not decrease. This is made precise by the next lemma, which looks similar to creftype 5 but is more powerful, as it contains additional information on the relative diameter of the subgraph induced by the white set of the cut.
For every forest on vertices and for every , there is a cut in with , that satisfies and
Observing that now yields the existence part of creftype 1.
3.2. Proof of Lemma 7
Consider a forest on vertices and fix an integer . The main idea is to apply creftype 5 to a carefully chosen subgraph , which then yields the set for the desired cut in . On the one hand, needs to have large relative diameter such that the bound on the cut width provided by creftype 5 is low when applied to . On the other hand, the relative diameter of the graph induced by the white set of the computed cut will roughly be the relative diameter of , so needs to have a large relative diameter. Note that these two conditions compete against each other.
If , then and a cut with the desired properties is easy to construct. So assume that . Without loss of generality, we may assume that is connected as otherwise edges can be added to to obtain a tree whose relative diameter is equal to and maximum degree . Set , let be a longest path in and observe that . Denote by and the two leaves of . When removing all edges in from , then decomposes into trees, one tree for every . For each , let . For , the unique vertex with is called the path-vertex of . When labeling the vertices of a graph with , we say that the vertices in receive consecutive labels if there are such that each vertex in receives one label in and every label in belongs to exactly one vertex in . A -labeling of is a labeling of the vertices of with such that the following holds:
For each , the vertices of receive consecutive labels and has the largest label among all vertices in .
For all with , if is closer to than to , then the label of is smaller than the label of .
Identify each vertex with its label and consider any number that differs by a multiple of from a label in to be the same as this label. When talking about labels and vertices, in particular when comparing them, we always refer to the integer in . For three vertices with , we say that is between and if , , or if starting at and going along the numeration given by the labeling reaches before . If , then we say that is between and if . For example, when , we say that is between and , and is between and . For technical reasons, we will refer to the pair as an edge of , even though does not contain such an edge. For a vertex , the vertex is the vertex after on if the tree contains the vertex . Then, is called the edge after on . Similarly, in this case, is called the edge before on and is called the vertex before on .
For two vertices , the -distance of and is defined as
It is easy to see that
Recall that was defined to be an end of . Now, define for all . Then, and
Thus, there are two vertices with
The fact that is an integer for all , and (2) implies that there is a vertex with . Let and be the path-vertices of and , respectively. Define . Set and note that or . Furthermore, as is not counted in , we have . Define
In the following figures, the path will be drawn in the top and the trees for are drawn underneath . The vertices in that are counted in will be colored gray.
Case 1: and .
Define and . Then , see Figure 0a). Furthermore, and
Case 2: and .
Let be the path-vertex of . Observe that as otherwise and , which contradicts . None of the edges in is cut by when , i.e., when is the vertex before on , and this case is treated separately for technical reasons.
Case 2a: .
Analogously to Case 1, the cut with and satisfies all requirements, see Figure 0b).
Case 2b: .
First, observe that the cut might cut too many edges in the tree . Moreover, the cut cuts few edges, but using creftype 5 to cut off vertices from might yield a too large bound. The reason for this is that the relative diameter of can be much less than , for example when contains vertices and is small. So, instead of using , we will now define a set such that cuts few edges, contains all vertices counted by , and , which will ensure that .
Let , which satisfies as . Lemma 6 guarantees an approximate -cut in with and . Define and note that . Furthermore, as and , we have that . The graph consists of at least two components as and there are no edges between and , see Figure 2. Therefore,
Now, creftype 5 guarantees a cut in with and . Let and . Every vertex from that is not counted by is in by construction. Consequently,
which implies that .
To estimate the width of the cut, consider first the cut . The cut cuts at most edges within . Recall that . Now, if is the vertex before on , then and other than the edges in only edges incident to are cut by . Otherwise, at most edges incident to are cut by as either or the edge after on exists and is not cut. Then, from the edges incident to that are cut by , only the edge before on is not yet counted. Consequently, . Using that cuts at most edges in gives the desired bound on the number of cut edges.
Case 3: and .
This case is similar to Case 2b, but some arguments need to be adjusted as the labeling cannot simply be reversed to obtain a labeling with the same properties due to the requirement that each receives the largest label among all vertices in . Denote by the path-vertex of . As in Case 2b, let and let be an approximate -cut in with and . For technical reasons, the case when is treated separately.
Case 3b: .
see Figure 2b). This definition of is slightly different than in Case 2b, as here but is in instead of , which will decrease the bound on the number of cut edges. Now, contains exactly vertices of . One can argue similar to Case 2b that as well as that satisfies . Then, creftype 5 guarantees that there is a cut in with and . Define and . As mentioned before, vertices of are in . Therefore, at most vertices of are in and, as in Case 2b, it follows that . Since and , it follows that . Hence, the desired bound on is obtained. This completes the proof of Lemma 7.
3.3. Algorithm for Trees
To achieve the running time in creftype 1, it suffices to argue that a cut with the properties claimed by Lemma 7 can be computed in linear time. More precisely, consider a forest on vertices and fix an integer . The aim is to compute a cut in in time with that satisfies and . The algorithm described here follows the construction presented in Section 3.2, which works for trees with maximum degree at least . So assume for now that has these properties.
First, the algorithm computes a longest path in , which takes time222The following well-known procedure due to Dijkstra computes a longest path in a tree . Root in an arbitrary vertex and compute a leaf at maximum distance from . Root in and compute a leaf at maximum distance from . Then, the unique -path in is a longest path in .. Recall that the ends and of were called and in Section 3.2. To compute a -labeling, the algorithm rearranges the adjacency list of such that is the first entry in the adjacency list of for all . Then, the algorithm traverses the tree with a depth-first search starting in and labels each vertex when it turns black (i.e., when the processing of the vertex finishes, see the notation in ). It is easy to see that the computation of the -labeling takes time proportional to and that it can be stored such that converting between vertices and labels and vice versa takes constant time. In the implementation, we do not change the vertex names or identify vertices with their labels as in Section 3.2. Furthermore, while computing the -labeling, the algorithm computes for each vertex , i.e., the number of vertices of that are already labeled right before is labeled. Now, for all where and a vertex with and or can be computed in time. Using that the algorithms contained in creftype 5 and Lemma 6 take linear time, it follows that a cut with the desired properties can be constructed in time. For more details see Chapter 6.2 in .
To conclude, consider the case when is not a tree with . Clearly, if , a cut in with the desired properties can be computed in time. If is not connected and , the algorithm adds edges to until a tree with and is obtained. More precisely, these additional edges need to join the ends of two longest paths in different components of . As each connected component of is a tree, a longest path in can be computed in time as mentioned above. Since holds for every cut in , the procedure described above can be applied to to obtain the desired cut in .
3.4. Remarks on Improving creftype 1
To improve the bound on the cut width in creftype 1 as stated in (1), recall that the proof of Lemma 7 uses creftype 5 to estimate the width of the cut in . The bound on the cut width in creftype 5 can be improved to
Last but not least for -sections in trees, we mention that it does not seem to be obvious whether our algorithm or its analysis can be modified to obtain a linear time algorithm. More precisely, it is not clear how to reduce the dependency on in the running time.
4. Minimum -Section in Tree-Like Graphs
This section concerns the proof of creftype 3 about -sections in tree-like graphs. We begin with presenting the definition and some facts about tree decompositions as well as some tools for tree-like graphs in Section 4.1. As in the proof of creftype 1, Section 4.2 presents a lemma that immediately implies the existence part of creftype 3 and is proved in Section 4.3. The main idea is similar to the proof in Section 3.2. Hence, Section 4.3 focuses on the aspects that are more involved than in the case of trees and refers to Section 3.2 for steps that are analogous to the case of trees. All algorithmic aspects of creftype 3 are presented in Section 4.2. A detailed proof of creftype 3 can be found in Chapter 6.3 in .
4.1. Preliminaries for Tree Decompositions
Let us start by recalling the definition of a tree decomposition.
Let be a graph, be a tree, and with for each . The pair is a tree decomposition of if the following three properties hold.
For every , there is an such that .
For every , there is an such that .
For all and all on the (unique) -path in , we have .
The width of is defined as . The tree-width of , denoted by , is the smallest integer such that allows a tree decomposition of width .
Consider a graph and a tree decomposition with of . To distinguish the vertices of from the vertices of more easily, we refer to the vertices of as nodes. Furthermore, for , we refer to the set as the cluster of that corresponds to , or simply the cluster of when the tree decomposition is clear from the context. It is easy to show that (T3) is equivalent to the following condition.
For every , the graph is connected, where .
Consider a graph and a tree decomposition with . In order to apply a procedure to a subgraph , it is often necessary to construct a tree decomposition of . For this purpose, the tree decomposition induced by in is defined by and for all , where . Observe that is indeed a tree decomposition of as well as that the width and the size of are at most the width and the size of , respectively. Usually, some clusters of an induced tree decomposition are empty, which can be avoided with the following concept. A tree decomposition of a graph with