5
The Degree-Preserving Spanning Tree Problem in Strongly Chordal and Directed Path Graphs Ching-Chi Lin Department of Computer Science and Engineering, National Taiwan Ocean University, Keelung 20224, Taiwan Gerard J. Chang Department of Mathematics, National Taiwan University, Taipei 10617, Taiwan Gen-Huey Chen Department of Computer Science and Information Engineering, National Taiwan University, Taipei 10617, Taiwan Suppose G is a connected graph and T a spanning tree of G. A vertex v V (G) is said to be a degree-preserving vertex if its degree in T is the same as its degree in G. The degree-preserving spanning tree problem is to find a spanning tree T of a connected graph G such that the number of degree-preserving vertices is maximized. The purpose of this article is to provide an O(m · α(m, n))-time algorithm for the degree-preserving spanning tree prob- lem in strongly chordal graphs, where α is the inverse of Ackermann’s function. Furthermore, we present an O(m + n)-time algorithm in directed path graphs. © 2009 Wiley Periodicals, Inc. NETWORKS, Vol. 56(3), 183–187 2010 Keywords: algorithm; degree-preserving spanning tree; planar graph; directed path graph; strongly chordal graph 1. INTRODUCTION Suppose that G is a connected graph and T is a spanning tree of G. A vertex v V (G) is said to be a degree-preserving vertex if its degree in T is the same as its degree in G. The degree-preserving spanning tree (DPST) problem is to find a spanning tree T of a connected graph G such that the num- ber of degree-preserving vertices is maximized. The DPST problem was originally introduced by Lewinter et al. [11, 12], due to a nice application in designing water-distribution Received May 2006; accepted October 2008 Correspondence to: C.-C. Lin; e-mail: [email protected] Contract grant sponsors: National Science Council; Contract grant number: NSC95-2221-E-002-125-MY3 Contract grant sponsors: Institute of Mathematical Sciences (National Tai- wan University, Taipei, Taiwan), National Center for Theoretical Sciences, Taipei Office. DOI 10.1002/net.20359 Published online 18 December 2009 in Wiley Online Library (wileyonlinelibrary.com). © 2009 Wiley Periodicals, Inc. networks. In view of this application, planar graphs deserve particular interest as most water-distribution networks are planar [3, 10]. Recently, a number of theoretical results on some other graph classes were proposed for algorithmic interest [1, 3, 6, 10]. Broersma et al. [3] proved that the DPST problem is NP-complete for bipartite planar degree-6 graphs and split graphs. Furthermore, they also gave a linear-time algo- rithm for interval graphs, polynomial-time algorithms for graphs with a bounded asteroidal number and graphs with bounded treewidth, an O(n 4 )-time algorithm for cocompara- bility graphs, and a linear-time approximation algorithm with ratio 1 + for planar graphs. Bhatia et al. [1] proposed an approximation algorithm for the DPST problem with ratio (n 1/2 ) for general graphs. Khuller et al. [10] improved the result with ratio 2 + . Moreover, when the input graph is pla- nar, they also gave a polynomial-time approximation scheme for this problem. Damaschke [6] proved that the DPST prob- lem is NP-complete for bipartite planar degree-5 graphs and for planar degree-3 graphs. As split graphs are chordal, the DPST problem is NP- complete for chordal graphs. It is well known that the family of strongly chordal graphs is a proper subfamily of the fam- ily of chordal graphs, and is a proper superfamily of the family of directed path graphs. In this article, we provide an O(m·α(m, n))-time algorithm for the degree-preserving span- ning tree problem in strongly chordal graphs, where α is the inverse of Ackermann’s function. Furthermore, we present an O(m + n)-time algorithm in directed path graphs. In a graph G, a subset S V (G) is realizable if there exists a spanning forest F of G such that d F (v) = d G (v) for every vertex v S; in which case, F is called an S-preserving forest. A maximum realizable set of G is a realizable set whose cardinality is the largest among all realizable sets of G. As shown by Broersma et al. [3], solving the DPST problem NETWORKS—2010—DOI 10.1002/net

The degree-preserving spanning tree problem in strongly chordal and directed path graphs

Embed Size (px)

Citation preview

Page 1: The degree-preserving spanning tree problem in strongly chordal and directed path graphs

The Degree-Preserving Spanning Tree Problem inStrongly Chordal and Directed Path Graphs

Ching-Chi LinDepartment of Computer Science and Engineering, National Taiwan Ocean University, Keelung 20224, Taiwan

