On the SPANNING k-TREE problem

On the SPANNING k-TREE problem

Discrete Applied North-Holland Mathematics 139 44 (1993) 139-156 On the SPANNING problem k-TREE Leizhen Cai and FrCdkric Maffray Department of C...

1MB Sizes 12 Downloads 113 Views

Discrete Applied North-Holland

Mathematics

139

44 (1993) 139-156

On the SPANNING problem

k-TREE

Leizhen Cai and FrCdkric Maffray Department of Computer S&me, Received 15 September Revised 15 September

University of Toronto, Toronto, Ont.. Canada MSS 1.44

1990 1992

Abstract Cai, L. and F. Maffray,

On the SPANNING

k-TREE

problem,

Discrete Applied

Mathematics

44

(1993) 139-156. A k-tree T is defined recursively neighbourhood NING k-TREE” contains

as being either a clique of size k or a graph having a vertex x whose

is a clique of size k and such that T-x is a k-tree. We consider problem:

Given a graph

G, does G possess a subgraph

every vertex of G? This problem

NP-complete

when the input is restricted

3k+2. We show that the SPANNING graphs with maximum

is known

the following

to be NP-complete.

We prove that it remains

to the classes of split graphs or graphs with maximum

2-TREE problem remains NP-complete

degree at most 6. We present polynomial-time

ning k-tree problem when the input graph is a split-comparability

“SPAN-

which is a k-tree and which degree

when restricted to planar

algorithms

that solve the span-

graph or an interval graph.

1. Introduction

In this paper, all graphs are connected, undirected and have no loops or multiple edges. Standard terminology and notation can be found in [3]. It is well known that a graph G is connected if and only if it possesses a spanning tree, i.e., a tree consisting only of edges of G and containing every vertex of G. Indeed, exploring the edges and vertices of a connected graph along a spanning tree is an important preliminary step in many algorithms on graphs. See for example [lg] for an expose on this topic. The concept of tree has been generalized in the following way. A vertex x of a graph G is called simplicial if its neighbourhood No(x) induces a clique; and ksimplicial if this clique is of size k. A graph T is called a k-tree if and only if it satisfies one of conditions (i), (ii): (i) T is a clique of size k; (ii) T has a k-simplicial vertex x such that T-x is a k-tree. Correspondence to; Dr. L. Cai. Department toon, Sask., Canada

0166-218X/93/$06.00

of Computational

Science, University

of Saskatchewan,

S7N OWO. E.mail:[email protected]

0

1993 -

Elsevier

Science

Publishers

B.V. All rights

reserved

Saska-

L. Cai, F. Maffray

140

Definition 1.1. Let G = (V,“,E) be a graph and k a positive of G is a k-tree T= (V, F) such that FL E.

integer.

A spanning

k-tree

It is clear that l-trees are the same as trees. As trees are used in constructing minimum cost networks, k-trees (with kz 2) can be used in constructing reliable networks. Farley [8] introduced the concept of isolatedfailure immune (ZFZ) networks, as networks in which the isolated failure of communication sites and lines will not affect the communication amongst operative sites. He showed that 2-trees are minimum IF1 networks, and asked about the complexity of the recognition of IF1 networks. Later, Farley and Proskurowski [9], and Wald and Colbourn [19] proved that any minimum IF1 network is a 2-tree. Therefore, the existence of a spanning 2-tree in a communication network is crucial to the reliability of the network when isolated failures of sites and lines occur, and the recognition of IF1 networks is equivalent to the recognition of those graphs that have a spanning 2-tree. In light of this, we consider the problem of deciding whether a graph possesses a spanning k-tree for a fixed integer k. SPANNING L-TREE. Input: A graph G; Question: does G possess

a spanning

k-tree?

This problem has been studied by Bern in [4]. Bern has shown that SPANNING k-TREE is NP-complete whenever kr2. In this paper, we will show that the problem is NP-complete when the input is restricted to any of several classes of graphs with “strong” properties. The main results can be summarized as follows. Theorem 1.2. SPANNING k-TREE is NP-complete for all kr 2, even when the input is restricted to any of the following classes: split graphs; graphs with maximum degree at most 3 k + 2; planar graphs (for k = 2). Sections 3,4 and 5 are devoted to the proof of this theorem. In Section 6, we give polynomial algorithms that find a spanning k-tree (if any) in split-comparability graphs and interval graphs. In the next section, we present some useful definitions and properties of k-trees.

2. Properties

of k-trees

In this section, we will review some important properties of k-trees and present results on spanning k-trees in k/-trees. Characterizations of k-trees have been given by Beineke and Pippert [2] and by Rose [16]. Important results about k-trees can also be found in [l] and [6] among others. One should remark that an induced subgraph H of a k-tree is not necessarily a

The SPANNING

k-tree,

even if H is connected.

However,

141

k-TREE problem

the definition

of a k-tree

means

that

a

graph T with t vertices is a k-tree if and only if there exists an ordering ul, . . . , ut of vertex of the vertices of T such that { ui, . . . , ok} is a clique and Ui is a k-simplicial the k-tree T[u,, . . . , ui], for k< is t. This ordering may be called a k-simplicial elimination ordering (k-SEO) of T. Some of the well-known properties of k-trees are summarized in the following theorem. Their proofs are straightforward by using k-SE0 together with induction on the number of vertices. 2.1. Let k be a positive integer, T be a k-tree with t vertices, and u be a vertex of T. Then: (a) T contains no chordless cycle of length at least 4; (b) T contains no clique of size k + 2; (c) T has exactly kt - (“:I) edges; (d) T has exactly t - k cliques of size k + 1; (e) either T is a k-clique or every maximal clique of T is of size k + 1; (f) the neighbourhood of any vertex of T is a (k - I)-tree;’ (g) if t > k, every vertex of T has degree at least k; (h) T has no cutset of size less than k.

