• Aucun résultat trouvé

Spanning Trees with Restrictions

Dans le document Algorithms and Computation in Mathematics • (Page 138-143)

Spanning Trees

4.7 Spanning Trees with Restrictions

i=0

|S| i

2|S|.

This establishes the desired complexity bound.

In particular, Theorem 4.6.4 shows that Algorithm 4.6.3 is polynomial in |V| for fixed s. However, the estimate for the complexity given in the proof of Theorem4.6.4is rather bad if we assumerto be fixed; in that case the number of calls of PRIM should better be estimated as about |V|r2. Thus Algorithm4.6.3 is polynomial for fixedr as well. Altogether, we have proved the following result which generalizes the fact that the Steiner network problem can be solved efficiently for the casesr= 2 ands= 0, as noted above.

Corollary 4.6.5 For fixed r or for fixeds the Steiner network problem can be solved with polynomial complexity.

We conclude this section with some recommendations for further reading.

A version of the Steiner network problem for digraphs is considered in the survey [Mac87], and an extensive exposition of the various Steiner problems can be found in the book [HwaRW92]; more recent books on the subject are [Cie98, Cie01] and [ProSt02]; there is also an interesting collection of ar-ticles [DuSR00]. Steiner trees have important applications in VLSI layout;

see [KorPS90], [Len90], or [Mar92]. In this context, one is particularly inter-ested in good heuristics; for this topic, we refer to [Vos92], [DuZh92], and [BerRa94]. As this by no means exhaustive collection of references shows, Steiner trees constitute a large and very active area of research.

4.7 Spanning Trees with Restrictions

In reality, most of the problems one encounters cannot be solved by determin-ing just any (minimal) spanndetermin-ing tree; usually, the solution will have to satisfy some further restrictions. Unfortunately, this often leads to much harder—

quite often even to NP-hard—problems. In this section, we state some of

126 4 Spanning Trees

these problems without discussing any possible strategies for solving them (like heuristics); this will be done in Chap. 15 for the TSP as a prototypical example. Even if there is no weight function given, certain restrictions can make the task of finding an appropriate spanning tree NP-hard. The following five problems are all NP-complete; see [GarJo79].

Problem 4.7.1(Degree constrained spanning tree) Let Gbe a connected graph andka positive integer. Is there a spanning treeTforGwith maximal degree Δ≤k?

Problem 4.7.2(Maximum leaf spanning tree) LetGbe a connected graph and k a positive integer. Is there a spanning tree for G having at least k leaves?

Problem 4.7.3(Minimum leaf spanning tree) LetGbe a connected graph and k a positive integer. Is there a spanning tree for G having at most k leaves?

Problem 4.7.4 (Isomorphic spanning tree) Let G be a connected graph andT a tree (both defined onnvertices, say). DoesGhave a spanning tree isomorphic toT?

Problem 4.7.5(Shortest total path length spanning tree) LetGbe a con-nected graph andk a positive integer. Is there a spanning tree T such that the sum of all distancesd(u, v) over all pairs of vertices{u, v} is≤k?

Four of the preceding five problems reduce easily to results already ob-tained in this book, and so we will include their proofs.

Theorem 4.7.6 Problems4.7.1through 4.7.4are NP-complete.

Proof Problems4.7.1,4.7.3and4.7.4all contain the Hamiltonian path prob-lem HP as a special case. To see this, just note that a spanning tree T is a Hamiltonian path if and only if one (and then all) of the following conditions holds:

All vertices have degree 1 or 2 inT.

T has exactly two leaves.

T is a path.

Hence these three problems are indeed NP-complete by Exercise 2.7.7.

Finally, Problem 4.7.2 can be reduced to the connected dominating set problem CDS, which is NP-complete by Exercise 2.8.7. Thus letG= (V, E) be a given graph. It suffices to show thatGhas a connected dominating set of size at most k if and only if Ghas a spanning tree with at least |V| −k leaves.

First letD be a connected dominating set of G with size at most k. As G|Dis connected, this induced subgraph has a spanning treeTD. We extend TD to a spanning treeT ofGas follows. By definition, any vertexu /∈Dhas a neighbour v∈D; we add the corresponding edgeeu=uv toTU. Doing so for allu /∈D results in a spanning treeT for G, and all these verticesuare leaves ofT by construction. ThusGindeed has a spanning tree with at least

|V| −k leaves.

Conversely, letT be a spanning tree forGwith at least|V| −kleaves. We chooseD as the set of all vertices which are not leaves ofT, so that|D| ≤k.

Also,Dis a dominating set, as each leaf ofT is adjacent to a non-leaf, since we may assume thatGhas at least three vertices. Obviously,TDis a spanning tree forG|D, so thatD is indeed a connected dominating set.

We can neither expect to solve such problems efficiently by some algo-rithm nor to find a nice formula for the value in question—for example, for the maximal number of leaves which a spanning tree ofGmight have. Never-theless, it is often still possible to obtain interesting partial results, such as, for example, lower or upper bounds for the respective value. We illustrate this for Problem4.7.2 and quote a result due to Kleitman and West [KleWe91]

which shows that a connected graph with large minimal degree has to contain a spanning tree with many leaves.

Result 4.7.7 Let l(n, k) be the largest positive integer m such that each connected graph with n vertices and minimal degree k contains a spanning tree with at leastm leaves. Then

(1) l(n, k)≤n−3kn1 + 2;

(2) l(n,3)n4+ 2;

(3) l(n,4)2n+85 ;