Gerard J. ChangDepartment of Mathematics, National Taiwan University, Taipei 10617, Taiwan

Gen-Huey ChenDepartment of Computer Science and Information Engineering, National Taiwan University, Taipei 10617, Taiwan

Suppose G is a connected graph and T a spanning treeof G. A vertex v ∈ V (G) is said to be a degree-preservingvertex if its degree in T is the same as its degree in G.The degree-preserving spanning tree problem is to finda spanning tree T of a connected graph G such that thenumber of degree-preserving vertices is maximized. Thepurpose of this article is to provide an O(m ·α(m, n))-timealgorithm for the degree-preserving spanning tree prob-lem in strongly chordal graphs, where α is the inverseof Ackermann’s function. Furthermore, we present anO(m + n)-time algorithm in directed path graphs. © 2009Wiley Periodicals, Inc. NETWORKS, Vol. 56(3), 183–187 2010

Keywords: algorithm; degree-preserving spanning tree; planargraph; directed path graph; strongly chordal graph

1. INTRODUCTION

Suppose that G is a connected graph and T is a spanningtree of G. A vertex v ∈ V(G) is said to be a degree-preservingvertex if its degree in T is the same as its degree in G. Thedegree-preserving spanning tree (DPST) problem is to find aspanning tree T of a connected graph G such that the num-ber of degree-preserving vertices is maximized. The DPSTproblem was originally introduced by Lewinter et al. [11,12],due to a nice application in designing water-distribution

Received May 2006; accepted October 2008Correspondence to: C.-C. Lin; e-mail: [email protected] grant sponsors: National Science Council; Contract grant number:NSC95-2221-E-002-125-MY3Contract grant sponsors: Institute of Mathematical Sciences (National Tai-wan University, Taipei, Taiwan), National Center for Theoretical Sciences,Taipei Office.DOI 10.1002/net.20359Published online 18 December 2009 in Wiley Online Library(wileyonlinelibrary.com).© 2009 Wiley Periodicals, Inc.

networks. In view of this application, planar graphs deserveparticular interest as most water-distribution networks areplanar [3, 10]. Recently, a number of theoretical results onsome other graph classes were proposed for algorithmicinterest [1, 3, 6, 10].

Broersma et al. [3] proved that the DPST problem isNP-complete for bipartite planar degree-6 graphs and splitgraphs. Furthermore, they also gave a linear-time algo-rithm for interval graphs, polynomial-time algorithms forgraphs with a bounded asteroidal number and graphs withbounded treewidth, an O(n4)-time algorithm for cocompara-bility graphs, and a linear-time approximation algorithm withratio 1 + ε for planar graphs. Bhatia et al. [1] proposed anapproximation algorithm for the DPST problem with ratio�(n1/2) for general graphs. Khuller et al. [10] improved theresult with ratio 2+ε. Moreover, when the input graph is pla-nar, they also gave a polynomial-time approximation schemefor this problem. Damaschke [6] proved that the DPST prob-lem is NP-complete for bipartite planar degree-5 graphs andfor planar degree-3 graphs.

As split graphs are chordal, the DPST problem is NP-complete for chordal graphs. It is well known that the familyof strongly chordal graphs is a proper subfamily of the fam-ily of chordal graphs, and is a proper superfamily of thefamily of directed path graphs. In this article, we provide anO(m·α(m, n))-time algorithm for the degree-preserving span-ning tree problem in strongly chordal graphs, where α is theinverse of Ackermann’s function. Furthermore, we presentan O(m + n)-time algorithm in directed path graphs.

In a graph G, a subset S ⊆ V(G) is realizable if there existsa spanning forest F of G such that dF(v) = dG(v) for everyvertex v ∈ S; in which case, F is called an S-preserving forest.A maximum realizable set of G is a realizable set whosecardinality is the largest among all realizable sets of G. Asshown by Broersma et al. [3], solving the DPST problem

NETWORKS—2010—DOI 10.1002/net

Page 2: The degree-preserving spanning tree problem in strongly chordal and directed path graphs

on a connected graph G is equivalent to finding a maximumrealizable set of G. In fact, a spanning tree with S as the setof all degree-preserving vertices is an S-preserving forest.On the other hand, an S-preserving forest can be extendedto a spanning tree for which all vertices of S are degree-preserving. To simplify our algorithms, we solve the DPSTproblem by finding a maximum realizable set S.