Theorem

A graph is chordal if it contains no induced chordless cycle of length at least 4. So property (a) says that every k-tree is chordal. It is well known that every nonempty chordal graph possesses a simplicial vertex [7]. Actually, a graph is chordal if and only if it admits a simplicial elimination ordering (SEO), i.e., an ordering u,, . . . , u, of its vertices such that ui is simplicial in the subgraph induced by { Ui, . . . , u,}. Such an ordering can be found in linear time as proved in [17]. It is easy to see that any SE0 of a k-tree must be a k-SEO; thus k-trees can be recognized in linear time. We now present two results on spanning k-trees in a k’-tree. A vertex u of a graph G such that No(u) = V- {u} will be called universal. Lemma 2.2. Every k’-tree T’ with k’z kz 1 possesses a spanning k-tree T with the property (P) that every k’-clique of T’ contains a k-clique of T. Proof. Without loss of generality we may assume k’> k. Let T’ be a k/-tree with t vertices ul, . . . , ut, and let u be the last vertex in a given k’-SE0 of T’. We show that a spanning k-tree T of T’ with property (P) exists by induction on t. If t = k’, then T’ is a clique and we may take for T the k-tree whose maximal cliques are {ui,, . ..) uj+k} (i=l, . . . . t-k). Note that (P) holds clearly. If t> k’, we apply the induction hypothesis to T’- u: there exists a spanning k-tree T” of T’- u, with the property that every k’-clique of T’- u contains a k-clique of T”. In particular, the neighbourhood of u in T’- v is a k’clique Q’, and so it con1 With the convention

that a O-tree is a graph

with no edges.

142

L. Cai, F. Maffray

tains a k-clique Q of T”. Let T be the graph obtained by adding to T” the vertex o and all the edges between o and Q. Clearly T is a spanning k-tree of T’. Moreover, T satisfies (P). Indeed, we already know that every k’-clique of T’ that does not contain v contains a k-clique of T”, and thus of T. Furthermore, every k’-clique of T’ that contains v excludes exactly one vertex u of N,,(v). If uc$ V(Q) then we are done; else the remaining k - 1 vertices of Q together with v form a k-clique of T. 0 Lemma 2.3. Let G be a graph, and G’= G + KP be the graph obtained by adding

all possible edges between G and a p-clique KP. Then G has a spanning k-tree if and only if G’ has a spanning (k + p)-tree. Moreover, we have again the property (P) that every spanning (k +p)-tree T’ of G’ contains a spanning k-tree T of G such that every (k+p)-clique of T’ contains a k-clique of T. Proof. Clearly, it suffices to prove this lemma for p= 1; a simple inductive procedure will imply its validity for all positive values of p. Let u be the universal vertex added to G in order to form G’= G+K,. Suppose that T is a spanning k-tree of G. It is easy to see that the spanning subgraph T’ of G’, obtained by adding to T the universal vertex u and all the edges incident to u, is a (k + 1)-tree. Indeed, if vt, . . . , v, is any k-SE0 of T then u, vl, ,.. , v, is a (k+ l)SE0 of T’. Conversely, suppose that T’ is a spanning (k+ I)-tree of G’. We will prove the desired result by induction on the number n of vertices of G. The fact is trivial if n = k; simply take T= T’- u. Now assume n> k and let v be the last vertex in a (k+ l)-SE0 of T’. If v = U, then T’- v is a spanning (k+ 1)-tree of G. By the preceding lemma, there exists a spanning k-tree T of G such that T and T’ satisfy property (P). If v # U, then note that T’- v is a spanning (k+ 1)-tree of G’- v and apply the induction hypothesis (on n) to G- v. We obtain a spanning k-tree T” of G - v, such that T” and T’- v satisfy property (P). In T’, the neighbourhood of v is a (k+ l)clique. By (P), this clique contains a k-clique Q of T”. Thus by adding to T” the vertex v and the edges between v and Q we obtain a k-tree T which spans G. It is a routine matter, just like in the proof of the preceding lemma, to check that T and

T’ satisfy property

(P).

0

3. Split graphs As noted before, a k-tree can be defined by the existence of a k-simplicial elimination ordering of its vertices. It may seem that this similarity between k-trees and chordal graphs would cause the SPANNING k-TREE problem to be polynomially solvable when the input is restricted to the class of chordal graphs. We will see that it is not the case (unless P=NP), by considering a subclass of chordal graphs. A split graph [13,14] is any graph whose vertex set can be partitioned into a clique Q and a stable set S. Clearly, any split graph is chordal; but the converse it not true.

The SPANNING

k-TREE

Theorem 3.1. For fixed k? 2, the problem SPANNING even when restricted to the class of split graphs. To prove this theorem,

it suffices

143

problem

k-TREE is NP-complete

to show that the problem

of the satisfiability