(4) l(n, k)≥n(1−blnkk) for sufficiently large k, where b is a constant with b≥52.

We will not include the relatively long (though not really difficult) proof and refer the reader to the original paper instead. The proof given in [KleWe91] consists of an explicit construction of a spanning tree with the desired number of leaves, and thus also implies an efficient algorithm for ap-proximating a solution to the optimisation version of Problem4.7.2, that is, to the problem of finding a spanning tree with the maximal number of leaves.

We shall consider approximation algorithms for hard problems in Chap. 14, using the specific paradigm of the TSP.

We remark that the maximum leaf spanning tree problem remains NP-complete even if we restrict our attention tocubic graphs, that is, to regular graphs of degree 3; this result is due to Lemke [Lem88]. A recent paper of Bonsma and Zickfeld [BonZi11] contains an efficient approximation algorithm which always yields a spanning tree with at least two thirds as many leaves

128 4 Spanning Trees

as an optimal solution. Their algorithm uses connected dominating sets and also yields an efficient approximation algorithm for the minimum connected dominating set problem in cubic graphs.

Let us now turn to some weighted problems with restrictions.

Problem 4.7.8 (Bounded diameter spanning tree) Let G be a connected graph with a weight functionw:E→N, and letdandkbe two positive inte-gers. DoesGcontain a spanning treeT with weightw(T)≤k and diameter at mostd?

According to [GarJo79], this problem is NP-complete. Hence it is NP-hard to find among all minimal spanning trees one having the smallest possible diameter. This remains true even if the weight function is restricted to the values 1 and 2 only; however, it is easy to solve the case where all weights are equal.

Exercise 4.7.9 Give a polynomial algorithm for determining a spanning tree whose diameter is at most 1 larger than the smallest possible diameter. Hint:

Look at Theorem 3.9.8 and Exercise4.1.3.

A variation of Problem 4.7.8 was studied in [HoLC91]: one asks for a spanning tree satisfying w(T)≤k and d(u, v)≤d for all u, v∈V, where d(u, v) is the distance in the network (G, w). This variation is NP-complete as well. However, in a Euclidean graph (that is, the vertices are points in a space Rm and the weights w(u, v) are given by the Euclidean distance), it is possible to find a spanning tree such that the maximum of thed(u, v) is minimal with complexityO(|V|3).

Problem 4.7.10 (Minimal cost reliability ratio spanning tree) Let G be a connected graph with both a weight function w:E→N and a reliability functionr:E→(0,1]; we interpretr(e) as the probability that edgeeworks, and w(e) as the cost of using e. Now let T be a spanning tree. As usual, w(T) is the sum of all w(e) with e∈T, whereas r(T) is defined to be the product of ther(e) for e∈T. Thus w(T) is the total cost ofT, andr(T) is the probability that no edge in the tree fails; see Problem4.5.2. We require a spanning treeT for which the ratio w(T)/r(T) is minimal.

Problem4.7.10is one of the few restricted problems for which a polynomial algorithm is known: if we count all arithmetic operations as one step each, it can be solved inO(|E|5/2log log|V|) steps;4 see [ChaAN81] and [ChaTa84].

Our final example involves two functions on E as well. But this time, the two functions are coupled non-linearly, and our goal is to minimize the resulting function.

4As some of the arithmetic operations concerned are exponentiations, this estimate of the complexity might be considered a little optimistic.

Problem 4.7.11 (Optimum communication spanning tree) Let G be a connected graph with a weight function w:E→N0 and a request function r:V

2

N0, and letk be a positive integer. Denote the distance function in the network (T, w) by d; thus d(u, v) is the sum of the weights w(e) of all edges occurring in the unique path fromutovinT. DoesGhave a spanning treeT satisfying

{u,v}∈(V2)

d(u, v)×r(u, v)≤k?

In practice,d(u, v) signifies the cost of the path fromutov, andr(u, v) is the capacity we require for communication between uand v—for example, the number of telephone lines needed between citiesuand v. Then the product d(u, v)r(u, v) is the cost of communication betweenuandv, and we want to minimize the total cost.

Problem4.7.11is NP-complete even if the request is the same for all edges (optimum distance spanning tree); see [JohLR78]. However, the special case where all weights are equal can be solved in polynomial time; see [Hu74] for an algorithm of complexityO(|V|4). But even this special case of Problem4.7.11 (optimum requirement spanning tree) is much more difficult to solve than the problem of determining a minimal spanning tree, and the solution is found by a completely different method. We shall return to this problem in Sect. 12.4.

The general problem of finding spanning trees which are optimal with respect to several functions is discussed in [HamRu94].

We conclude this section with another difficult variation on the MST prob-lem, where we want to span not the entire graph, but only a given number of vertices:

Problem 4.7.12(k-minimal spanning tree problem) LetGbe a connected graph with a non-negative weight functionw:E→R, and letkbe a positive integer. Find a sub-tree T of Gwith minimal weight such that T spans at least (or exactly)k vertices.

Some authors prefer to work with the rooted version of Problem 4.7.12, where one also prescribes a special vertex r which must be included in the solution; we can then think of the admissible trees as rooted at r. Clearly, the unrooted version above can be reduced to the rooted one by simply considering the rooted case for every possible choice of r.

Problem4.7.12is NP-hard by a result of Fischetti et al. [FisHJM94], even for points in the Euclidean plane. However, there are good approximation algorithms available; see [AroKa06] and the references given there.

130 4 Spanning Trees

Dans le document Algorithms and Computation in Mathematics • (Page 138-143)