The neighborhood NG(v) of a vertex v is the set of allvertices adjacent to v in G; and the closed neighborhoodNG[v] = {v} ∪ NG(v). For a nonempty subset S ⊆ V(G),let G[[S]] denote the spanning subgraph whose edge set is{xy ∈ E(G) : x ∈ S}. The definition given earlier for G[[S]]is slightly different from that in [3], in which the vertex setof G[[S]] is ∪v∈SNG[v]. The difference is now that we addisolated vertices to make G[[S]] a spanning subgraph of G fortechnical purpose. Notice that an edge in G[[S]] has at leastone end vertex in S. The following is a useful characterizationfor a set to be realizable.

Lemma 1 ([3]). Suppose S is a vertex set of G. Then, S isrealizable if and only if G[[S]] is a forest.

For the case when the input graph G is not connected, it iseasy to see that the union of the maximum realizable sets ofthe components of G is a maximum realizable set of G. Also,if G is connected with a cut-edge e, then the union of themaximum realizable sets of the two components of G−e is amaximum realizable set of G. It takes linear time to determinewhether or not G is 2-edge connected by a depth first search[15]. Therefore, we may suppose that G is 2-edge connectedin the rest of this article.

The remainder of the article is organized as follows.Section 2 describes and analyzes an O(m · α(m, n))-timealgorithm in strongly chordal graphs. Section 3 describes andanalyzes an O(m+n)-time algorithm in directed path graphs.Section 4 concludes the article with open questions.

2. ALGORITHM FOR STRONGLY CHORDALGRAPHS

This section establishes an O(m ·α(m, n))-time algorithmfor finding a maximum realizable set of a strongly chordalgraph, where α is the inverse of Ackermann’s function. Thefunction α grows very slowly, it’s less than 5 for all prac-tically large values of m and n. The problem of findingmaximum realizable sets on chordal graphs is NP-completebut it is linear-time in interval graphs. As the class of stronglychordal graphs is a proper superfamily of interval graphsand a proper subfamily of chordal graphs, it is interesting todesign an O(m ·α(m, n))-time algorithm for strongly chordalgraphs. First, some preliminaries on strongly chordal graphsis introduced.

A graph is chordal (or triangulated) if every cycle of lengthgreater than three has a chord, which is an edge joining twononcontiguous vertices in the cycle. A vertex v is simplicial ifNG[v] is a clique. For any ordering v1, v2, . . . , vn of V(G), letGi denote the subgraph of G induced by {vi, vi+1, . . . , vn}. It is

well known [9] that a graph G is chordal if and only if it has aperfect elimination order, which is an ordering v1, v2, . . . , vn

of V(G) such that each vi is a simplicial vertex of Gi.A strongly (or sun-free) chordal graph is a chordal graph

such that every cycle of even length at least six has a chordthat divides the cycle into two odd-length paths [4]. Farber[8] proved that a graph is strongly chordal if and only if it hasa strong elimination order which is an ordering v1, v2, . . . , vnof V(G) such that NGi [vj] ⊆ NGi [vk] for i ≤ j ≤ k andvj, vk ∈ NGi [vi]. Notice that a strong elimination order is alsoa perfect elimination order. Paige and Tarjan [13] presentedan O(m log n)-time algorithm and Spinrad [14] presented anO(n2)-time algorithm for finding a strong elimination orderof a strongly chordal graph of n vertices and m edges.

Our algorithm for finding a maximum realizable setof a strongly chordal graph G is a greedy one. Supposev1, v2, . . . , vn is a strong elimination order of G.

The algorithm starts with S = ∅, and processes vertex vi

for i from 1 to n by adding vi to S whenever G[[S ∪ {vi}]]is a forest.

To implement the algorithm efficiently, we employ thedisjoint-set data structure as follows. At all times we keep apartition of V(G) which corresponds to the trees of G[[S]].There are three operations involved in this data structure.The Make-Set(v) operation creates a new set containing v.The Find-Set(v) operation returns the set s containing v. TheUnion(s, t) operation unites the two sets s and t. Tarjan [16]gave a worst-case running time O(�·α(�, k))) for �disjoint-setoperations on k elements.