of Boolean formulas with three literals per clause can be polynomially reduced to the problem of the existence of a spanning k-tree in an appropriately designed split graph. We recall the definition of the 3-SATISFIABILITY problem. Let x1, . . . ,x,, be a collection of Boolean variables, i.e., variables that take value from the set (0, l}. For each variable x, there are two literals: x and R = 1 -x. A cubic clause consists of the Boolean sum of three literals from the set {xi, . . ..x.} U {Rt, . . ..X.,}; a clause is equal to 1 if and only if at least one of its literals is equal to 1. A cubic Boolean formula 9 consists of the Boolean product of a finite number of cubic clauses c r, . . . , C,; $ is equal to 1 if and only if every clause is equal to 1. The formula 9 is then said to be satisfiable if there exists a O-l assignment to the Boolean vector x=(x,, . ..) x,) for which every clause Cj is equal to 1 (j= 1, . . . , m). The problem “given a cubic Boolean formula, is it satisfiable?” is called 3-SATISFIABILITY. The following theorem is a cornerstone of the theory of computational complexity.

Theorem 3.2 (Cook

[5]). KSATISFZABZLITY

is NP-complete.

Proof of Theorem 3.1. Clearly, the problem SPANNING k-TREE is in the class NP; we can guess a spanning subgraph H of G, and decide in polynomial time whether N is a k-tree. Now we show that 3-SATISFIABILITY is reducible to SPANNING k-TREE. Consider an instance of the 3-SATISFIABILITY problem, i.e., a cubic Boolean formula:

on n Boolean variables x ,, . . . ,x,. We are going to build a split graph G that possesses a spanning k-tree if and only if 9r is satisfiable. For now we treat the case

k=2. Lemma 3.3 (The Forcing Lemma). Let G be a graph, e = xy an edge of G, and T a spanning 2-tree of G. Suppose that there exists a vertex f (e) whose neighbours in G are exactly x and y. Then e E T. Proof. If T is a spanning 2-tree of G, it must contain f(e). Note that T is not a 2-clique because G has at least three vertices. Recall that every vertex of a nontrivial 2-tree belongs to a clique of size 3. However, the only 3-clique containing f(e) is {f(e),x, y}; hence the edges xf(e), yf(e) and xy must all be in T. 0

144

L. Cui, F. Maffray

This lemma will be used during the construction of G: we will say that we “force” an edge e with both extremities in Q to mean that we add a vertexf(e) in S and edges from f(e) to the two extremities of e. By the Forcing Lemma, every forced edge will have to belong to any spanning 2-tree of G. Vertex f(e) will be called a “forcing” vertex. Now we build the graph G. For each variable xi, G has a minicomponent I’M; consisting of a 4-clique {a;, bj, a;, bj). All the edges inside Mi are forced except ai bi and albi. For reasons that will soon become clear, these two edges will be denoted by xj and by Xi respectively and will be called “literal edges”. Lemma). Suppose that T is a spanning 2-tree of G. Then T contains exactly one of the literal edges xi, Zi, for each i = 1, . . . , n.