Initially, we let the set S be empty. Then, by the aid of thedata structure, n sets are created after performing the Make-Set(v) operation for all vertices v in V(G). Each of these nsets uniquely corresponds to a tree in G[[S]]. Notice that,at each iteration, vi and each vertex in NG(vi) ∩ S belongto the same tree in G[[S]]. Therefore, determining whetherG[[S ∪ {vi}]] is a forest or not can be done by checking if thevertices in NG[vi]−S belong to different sets. If the answer ispositive, then we add vi to S and create a new set by combiningthose sets which vi and the vertices in NG(vi) − S belongto. Otherwise, we check the next vertex. The algorithm isdetailed below.

Algorithm Strongly-Chordal.Input: A strongly chordal graph G with a strong eliminationorder v1, v2, . . . , vn.Output: A maximum realizable set S of G.

1. S ← ∅2. for each vertex v ∈ V(G) do Make-Set(v)3. for i = 1 to n do4. if Find-Set(vg) �= Find-Set(vh) for any

two vertices vg, vh ∈ NG[vi] − S5. then S ← S ∪ {vi}6. Union(Find-Set(vi), Find-Set(vj)) for each

vertex vj ∈ NG(vi) − S7. end if8. end for9. return S

184 NETWORKS—2010—DOI 10.1002/net

Page 3: The degree-preserving spanning tree problem in strongly chordal and directed path graphs

In the next theorem, we show that S generated by the algo-rithm is maximum and the algorithm runs in O(m · α(m, n))

time.

Theorem 2. For a strongly chordal graph G with a strongelimination order provided, Algorithm Strongly-Chordal out-puts a maximum realizable set S of G in O(m · α(m, n))

time.

Proof. We first prove that S = {vs1 , vs2 , . . . , vsr }, wheres1 = 1 and s1 < s2 < · · · < sr , is a maximum realizable setof G. Choose a maximum realizable set S′ of G. If S = S′,then we are done. Also, S is not a proper subset of S′, forotherwise there is a vertex vi ∈ S′ − S which must be chosento S in the greedy algorithm. Hence, S − S′ �= ∅ and thenwe may choose the minimum index p = p(S′) such thatvsp ∈ S − S′. Without loss of generality, we may assumethat the set S′ is chosen so that p(S′) is maximum. Notice that{vs1 , vs2 , . . . , vsp−1} ⊆ S ∩ S′. We first provide a claim.

Claim A. Suppose {vs1 , vs2 , . . . , vsp} ⊆ S′′ ⊆ {vsp} ∪ S′. IfG[[S′′]] has a cycle C, then it has a cycle C3 = (vsp , va, vx)

with {va, vx} ∩ S′′ = {vx} and sp < x, or else a cycle C4 =(vsp , va, vx, vb) with {vx, va, vb} ∩ S′′ = {vx} and sp < x, a, b.

Proof of Claim A. Let vc be the vertex with minimum indexoccurring in the cycle C, and vd , ve be its neighbors in C withc < d < e. First, vdve ∈ E(G). For the case when vd or ve

is in S′′, by the definition of G[[S′′]], the edge vdve is alsoin G[[S′′]] and so C3 = (vc, vd , ve) is a cycle in G[[S′′]].Notice that |{vc, vd , ve} ∩ S′′| ≥ 2. We have |C3 ∩ S| ≤ 1(respectively, |C3 ∩ S′| ≤ 1), for otherwise C3 is a cycle inG[[S]] (respectively, G[[S′]]), which is impossible. There-fore, C3 = (vsp , va, vx) with {va, vx} ∩ S′ = {vx}. Since{vs1 , vs2 , . . . , vsp−1} ⊆ S ∩ S′ and vsp ∈ S, we have sp < x.For the case when neither vd nor ve is in S′′, the edge vdve isnot in G[[S′′]]. Let vf be the other neighbor of vd in C. Then,vf ∈ NGc [vd] ⊆ NGc [ve] and so vf ve ∈ E(G). As vd , ve �∈ S′′,we have vc, vf ∈ S′′ and so C4 = (vc, vd , vf , ve) is a cyclein G[[S′′]]. Again, |C4 ∩ S| ≤ 1 and |C4 ∩ S′| ≤ 1 implythat C4 = (vsp , va, vx, vb) with {vx, va, vb} ∩ S′ = {vx}. Simi-larly, since {vs1 , vs2 , . . . , vsp−1} ⊆ S ∩ S′ and vsp ∈ S, we havesp < x. By the choice of vc, we have sp = c and f = x.Therefore, sp < x, a, b. The claim then follows.

With Claim A in mind, we are ready to prove the theorem.First, S′ ∪{vsp} is not a realizable set and so G[[S′ ∪{vsp}]] hasa cycle. By Claim A, the cycle is either (vsp , va, vx) with vx ∈S′ ∪ {vsp} and sp < x, or (vsp , va, vx, vb) with vx ∈ S′ ∪ {vsp}and sp < x, a, b. Notice that NGsp

[vsp ]∩NGsp[vx] is not empty

for both situations. So, there is a vertex vx ∈ S′ with sp < xsuch that a vertex vk ∈ NGsp

[vsp ] ∩ NGsp[vx] exists. Without

loss of generality, we assume that the vertices vx and vk arechosen such that the index k is minimized.

Next, consider the set S′′′ = S′ ∪ {vsp} − {vx}. We provethat S′′′ is realizable. Assume the contrary that G[[S′′′]] hasa cycle. By Claim A, it in fact has a cycle C′

3 = (vsp , vc, vy)

with vy ∈ S′ ∪ {vsp} − {vx} and sp < y, or a cycle C′4 =

(vsp , vc, vy, vd) with vy ∈ S′ ∪ {vsp} − {vx} and sp < y, c, d.For the case when G[[S′′′]] has a cycle C′

3, vertex vsp isin NGsp

[vsp ] ∩ NGsp[vy]. By the choice of vx and vk , we have

k ≤ sp. Further, since vk ∈ NGsp[vsp ], we have k ≥ sp. There-

fore, vk = vsp . Then, vx, vy ∈ NGsp[vsp ] and so vxvy ∈ E(G).

These give a cycle (vsp , vx, vy) in G[[S′]], a contradiction. Forthe case when G[[S′′′]] has a cycle C′

4, vertices vc, vd are inNGsp

[vsp ] ∩ NGsp[vy]. By the choices of vx and vk , for index k

we have k ≤ c, d. Then, vx ∈ NGsp[vk] ⊆ NGsp

[vc]∩ NGsp[vd]

and so (vx, vc, vy, vd) is a cycle in G[[S′]], a contradiction.The aforementioned discussion shows that S′′′ is real-

izable. It is in fact a maximum realizable set of G withp(S′′′) > p(S′), contradicting the choice of S′. Therefore,S = S′ at the beginning and S is a maximum realizable set asdesired.

Next, we show that the time complexity for the algorithmis O(m ·α(m, n)). The for-loop in line 2 performs O(n) Make-Set operations. Furthermore, the for-loop in lines 3–8 checkswhether the vertices in NG[vi] − S belong to different setsand performs Union operation if necessary for i = 1 to n.It takes O(|NG[vi]|) Find-Set operations to do checking foreach vertex vi. Hence, the for-loop in lines 3–8 performsO(m) Find-Set operations and O(n) Union operations. Then,Algorithm Strongly-Chordal totally performs O(m) disjoint-set operations on n elements, which takes O(m · α(m, n))

time. ■

As algorithm Strongly-Chordal outputs a maximum real-izable set S with v1 ∈ S, the following corollary is immediate.

Corollary 3. If G is a strongly chordal graph with a strongelimination order v1, v2, . . . , vn, then there is a maximumrealizable set S of G with v1 ∈ S.

3. ALGORITHM FOR DIRECTED PATH GRAPHS

It is well known that all directed path graphs are stronglychordal (see [2]). As a consequence of Section 2, theStrongly-Chordal algorithm can solve the DPST problem aswell in directed path graphs in O(m·α(m, n)) time. The use ofthe disjoint-set data structure is the reason that the Strongly-Chordal algorithm takes O(m · α(m, n)) time. In this section,an O(n + m)-time algorithm without employing the disjoint-set data structure is proposed for the same purpose, whichtakes advantage of some favorable properties of directed pathgraphs.

A graph is directed path if it has an intersection model(TG, P) consisting of a family P of directed paths in a rooteddirected tree TG. The vertices in G correspond to directedpaths in P , and two vertices in G are adjacent if and only iftheir corresponding directed paths contain a common vertex.Dietz [7] gave a linear-time algorithm to recognize directedpath graphs. As a byproduct, an intersection model (TG, P)

of a directed path graph G can be constructed in linear time.

NETWORKS—2010—DOI 10.1002/net 185

Page 4: The degree-preserving spanning tree problem in strongly chordal and directed path graphs