Lemma 3.4 (The Variable-Setting

Proof. By the Forcing Lemma, T must contain the four edges of Mi. If T contains none of the other two edges (i.e., Xi and Xii), then the four forced edges form a chordless cycle in T, a contradiction to item (a) of Theorem 2.1. If T contains both edges Xi, Ri, then Mi induces a 4-clique in T, a contradiction to item (b). 0 Now Q consists of all the vertices in M, U .+aU A4,, as well as u and u. All edges between two vertices of Q are in G-in other words, Q induces a clique of G. For each i with 1 siln, we force the edges ua;, ual, ual; we also force the edge uu. No edges of Q are forced other than those already mentioned. An edge of Q that is neither forced nor literal will be called “dummy”. All the forcing vertices are put in S. Each clause C’ of g is a new vertex in S. We consider any literal that appears in Cj: If this literal is Xi for some i, we add the edges Cj a; and Cj bi; if it is Xi, we add the edges Cj ai and C’ bj. There is no edge between any two vertices of S. It is clear that G is a split graph, and that it can be built in polynomial time in the size n + m of 9. (The set Q has 4n + 2 vertices; there are 7n + 1 forced edges inside Q, and thus as many forcing vertices in S; and S also contains the m clause vertices.) Let us assume that G has a spanning 2-tree T. We will define a O-l assignment such that .9’(r) = 1. By the Variable-Setting Lemma, for each i, exr=(rl,*.*,r,) actly one of the edges Xi, X; is in T. If Xi is in T, we set Ti = 1; else we set & = 0. Let T’ be the subgraph of T induced by Q. By the Forcing Lemma we know that T’ contains all the forced edges, the number of which is 7n + 1. In addition, by the Variable-Setting Lemma, T’ contains exactly one of x,, X; for each i. Thus T’ has exactly 8n + 1 edges and 4n + 2 vertices, and so the equality IE(T’)I = 2 1V(T’)I - 3 holds. Comparing this equality with item (c) of Theorem 2.1, we conclude that T’, and thus T, contains no other edge of the subgraph induced by Q. In particular, T contains no dummy edge. Now we consider a clause Cj. By the construction, the neighbourhood of Cj in

The SPANNING

145

k-TREE problem

G consists of six vertices of Q, matched two by two by three literal edges (which may or may not be in T). Except for these three edges, all edges between these six vertices are dummy and thus do not belong to T. Since T must contain Cj, necessarily one of these three literal edges extends to a 3-clique of T containing Cj. It follows that the value assigned to the corresponding literal is 1 and that Cj is satisfied by this literal. Since this reasoning can be repeated for any clause, we obtain that g_(t) = 1. Conversely, let us assume that 9 is satisfiable. Let r = (rt, . . . , <,) be a O-l assignment for which 9= 1. We will build a spanning 2-tree T of G as follows. Step 1. For each i with 1 I iln, if & = 1 we put in T the edge Xi; else (& = 0) we put in T the edge Xi. Step 2. We put in T all the forced edges and all the edges incident to a forcing vertex. Step 3. Consider each clause vertex Cj of G. Since 9 is satisfied by the Boolean vector r, there exists at least one literal in the clause Cj that is equal to 1. Thus there exists at least one literal edge Xi or Xi that is adjacent to Cj and is in T, by Step 1. If there are two or three such literal edges, we arbitrarily choose one of them. We then put in T the edges between Cj and the two extremities of this edge. It remains to verify that T is a 2-tree, which we do by exhibiting a 2-SE0 of T. (This 2-SE0 is presented under the clearly equivalent form of a 2-simplicial vertexelimination procedure.) Observe that the neighbourhood in T of a forcing vertex or a clause vertex u is a 2-clique, by Steps 2 and 3. Therefore, we may remove all such vertices one by one. Now we check that the remaining subgraph T’ of T (induced by Q) is a 2-tree. For each i, if the edge Xi is in T’, then we remove the vertices bj, 6,, ai, alin this order as they become 2-simplicial in T’; if the edge pi in is T’, then we remove the vertices bi, 61, ai, al in this order as they become 2-simplicial in T’. What is left is the 2-clique formed by u and u. Thus our elimination procedure is a 2-SE0 of T. This completes the proof of the case k = 2. For kr 3, we consider the split graph Gk = G + Kk_2 obtained by adding to the graph G built in the case k= 2 a set U of k- 2 universal vertices. By Lemma 2.3, Gk has a spanning k-tree if and only if G has a spanning 2-tree, which in turn is equivalent to @ being satisfiable. D Since every split graph is chordal, co-chordal (i.e., its complementary chordal), and perfect [14], we obtain the following corollary.

graph

is

3.5. The problem SPANNING k-TREE is NP-complete when the input is restricted to any of the classes of chordal, co-chordal, or perfect graphs. Corollary

4. Graphs with hounded

degree

Here we consider the possibility to impose graph for the SPANNING k-TREE problem.

a bound

on the degree of the input

146

L.

Cai, F. Maffray

If the maximum degree of G is at most 2k, then the number m of edges of G is at most kn, where n is the number of vertices of G. Recall from Theorem 2.1 that a k-tree with n vertices has exactly kn -(“i’) edges. Thus any spanning k-tree of G is a subgraph obtained by removing m - (kn - (“;I)) edges from G. Note that this number is less than or equal to (“l’). Thus the number of such subgraphs is no more than rn

((“:‘) >. It follows that we can determine whether G possesses a spanning k-tree in polynomial time (for fixed k), simply by testing all subgraphs with the proper number of edges. We will now see that relaxing the bound on the maximum degree of G causes the SPANNING k-TREE problem to become NP-complete. 4.1. The SPANNING k-TREE problem is NP-complete to the class of graphs with maximum degree 3k+ 2.

Theorem

when restricted

Proof. For k=2, we have a stronger result with Theorem 5.1 in Section 5. Thus we may henceforth assume that kz 3. Consider a cubic Boolean formula g defined as before. To prove the theorem, we will build a graph G of maximum degree 3k+ 2 such that G possesses a spanning k-tree if and only if g is satisfiable. Firstly, consider a Boolean variable x. We build a minicomponent M defined as follows. The vertex set of M consists of 4k- 4 vertices ue, ui, . . . , u~~_~. Imagine these vertices arranged consecutively and clockwise along the boundary of a square, starting from the top-left corner, each side of the square carrying exactly k vertices. The VertiCeS uo, uk_,, u2k_2 and Us&s lie at the corners of the square. The vertices &_i, . . . . U2k_2 form the right side of the square M, whereas the vertices Usk-3, . . . , u4k_5, u. form the left side of the square. The set of internal edges of M is defined in such a way that two vertices u,,, uq of M are adjacent if and only if lq-pi I k, the subscripts being taken modulo 4k-4. Note that the k vertices

on the top side of the square M form a clique of size k. We will denote this clique by X and say that it “represents” the literal x. Similarly, the k vertices %,I-2,

UZk,

***, U3k-3

on the bottom side of the square M form another clique of size k which we will denote by 8. We will say that 8 “represents” the literal K. We will call both X and X “literal cliques”. Now for each occurrence in $ of a variable xi (i = 1, . . . , n), we create one minicomponent of the above type. So, for each variable xi, we have a number s; of minicomponents, si being equal to the number of occurrences of the variable xi in

The SPANNING

k-TREE

problem

147

g. Two minicomponents Mf and Mf+’ (with the convention that A4F+r =A4,!) are linked in such a way that the choice of the literals in each of these minicomponents is consistent. To achieve this, we add a new vertex zf, with all edges between z,Sand the clique Xl’ representing Xi in AL$ and all edges between .zf and the clique representing xi in Mft ‘. If T is a spanning k-tree of G and Xt is a clique of T, then we will show that X,! is not a clique of T; therefore, in order for T to cover vertex zf, it will be necessary to have the clique Xf+’ in T. We connect the two minicomponents M; and My+’ (with s = 1, . . . ,si - 1) as follows.’ Consider the right side of the square MI! and the left side of the square Mist’. We add an edge between a vertex U; of M,! and a vertex ui+l of Mist1 whenever k-lSp12k-2, 3k-3sq14k-4, and q-ps2k-2 (with the convention that uhkP4= ZQ). These will be called the “connecting edges” between two minicomponents. For 1 I is n - 1, the last minicomponent M,!’ associated with an occurrence of Xi is connected to the first minicomponent M:+ 1 associated with an occurrence of Xi+, in a similar fashion. Also, we add a vertex w and edges between w and the left side of the first minicomponent M: associated with xi; and a vertex w’ and edges between w’ and the last minicomponent M$ associated with x,. Note that w and w’ are k-simplicial in G. Lemma 4.2. Assume that T’ is a spanning k-tree of the graph constructed so far, and that for each i and s, the Ieft side and the right side of M,! are in T’. Then exactly one of Xi’, Xf is a clique in T’. Proof. It is clear that at least one of Xi”, xf is a clique of T’, for otherwise T’ would not be k-connected. Suppose now that both Xi” and X,? (i.e., the top side and bottom side of Mf) are in T’. Then the vertices at the four corners of Mf will form a chordless cycle in T’,3 contradicting item (a) of Theorem 2.1. This completes the proof of the lemma. 0 Lemma

4.3. For each i, either all the Xi” or all the X,? are cliques in T’.

Proof. Suppose the lemma does not hold. Then without loss of generality there exists a superscript s such that Xi” and Xf+’ are cliques in T. Thus, by the preceding lemma, Xi”+’ is not a clique in T. But then vertex yf cannot be covered by T, as explained previously. So the lemma is true. q Secondly,

each clause Cj is a vertex of G. Consider

’ Normally, the vertices we will drop the index i. 3 Notice

that k23

of MS should

is used here.

be denoted

a literal Ii that appears

in the

by u: ,, I&, . . . , ufdkms;but for the sake of clarity

148

L. Cai, F. Maffray

clause Cj. If 1; =xi for some i, we take the minicomponent M: corresponding to this occurrence in # of the variable xi; then we add all the possible edges between the vertex Cj of G and the vertices of the clique Xi” representing xi in M,!. If 1; = xi, then we add all edges between the vertex Cj and the vertices of the clique Xf representing Xi in iVf:. We repeat this for all values of r (r= 1,2,3). For further reference, note that Cj belongs to exactly three cliques of size k+ 1 in G, and that each of these three cliques is either {Cj} U Xi or {Cj} Ux;, for three different values of i. Given a minicomponent M of G’, the edges going out of M connect A4 either to another minicomponent or to exactly one clause vertex Cj or to a ‘9,” vertex. In consequence, the largest degree of a vertex in a minicomponent is 3 k + 2. The degree of any “z” vertex is 2k. The degree of w and w’ is k. The degree of any clause vertex Cj is 3k. So the largest degree in G is 3k+ 2. It is easy to see that G can be built in polynomial time in the size n+m of the Boolean formula .9. Graph G has 3m(4k3)+2+m vertices. Now, let us assume that G has a spanning k-tree T. We are going to define a O-l assignment 5 = ({i, . . . , (,) for which $= 1. First we consider a clause vertex Cj. The neighbourhood of Cj in G consists of three literal cliques with no edges between them. It follows that, in T, Cj can only be a k-simplicial vertex, and that exactly one of these three cliques is the neighbourhood of Cj in T. We call this clique Qj. Now we consider the subgraph T’ of T obtained by removing the clause vertices. Since each of them is a k-simplicial vertex of T, and they are pairwise nonadjacent, it follows that T’ is a k-tree. Note that T’ consists only of the 3m minicomponents and the two end vertices w and w’; and that the only way from one minicomponent to the next one in T’ is by way of the edges added between the right side of the former and the left side of the latter during the construction of G. It follows that all these edges must be present in T’, and that the right side of one minicomponent and the left side of the next one must be k-cliques of T’. The same holds for the left side of the first minicomponent Mt and the right side of the last minicomponent M$ because of w and w’, which must be k-simplicial in T’. Lemmas 4.2 and 4.3 enable us to find a O-l assignment < for x. Indeed, for each i, T contains exactly all the literal cliques representing Xi or all the literal cliques representing xi. In the former case, we set
The SPANNING

k-TREE problem

149

For each variable xi such that & = 0, we put in T all the edges of the clique Xi, which represents the literal Xj. Also, we put in T every edge of G that links a vertex of Xi” and a vertex of the left side of A4:, for all s. Step 2. For any two vertices u& U: lying either both on the left side or both on the right side of the same minicomponent M,?, we put the edge Z$U; in T. Step 3. For each i with 15 i< n, we put in T all the connecting edges between M,T8and M,‘, , . Step 4. Consider

a clause vertex Cj of G. Since g is satisfied by the Boolean vector r, there exists at least one literal of the clause Cj that is equal to 1. Thus there exists at least one clique Xi or X; that is adjacent to C; and whose edges are in T (by Step 1); it suffices to consider the clique that represents the literal equal to 1. If there are two or three such cliques, we arbitrarily choose one of them. We then put in T all the edges between Cj and this clique. It remains to verify that T is a k-tree. First, observe that the neighbourhood in T of a clause vertex u is exactly a kclique, by Step 4. Therefore, we may remove such a vertex and continue with T- u. By an induction process, we may thus assume that we have removed all the clause vertices from T. The same holds for the end vertices w and w’, which we can also remove since they are k-simplicial in G and in T. The remaining subgraph T’ consists only of all the M-vertices. We show that T, is a k-tree by induction on the number m’ of minicomponents in T’. The fact is clear for m’= 1. (Notice that, initially, m’= 3m.)

Consider the last minicomponent iV”I; of T’, and assume that &, = 1. Then4 the bottom-right vertex Q_~ of M,, is a k-simplicial vertex of T’, because its neighbourhood in T’ is the clique {u,_,, . . . , uzkp3} by Steps 1 and 2. We remove the vertex u~~_~. More generally, once a vertex up of M: with ps2k2 has been removed, it is a routine matter to check that vertex uppI is k-simplicial in the remaining subgraph, by Steps 1 and 2, provided that O


5. The planar case We now consider the spanning k-tree problem restricted to planar graphs as input; this problem will be referred to as PLANAR SPANNING k-TREE (PSkT). 4 For the sake of clarity, we will now drop from the u’s the indices n and s,.

150

L. Cai, F. Maffray

Assuming that G is a planar graph containing a spanning k-tree T, let us discuss the possible values of k. Recall that a planar graph cannot contain a clique with five vertices. If k? 5, then T contains a 5-clique and so it cannot be a subgraph of the planar graph G. Therefore the problem PSST is trivial; the answer is always “no”. If k = 4, then T contains a 5-clique except if T= K4, which is a maximal planar graph. So the problem PS4T is also trivial, the answer being “yes” if and only if

G=K,. If k= 3, then T has exactly 3t- 6 edges, where t is the number of vertices of T. However, t must also be the number of vertices of G since T is spanning. It is a wellknown consequence of Euler’s formula that a simple planar graph with t vertices has at most 3 t - 6 edges. Thus we must have G= T. In other words, the answer to an instance of the PS3T problem is “yes” if and only if the input graph G itself is a 3-tree. This can be checked in polynomial (linear) time; so PS3T is solvable in polynomial time. If k = 2, we have the following result:

Theorem 5.1. PLANAR SPANNING 2-TREE is NP-complete, even when restricted to the class of (planar) graphs with maximum degree 6. To prove this, we will use a result about the complexity of a planar restriction of 3-SATISFIABILITY. Given a Boolean formula @ on n variables, a graph I, can be defined as follows: each clause and each variable of 9 is a vertex of 4; edges are added so that the n variables form a chordless cycle in Z,; each clause is adjacent to the variables that appear in it. The Boolean formula 9r is said to be planar if there exists a cyclic arrangement of the variables for which 1~ is planar. PLANAR 3-SATISFIABILITY is the problem of determining whether a planar cubic Boolean formula is satisfiable. Lichtenstein [ 151 introduced the problem PLANAR 3-SATISFIABILITY and showed that it is NP-complete, even if a planar graph 19 is given together with the input function. (Note that the definition of PLANAR 3-SAT assumes Boolean functions with clauses of size 2 or 3. We will make this assumption in what follows.)

Proof. Consider

a planar Boolean formula g given with a planar graph representation Zrjs as defined above. We are going to build a planar graph G, of maximum degree 6, with the property that G has a spanning 2-tree if and only if ,9 is satisfiable. The basic idea is similar to that used in Theorem 4.1: there will be one “minicomponent” for each occurrence of a variable; each minicomponent will be adjacent to the clause which contains the occurrence of the corresponding literal; the minicomponents pertaining to the same variable will be tied in a way insuring consistency; and all the minicomponents will be linked in a way insuring the required connectivity. The planarity of G will result from the fact that G imitates the planar embedding of 4.

The SPANNING

k-TREE

problem

151

between the Since the variables of g form a cycle in Zs, we may distinguish clauses that lie in the interior of this cycle and the clauses that lie in its exterior. Without loss of generality, we may assume that the cycle of variables in Z, is x1, . . ..X.,Xl. Consider any variable x of @. For each occurrence of x in $, we create one minicomponent as shown in Fig. 1. (For further reference notice on the figure that six edges are black and six are grey. All other edges will be called “normal”.) Then we build a big component, which will represent x, by putting together the minicomponents associated with x, as we explain now. Let s be the number of occurrences of the variable x in $, and t be the number of exterior clauses adjacent to x in Is. Let Mj be the minicomponent associated with the jth occurrence of x (corresponding to the jth clause containing x, counting clockwise in the planar embedding of 4, starting with the exterior clauses). For 15 j< t or t< j
Fig. 1. Minicomponent

for x.

152

L. Cai, F. Maffray

G, the conclusion that 9 admits a satisfying assigment derives from the following three observations, which are easy to establish. (i) All the normal edges must be in T, for otherwise T would not be 2-connected. (ii) Each clause vertex C’ must be 2-simplicial. Consequently, T’= T- {C,, . . . , C,} must be a spanning 2-tree of G - { Ci, . . . , C,}. (iii) All the “w” and “z” vertices must be 2-simplicial in T’. Moreover, for each i, T’ contains either all the black edges or all the grey edges of Bi. In the former case we set
WEIGHT

SPANNING

2-TREE for

maximal

planar

Proof. The problem is clearly in NP. We reduce SPANNING 2-TREE for planar graphs to MINIMUM WEIGHT SPANNING 2-TREE for maximal planar graphs. Every planar graph G = (V, E) can be embedded in a maximal planar graph G’ = (V, E’). If we assign weight 0 to every edge of G and weight 1 to every edge of E’- E, then a spanning 2-tree of G corresponds to a spanning 2-tree of G’ of weight 0. 0

6. Efficient

algorithms

We are concerned here with finding polynomial-time algorithms to determine whether a given graph possesses a spanning k-tree or not. Because of the NP-completeness of the problem in general, we must have some restrictive assumptions on the class of graphs taken as input. In particular, by Theorem 3.1, the input class

The SPANNING

k-TREE problem

153

cannot contain all split graphs unless P = NP. Consequently, SPANNING k-TREE remains NP-complete when restricted to the class of chordal graphs. We will now see that there exist several important subclasses of chordal graphs for which the problem becomes polynomially solvable. In Section 2 we proved that, for all k’z kz 1, any k’-tree admits a spanning ktree. The proof of that result contains an implicit polynomial algorithm that produces a spanning k-tree of a given k’-tree. We now turn to the class of split-comparability graphs, i.e., split graphs that admit transitive orientations. Recall that an orientation of a graph G is an assignment D of directions to edges of G. If an edge xy is oriented from x to y, then we say that (x, y) is an arc of G (w.r.t. D), x is a predecessor of y and y is a successor of x. An orientation is transitive if whenever there is a path u1 u2 ... uk in G such that every (ui,ui+,), l~iO, else N-(u) =0. Similarly let j(u) be the smallest integer such that x~(,~)is a successor of u (if any; else j(u) = q + 1). By transitivity, every vertex Xj of Q with j~j(u) is a successor of u. Write N+(u) = {Xj(U), . . . ,x9> if j(u) < q + 1, else N+(u) = 0. Clearly, N(u) = N-(u) UN’(u). Moreover i(u)
* Now consider

any two distinct vertices u, u of S. If i(u) 2 j(u), then there are two there must be an arc (u, u) in G; but arcs (u,xj(,)) and (xj(“), u) in G. By transitivity, this contradicts the definition of S. So i(u)
154

L. Cai, F. Maffray

If the degree d(u) of any vertex u of S is strictly less than k, then G cannot have a spanning k-tree, by item (g) of Theorem 2.1. Suppose now that qzk and every vertex of S is of degree at least k. If q= k then note that G itself is a k-tree. If q> k, let Te be the spanning k-tree of Q whose (k + 1)-cliques are { yi, . . . , JJ~+~}, for i=l , . . . , q - k. Since every vertex u of S is of degree at least k, and the neighbours of u are consecutive vertices in the new ordering, there exists a k-clique Q, of TQ in N(u). We add to Te the vertex u and all the edges between u and Q,. Clearly the resulting graph is a spanning k-tree of G. So we have proved the following. 6.1. A split-comparability graph G= (Q,S;E), where Q is a maximal clique of G, has a spanning k-tree if and only if 1QI 2 k and every vertex of S has degree at least k. Theorem

Note that a split-comparability graph can be recognized in polynomial time (see [12]). It is clear from the above theorem that SPANNING k-TREE can be solved in polynomial time for split-comparability graphs. In fact, a spanning k-tree (if any) of a split-comparability graph can be found in linear time. Notice that in the proof we can of the theorem, once the ordering yi, . . . , y, of vertices in Q is obtained, easily construct a spanning k-tree of G. So we need to arrange vertices in Q in such a way that the neighbourhood of any vertex u of S consists of consecutive vertices in Q. Such a consecutive arrangement problem can be solved in linear time (see [12, Chapter 81). Since Q and S can be obtained in linear time by using a SE0 of G, it is clear that we can find a spanning k-tree of G in linear time. We now turn to the class of interval graphs. A graph G is an interval graph [l l] if and only if there exists a one-to-one correspondence between the vertices of G and a set of intervals on the real line such that two vertices are adjacent in G if and only if their corresponding intervals intersect. Interval graphs are chordal, and the class of interval graphs is different from split-comparability graphs. Let G = (V, E) be an interval graph of size n. The ith vertex of G is an interval Zj of the real line, and 1i Zj E E if and only if Z; tl Ij #0 for all i,jl n. For each i, let I(Z;) and r(Ii) be the left and right endpoints of the interval 1;. Without loss of generality we may assume that the vertices of G are indexed in such a way that I(Zi)~r(li+,) for i=l, . . . . n - 1; this will be called the “left-side ordering” of G. Given this ordering, for h IIZ we let Gh denote the subgraph induced by the vertices I i, . . . , Z,. We may also occasionally consider a reordering of these intervals according to the right-side function r(I); this will be called the “right-side ordering” of Gh. Lemma 6.2. No,(Ij) consists of the last INo,

ing of Gi_1, which form a clique.

intervals in the right-side order-

The SPANNING

Proof.

Consider

two arbitrary

intervals

k-TREE

problem

I, J in Gi_, with r(Z) I r(J).

155

If Zi intersects

I, then Z(Z) I Z(Zi) I r(Z). Since ,(Zi) 2 Z(J), we get Z(J) I Z(Zi) I r(J); thus Zi intersects J as well. Furthermore Z intersects J since they both contain point Z(Zi). This implies the lemma. q

Lemma 6.3. For k
Proof.

if INc,(Zi)I
Let j< i< k be three integers.

If I, /I 4 ~0 but Zj O Zi = 0, then Z(Z,) _( r(Zj),

r(Zj) < Z(Zi)v implying Z(Z,) < ,(Zi), contradicting the left-side ordering of the intervals. Therefore, any Ij $ NG,(Zj) does not intersect Ik. Since 1NG,(Zi)) < i, NG,(Zj) forms a cutset of G. 0

We can now formulate the main result concerning spanning k-trees in interval graphs. (We keep the same notation as above, and denote by dd,(x) the number of neighbours of vertex x in the induced subgraph Gi.)

6.4. An interval graph G has a spanning k-tree if and only if Gk is a clique and d,,(Zi) 2 k for all i = k + 1, . . . , n.

Theorem

Proof. For the “only if” part, first note that it is trivial if n = k. Now suppose that n > k, and consider an interval Zi with i> k. From the preceding lemma we have that, if INc,(Zi)i < k, then Nd, will form a cutset of size less than k. Hence, by item (h) of Theorem 2.1, G cannot contain a spanning k-tree. The “if” part is proved by induction on n. We actually show that G will contain a spanning k-tree T with the property that the last k intervals in the right-side ordering of G induce a k-clique in T. This fact is trivial if n = k; hence we assume n > k. Let Z,, be the last interval in the left-side ordering of G. Note that G-Z,, satisfies the conditions given in the theorem. Thus, by the induction hypothesis, G-I,, (i.e., G,_,) possesses a spanning k-tree T’ such that the last k intervals in the right-side ordering of G,_r form a clique of T’. Let Zr’,. . . , Zi be these k intervals. By Lemma 6.2, these vertices belong to the set No,(Z,). Therefore we can obtain a spanning k-tree T of G by adding to T’ the vertex I, and all the edges between I,, and these k vertices. Now the last k intervals in the right-side ordering of G, are on r;, . . . , ZL if r(f,)rr(I;) or Z2),. . . . ZL,Z, (not necessarily in this order, depending r(I,)) otherwise. In both cases, these k intervals form a clique of T. 0

The proof of this theorem contains an implicit polynomial-time algorithm for finding a spanning k-tree in an interval graph. This algorithm can be implemented in time O(lE’ + I VJ log / V() including the time necessary to find the interval model and do the necessary sorting.

156

L. Cai, F. Maffray

Acknowledgement

Our interest in the problem considered in this paper was initiated by a question posed by Anna Lubiw and suggested to us by Derek Corneil. Reference [4] was given to us by Michel Troyon. We are grateful to Derek and Michel for interesting discussions on the topic. We thank the anonymous referees for helpful suggestions.

References [l] S. Arnborg,

D.G.

Corneil

SIAM J. Algebraic

and A. Proskurowski,

Discrete

Methods

[2] L.W. Beineke and R.E. Pippert,

Complexity

of finding

embeddings

in a k-tree,

8 (1987) 277-284.

Properties

and characterizations

of k-trees,

Mathematika

k-trees,

PhD thesis,

18 (1971)

141-151. [3] C. Berge, Graphs (North-Holland, Amsterdam, 1985). [4] M.W. Bern, Network design problems: Steiner trees and spanning of California,

Berkeley,

[5] S.A. Cook, The complexity posium

on Theory

[6] D.G. Corneil k-trees,

of theorem-proving

of Computing

Dirac,

[8] A.M.

Farley,

(ACM,

procedures,

New York,

Discrete

On rigid circuit Networks

Methods

graphs,

immune

Abh.

in: Proceedings

3rd Annual

ACM Sym-

1971) 151-158.

and J.M. Keil, A dynamic-programming

SIAM J. Algebraic

[7] G.A.

University

CA (1987).

approach

to the domination-set

problem

on

8 (1987) 535-543.

Math.

to isolated

Sem. Univ.

failures,

Hamburg

Networks

25 (1961) 71-76.

11 (1981) 255-268.

[9] A.M. Farley and A. Proskurowski, Extremal graphs with no disconnecting independent vertex set or matching, Tech. Rept. CIS-TR-80.21, Computer and Information Science, University of Oregon, Eugene,

OR (1980).

[lo] A. Ghouila-Houri, man&e [ll]

P.C.

Gilmore

graphs,

Caracttrisation

a obtenir Canad.

le graphe

and A.J.

des graphes

d’une relation

Hoffman,

J. Math.

non orient&

d’ordre,

dont

C.R. Acad.

A characterization

on peut orienter

les a&es

de

Sci. Paris 254 (1962) 1370-1371.

of comparability

graphs

and

of interval

16 (1964) 539-548.

[12] M.C. Golumbic, Algorithmic Graph Theory and Perfect Graphs (Academic Press, New York, 1980). [13] S. Foldes and P.L. Hammer, Split graphs, in: F. Hoffman et al., eds., Proceedings 8th Southeastern Conference Rouge,

on Combinatorics,

Graph

Theory

and Computing

(Lousiana

State University,

Baton

LA, 1977) 311-315.

[14] S. Foldes and P.L. Hammer,

Split graphs

having

Dilworth

number

two, Canad.

J. Math.

29 (1977)

666-672. 11 (1982) 329-343. [15] D. Lichtenstein, Planar formulae and their uses, SIAM J. Comput. [16] D.J. Rose, On simple characterizations of k-trees, Discrete Math. 7 (1974) 317-322. [17] D.J.

and G.S. Leuker,

Algorithmic

aspects

of vertex elimination

SIAM J. Comput. 5 (1976) 266-283. [18] R.E. Tarjan, Data Structures and Network

Rose,

R.E. Tarjan

Algorithms

(SIAM,

Philadelphia,

[19] J.A. Wald and C.J. Colbourn, 13 (1983) 159-167.

Steiner trees, partial

2-trees,

and minimum

PA,

on graphs, 1983).

IFI networks,

Networks