For a vertex v of G, let P(v) denote the correspondingdirected path in P . A directed path P(v) that begins at end-point t(v) and ends at endpoint h(v) is denoted by (t(v), h(v)),where t(v) is the tail of P(v) and h(v) is the head of P(v). Like[5], we assume that all endpoints are distinct. If two or moreendpoints are identical, they can be rearranged so that theyare distinct from each other and their corresponding pathshave common vertices. The distance from the root to t(v) isless than the distance from the root to h(v) in TG. For twoendpoints x and y in TG, x is an ancestor of y if there is adirected path in TG from x to y. A tail order of G is an order-ing v1, v2, . . . , vn of V(G) such that for i < j the distancefrom the root to t(vi) is at least the distance from the root tot(vj) in TG.

It is well known that all directed path graphs are stronglychordal. The following lemma shows that every tail order ofG is a strong elimination order.

Lemma 4. Every tail order v1, v2, . . . , vn of a directedpath graph G is a strong elimination order. Consequently,a directed path graph is strongly chordal.

Proof. To prove that v1, v2, . . . , vn is a strong eliminationorder of G, it suffices to show that NGi [vj] ⊆ NGi [vk] fori ≤ j ≤ k and vj, vk ∈ NGi [vi]. Since vj, vk ∈ NGi [vi] withi ≤ j ≤ k, it follows from the definition of tail order thatP(vj) and P(vk) both contain t(vi), and t(vk) is an ancestor oft(vj). Therefore, P(vk) contains the path (t(vj), t(vi)) in TG,which implies NGi [vj] ⊆ NGi [vk]. ■

Our algorithm for finding a maximum realizable set of adirected path graph is essentially the greedy one for stronglychordal graphs. The only difference is the implementation,as now directed path graphs have more structural proper-ties. To identify the trees of G[[S]], we select some verticesfrom each tree to represent the tree as a whole. The selectedvertices are called the local representatives of the tree. Thefunction rep[v] returns one of the local representatives of thetree containing v. Suppose v1, v2, . . . , vn is a tail order of G.The algorithm first initializes the set S0 to be the empty setand performs rep[v] ← v for each vertex v ∈ V(G). It theniterates i from 1 to n to check whether rep[vg] �= rep[vh] forany two vertices vg, vh ∈ NG[vi]− Si−1. If yes, the algorithmperforms Si ← Si−1 ∪ {vi} and rep[vj] ← rep[vi] for eachvertex vj ∈ NG(vi) − Si−1. Although the function rep[v] mayreturn different local representatives for the vertices v of atree, we will show in Lemma 6 that there exist two verticesvg, vh ∈ NG[vi] − Si−1 with rep[vg] = rep[vh] if and only ifthere exist two vertices in NG[vi] − Si−1 that belong to thesame connected component of G[[Si−1]]. The algorithm isdetailed below.

Algorithm Directed-Path.Input: A directed path graph G with a tail order v1, v2, . . . , vn.Output: A maximum realizable set Sn of G.

1. S0 ← ∅2. for each vertex v ∈ V(G) do rep[v] ← v

3. for i = 1 to n do4. if rep[vg] �= rep[vh] for any two vertices vg, vh ∈

NG[vi] − Si−1

5. then Si ← Si−1 ∪ {vi}6. rep[vj] ← rep[vi] for each vertex vj ∈

NG(vi) − Si−1

7. else Si ← Si−1

8. end if9. end for

10. return Sn

Instead of performing the Make-Set operation, we executerep[v] ← v to create a new tree that only contains v foreach vertex v in V(G). Instead of performing the Find-Setoperation, we check rep[vg] and rep[vh] for every pair ofvertices vg, vh in NG[vi]−Si−1, in order to determine whetheror not all the vertices in NG[vi] − Si−1 belong to differenttrees. Instead of performing the Union operation, we executerep[vj] ← rep[vi] to unite the two trees that contain vi and vj,respectively, into a new tree. We first provide a lemma whichis useful to prove the correctness of the algorithm.

Lemma 5. Suppose vi ∈ Si and D is the connectedcomponent of G[[Si]] containing vi.

1. If vj ∈ V(D) and j > i, then vj is a neighbor of vi in G.2. If vj ∈ V(D) and j < i, then t(vi) is an ancestor of t(vj)

in TG.

Proof. Suppose that vh is a vertex of G. If h > i, thenvh �∈ Si. Therefore, there exists no vertex vh ∈ Si such thatt(vh) is an ancestor of t(vi) in TG. Then, by the definition ofG[[Si]], there exists no edge vcvd in G[[Si]] such that t(vc) andt(vd) are ancestors of t(vi) in TG. Let P = (x1, x2, . . . , xr) bea path in D that connects vi and vj, where x1 = vi and xr = vj.

Suppose that vj ∈ V(D). First we consider the situation ofj > i. Assume to the contrary that vj and vi are not adjacent inG. Consequently, there exists an edge xkxk+1 ∈ P ⊆ G[[Si]]such that t(xk) and t(xk+1) are ancestors of t(vi) in TG, a con-tradiction. Then we consider the situation of j < i. Similarly,if t(vi) is not an ancestor of t(vj) in TG, then there also existsan edge xkxk+1 ∈ P ⊆ G[[Si]] such that t(xk) and t(xk+1) areancestors of t(vi) in TG, a contradiction. ■

By Lemma 4, a tail order of G is also a strong eliminationorder of G. To prove the correctness of the algorithm, it suf-fices to show that there are two vertices vg, vh ∈ NG[vi]−Si−1

with rep[vg] = rep[vh] if and only if there are two verticesin NG[vi] − Si−1 that belong to the same connected com-ponent of G[[Si−1]]. Instead of showing that the statementholds for vertex vi, we show in the following lemma that thestatement holds for every vertex vp with p ≥ i. Recall thatNG[v] = {v} ∪ NG(v).

Lemma 6. At the ith iteration, the following statement holdsfor every vertex vp with p ≥ i. There are two vertices vg, vh ∈NG[vp] − Si−1 with rep[vg] = rep[vh] if and only if thereare two vertices in NG[vp] − Si−1 that belong to the sameconnected component of G[[Si−1]].

186 NETWORKS—2010—DOI 10.1002/net

Page 5: The degree-preserving spanning tree problem in strongly chordal and directed path graphs

Proof. (⇒) Notice that we execute rep[vj] ← rep[vi]when vi is added to Si and vj ∈ NG(vi)−Si−1. By the definitionof G[[Si]], the edge vivj is in G[[Si]]. As rep[vg] = rep[vh],G[[Si−1]] has a path from vg to vh. Therefore, vg and vh arein the same connected component of G[[Si−1]].

(⇐) We prove it by induction on i. The statement holds fori = 1 as we have S0 = ∅ and rep[v] = v for each vertex v ∈V(G). Suppose the statement holds for i = k. We consideri = k + 1 below.

By the induction hypothesis, if vp with p ≥ k has twoneighbors in NG[vp] − Sk−1 that belong to the same con-nected component of G[[Sk−1]], then vp has two neighborsvg, vh ∈ NG[vp] − Sk−1 with rep[vg] = rep[vh]. If vk �∈ Sk ,then G[[Sk−1]] = G[[Sk]] and rep[v] remains unchanged forall vertices v ∈ V(G). Therefore, vp with p ≥ k + 1 still hastwo neighbors vg, vh ∈ NG[vp] − Sk with rep[vg] = rep[vh].We thus assume vk ∈ Sk in subsequent discussion, and let Ddenote the connected component of G[[Sk]] to which the twoneighbors of vp in NG[vp] − Sk belong.

First we consider the situation of vk �∈ V(D). Notice thatwe execute rep[vj] ← rep[vk] for each vertex vj ∈ NG(vk) −Sk−1 when vk is added to Sk . Since vk �∈ V(D), NG[vk]∩V(D)

is empty and so rep[v] remains unchanged for all verticesv ∈ V(D). It follows that vp with p ≥ k + 1 still has twoneighbors vg, vh ∈ NG[vp] − Sk with rep[vg] = rep[vh].

Next we consider the situation of vk ∈ V(D). Suppose thatvj is a neighbor of vp such that vj ∈ (NG[vp] − Sk) ∩ V(D).By Lemma 5, if j > k, then vj is a neighbor of vk in G.So, we have rep[vj] = rep[vk]. If j < k, then t(vk) is anancestor of t(vj) and so P(vp) contains t(vk) and t(vj). Noticethat vj may and may not be a neighbor of vk . Since P(vp)

contains t(vk) and G is 2-edge connected, there exists a ver-tex v� ∈ NG(vp) ∩ NG(vk). Further, we have v� �∈ Sk , forthe following reason. If v� ∈ Sk , then vpv�, vkv� ∈ G[[S�]],i.e., vpv�, vkv� ∈ G[[Sk−1]]. It follows that there exist twovertices vp, vk ∈ NG[vk] − Sk−1 that belong to the samecomponent of G[[Sk−1]] at the kth iteration, which con-tradicts the assumption vk ∈ Sk . Therefore, vp has twoneighbors vp, v� ∈ NG[vp] − Sk with rep[vp] = rep[v�] =rep[vk].

We summarize the discussion earlier as follows. Whenvp has two neighbors vg, vh in (NG[vp] − Sk) ∩ V(D)

with g, h > k, we have rep[vg] = rep[vh] = rep[vk].When vp has a neighbor vj in (NG[vp] − Sk) ∩ V(D) withj < k, there exist two vertices vp, v� ∈ NG[vp] − Sk

with rep[vp] = rep[v�] = rep[vk]. Now that vp either hastwo neighbors in (NG[vp] − Sk) ∩ V(D) whose indices aregreater than k or has at least one neighbor in (NG[vp] −Sk) ∩ V(D) whose index is smaller than k, the lemma thenfollows. ■

Theorem 7. For a directed path graph G with a tailorder provided, Algorithm Directed-Path outputs a maximumrealizable set Sn of G in O(n + m) time.

Proof. From Theorem 2 and Lemmas 4 and 6, the cor-rectness of Algorithm Directed Path is clear. Furthermore, itis also obvious that the algorithm takes O(n + m) time. ■

4. CONCLUSION

In this article, we present polynomial-time algorithms forthe DPST problem in strongly chordal and directed pathgraphs. The family of undirected path graphs is a proper sub-family of chordal graphs but a proper superfamily of directedpath graphs. Therefore, it is an interesting problem to designa polynomial-time algorithm for the DPST problem in undi-rected path graphs or to prove that it is NP-complete. Further,Broersma et al. [3] gave an O(n4) algorithm for the DPSTproblem in cocomparability graphs, it is also interesting toimprove this result.

REFERENCES

[1] R. Bhatia, S. Khuller, R. Pless, and Y.J. Sussmann, Thefull-degree spanning tree problem, Networks 36 (2000),203–209.

[2] A. Brandstädt, V.B. Le, and J.P. Spinrad, Graph classes:A survey, Society for Industrial and Applied Mathematics,Philadelphia, 1999.

[3] H. Broersma, O. Koppius, H. Tuinstra, A. Huck, T. Kloks, D.Kratsch, and H. Müller, Degree-preserving trees, Networks35 (2000), 26–39.

[4] G. Chang and G. Nemhauser, The k-domination and k-stability problems on sun-free chordal graphs, SIAM JAlgebraic Discrete Methods 5 (1984), 332–345.

[5] M.-S. Chang, Efficient algorithms for the domination prob-lems on interval and circular-arc graphs, SIAM J Comput 27(1998), 1671–1694.

[6] P. Damaschke, Degree-preserving spanning trees in small-degree graphs, Discrete Math 222 (2000), 51–60.

[7] P.F. Dietz, Intersection graph algorithms, PhD thesis, Com-puter Science Department, Cornell University, Ithaca, NY,1984.

[8] M. Farber, Characterizations of strongly chordal graphs,Discrete Math 43 (1983), 173–189.

[9] M.C. Golumbic, Algorithmic graph theory and perfectgraphs, Academic Press, New York, 1980.

[10] S. Khuller, R. Bhatia, and R. Pless, On local search andplacement of meters in networks, SIAM J Comput 32 (2003),470–487.

[11] M. Lewinter, Interpolation theorem for the number of degree-preserving vertices of spanning trees, Circuits Syst, IEEETrans 34 (1987), 205.

[12] M. Lewinter and M. Migdail-Smith, Degree-preserving ver-tices of spanning trees of the hypercube, NY Acad Sci GraphTheory Notes 13 (1987), 26–27.

[13] R. Paige and R.E. Tarjan, Tree partition refinement algo-rithms, SIAM J Comput 16 (1987), 973–989.

[14] J.P. Spinrad, Doubly lexical ordering of dense 0-1 matrices,Inform Process Lett 45 (1993), 229–235.

[15] R.E. Tarjan, A note on finding the bridges of a graph, InformProcess Lett 2 (1973,74), 160–161.

[16] R.E. Tarjan, Efficiency of a good but not linear set unionalgorithm, J ACM 22 (1975), 215–225.

NETWORKS—2010—DOI 10.1002/net 187