• 沒有找到結果。

Node-searching problem on block graphs

N/A
N/A
Protected

Academic year: 2021

Share "Node-searching problem on block graphs"

Copied!
21
0
0

加載中.... (立即查看全文)

全文

(1)Discrete Applied Mathematics 156 (2008) 55 – 75 www.elsevier.com/locate/dam. Node-searching problem on block graphs夡 Hsin-Hung Choua,∗ , Ming-Tat Kob , Chin-Wen Hoc , Gen-Huey Chend a Department of Information Management, Chang Jung Christian University, 396 Chang Jung Road, Section 1, Kway Jen, Tainan 711, Taiwan b Institute of Information Science, Academia Sinica, Taiwan c Department of Computer Science and Information Engineering, National Central University, Taiwan d Department of Computer Science and Information Engineering, National Taiwan University, Taipei, Taiwan. Received 16 September 2005; received in revised form 26 June 2007; accepted 12 August 2007 Available online 17 September 2007. Abstract The node-searching problem, introduced by Kirousis and Papadimitriou, is equivalent to several important problems, such as the interval thickness problem, the path-width problem, the vertex separation problem, and so on. In this paper, we generalize the avenue concept, originally proposed for trees, to block graphs whereby we design an efficient algorithm for computing both the search numbers and optimal search strategies for block graphs. It answers the question proposed by Peng et al. of whether the node-searching problem on block graphs can be solved in polynomial time. © 2007 Elsevier B.V. All rights reserved. Keywords: Avenue; Block graphs; Node-searching problem; Path-width; Vertex separation. 1. Introduction Node-searching problem, introduced by Kirousis and Papadimitriou [16], is a variant of the graph-searching problem. The allowable search moves in the node-searching problem are (1) placing a searcher on a vertex and (2) removing a searcher from a vertex. Initially, all edges are considered contaminated. A contaminated edge is cleared if both its endpoints are simultaneously guarded by searchers. The entire graph is cleared if all its edges are cleared. A search strategy is a sequence of search moves that will clear a graph with all edges contaminated. There are two subjects in the node-searching problem on a graph G. One is to compute the search number of G which is the minimum number of searchers needed to clear G. The other is to construct an optimal search strategy for G, which clears G using minimum number of searchers. The node-searching problem is equivalent to several important problems, such as the interval thickness problem [15] with applications in combinatorics, the survivability problem [2] with applications in communication networks, the gate matrix layout problem [21], the path-width problem [26], the vertex separation problem [14] with applications in VLSI layout, and the narrowness problem [19] with applications in natural language processing. 夡. This work was supported in part by Taiwan NSC under Grant no. NSC 92-2213-E-008-030.. ∗ Corresponding author. Tel.: +886 6 2785123x6073; fax: +886 6 2785657.. E-mail addresses: [email protected] (H.-H. Chou), [email protected] (M.-T. Ko), [email protected] (C.-W. Ho), [email protected] (G.-H. Chen). 0166-218X/$ - see front matter © 2007 Elsevier B.V. All rights reserved. doi:10.1016/j.dam.2007.08.007.

(2) 56. H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. w w w. w x. y. x. 2 y. x. y. y. x 4. u. v. u. v u. 2. w. 4. 5 u. v. v 3. 3. Fig. 1. An example of block graphs, blocks and block-cut-vertex graphs. (a) A block graph G. (b) Blocks of G. (c) The block-cut-vertex graph of G associated with block sizes in which square nodes represent blocks and circle nodes represent cut vertices.. The node-searching problem is NP-complete on planar graphs without vertex degree exceeding 3 [22], chordal graphs [9], starlike graphs [9], bipartite graphs [17], co-bipartite graphs [1] and bipartite distance-hereditary graphs [18]. For some special classes of graphs, it can be solved in polynomial time, such as trees [24,27], cographs [6], permutation graphs [5], k-starlike graphs [25] and partial k-trees [4] for a fixed k 1. For trees, the following results are known. In [8], Ellis et al. presented a linear-time algorithm to compute the vertex separation of a tree using the labelling technique. However, the algorithm needs O(n log n) time for computing optimal linear layouts of trees. In [24], Peng et al. presented a linear-time algorithm to construct optimal search strategies for trees based on the avenue concept. Independently, Skodinis [27] proposed another linear-time algorithm for trees in optimal linear layout formulation. Basically, these two algorithms are the same as designed by the technique of dynamic programming but different from their presentations. In this paper, the labelling technique and the avenue concept are adopted to design our algorithm and will be introduced later. A vertex v in a graph G is called a cut vertex if the deletion of v and all edges incident to it increases the number of connected components in G. A vertex that is not a cut vertex is called a non-cut vertex. A maximal connected subgraph of G without cut vertex (i.e., a maximal 2-connected component of G) is called a block [28]. In [11], Harary and Prins defined the block-cut-vertex graph T (G) of a graph G as the graph in which the blocks and cut vertices of G are the vertices and for all (vK , vu ), vK represents a block K, vu represents a cut vertex u and u ∈ K, are the edges. It is known that T (G) is a tree if G is connected. A block graph is a graph and all its blocks are complete subgraphs [10]. A block graph can be represented by its block-cut-vertex graph with a block size on each vertex representing a block. An example of block graph, its blocks and block-cut-vertex graph are shown in Fig. 1. Various characterizations and optimization problems on block graphs have been studied in [13,12,7,29]. However, whether the node-searching problem on block graphs can be solved in polynomial time is still unknown so far [23]. In this paper, we answer the open question by providing an efficient polynomial-time algorithm for computing both the search numbers and an optimal search strategies of block graphs. In Section 2, we introduce the definitions, notations and properties that will be used in this paper. In Section 3, we generalize the avenue concept on trees to block graphs. In Section 4, we define the data structures that will be used later. In Section 5, an efficient algorithm is introduced. In Section 6, time complexity of the algorithm is analyzed. The conclusion is given in the last section. 2. Preliminaries In this paper, we consider undirected connected graphs. For a graph G, we use V (G) and E(G) to denote the vertex set and edge set of G, respectively. Given two sets X and Y, we use X ∪ Y , X ∩ Y and X\Y to denote their union, intersection and difference, respectively. For two graphs G1 and G2 , we use G1 ∪ G2 to denote the graph with vertex set V (G1 )∪V (G2 ) and edge set E(G1 )∪E(G2 ). An induced subgraph H in G is a subgraph such that for all u, v ∈ V (H ), (u, v) ∈ E(H ) if and only if (u, v) ∈ E(G). The subgraph of G induced by S ⊆ V (G), denoted by G[S], is the induced subgraph of G with S as the vertex set. For a subset X ⊆ V (G), G\X is the subgraph of G induced by V (G)\X. For a vertex u ∈ V (G), a connected component of G\{u} is called a branch of G at u. The branch of G at u containing vertex v is denoted by (G)u,v . We define the fork of G at u containing v, denoted by [G]u,v , as the subgraph of G induced by V ((G)u,v ) ∪ {u}. Fig. 2 shows an example of branches and forks..

(3) H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75 u. u y. x. z. x. y. z. u y. x. 57. u z. Fig. 2. Branches and forks of a graph G. (a) G. (b) Branches of G at u. (c) Forks of G at u.. u. x. y. v. u. x. x. y. v. a. x a. u. x. y. v y. Fig. 3. An example of path forks, non-path forks, non-block forks and enclosure subgraphs, in which P = u, x, y, v and K is the block containing x and y. (a) A block graph G. (b) Path forks of P at x. (c) Non-path forks of P at x. (d) Non-block forks of K. (e) Enclosure subgraph of G at (x, y).. A path in a graph is a sequence of vertices, denoted by v1 , v2 , . . . , vr , so that two vertices are adjacent if and only if they are consecutive in the sequence. A path in a graph is called an induced path if the subgraph induced by its vertex set is also a path. Given a path P of a block graph G and a cut vertex u ∈ V (P ), a branch (fork, resp.) at u is called a path branch (path fork, resp.) of P at u if it contains at least one vertex in V (P )\{u}; otherwise it is called a non-path branch (non-path fork, resp.) of P at u. Given a block K of a block graph G and a vertex u in K, the subgraph G\V ([G]u,v ) (G\V ((G)u,v ), resp.) for any vertex v in K other than u, is called the non-block branch (non-block fork, resp.) of K at u and denoted by (G)K,u ([G]K,u , resp.). Notice that (G)K,u may be a disconnected subgraph. For any edge (x, y) ∈ E(K), the enclosure subgraph of G at (x, y) from x to y, denoted by {G}x,y , is defined as G\V ([G]K,x ∪ (G)K,y ). Notice that {G}x,y and {G}y,x are isomorphic. Refer to Fig. 3 where path forks, non-path forks, non-block forks and enclosure subgraphs are shown. 2.1. Progressive search strategies In a search strategy, a guarded vertex is a vertex with a searcher and a cleared edge is recontaminated if there exists a path connecting this edge to a contaminated one and none of the vertices along the path is guarded. A search strategy is progressive (also called monotone in [3]) if no edge recontamination occurs during the search strategy. In [16], Kirousis and Papadimitriou showed that there exists a progressive optimal search strategy for any graph. Therefore, we only consider progressive search strategies in the following. In this paper, we adopt two representations of search strategies. One is the operation representation, in which a search strategy is represented by a sequence of search moves “place a searcher on a vertex” and “remove a searcher from a vertex”. The other is the set representation, in which a search strategy S for a graph G is represented by a sequence of vertex subsets (X1 , X2 , . . . , Xr ), where each Xi ⊆ V (G) is the set of guarded vertices at stage i in S for 1 i r. Since S is progressive, it satisfies (1) for any vertex v ∈ V (G), the stages at which v is guarded are consecutive and (2) for any edge (x, y) ∈ E(G), there exists a stage i such that x, y ∈ Xi [15]. Obviously, conditions (1) and (2) are also satisfied by the reverse strategy of S, denoted by S rev = (Xr , Xr−1 , . . . , X1 ). Thus, S rev is also a progressive search strategy for G. For any vertex v ∈ V (G), the consecutive stages at which v is guarded are denoted by an interval [lv , rv ], which is.

(4) 58. H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. a. d. c. b. e. stage 1 2 3 4 5 6 7 8 9 10. search move Place searcher 1 on a Place searcher 2 on b Place searcher 3 on c Remove searcher 1 from a Remove searcher 2 from b Place searcher 1 on d Place searcher 2 on e Remove searcher 3 from c Remove searcher 1 from d Remove searcher 2 from e. guarded set a a,b a,b,c b,c c c,d c,d,e d,e e. Fig. 4. Two representations of a search strategy for a graph G. (a) G. (b) Two representations.. called the guarded interval of v in S. The number of searchers used in S, denoted by #(S), is max{|Xi ||1 i r}. We use ns(G) to denote the search number of G, i.e., ns(G) = min{#(S)|S is a search strategy for G}. In the set representation, the corresponding search moves at stage i are removing searchers from vertices in Xi−1 \Xi and placing searchers on vertices in Xi \Xi−1 , for i = 1, 2, . . . , r + 1 and X0 = Xr+1 = ∅. Fig. 4 gives an example for the two representations. Let Q be a block of G. There exists an index i such that V (Q) ⊆ Xi , which is referred to as the clique containment property [9]. Let H be a subgraph of G. The induced search strategy of S for H, denoted by S[H ], is (X1 ∩ V (H ), X2 ∩ V (H ), . . . , Xr ∩ V (H )). Notice that the guarded vertex sets in S[H ] may be empty sets, but it does not obstruct S[H ] satisfying the progressive properties and being a search strategy for H. It follows that ns(H ) ns(G). 2.2. Oriented search strategies In a search strategy, the start vertex is the first vertex a searcher is placed on, and the terminal vertex is the last vertex a searcher is removed from. Notice that in the set representation, any vertex in the first (last, resp.) guarded vertex set can be the start (terminal, resp.) vertex. Let u and v be two vertices of a graph G. An oriented search strategy for G from u to v is a search strategy with u as the start vertex and v as the terminal vertex. The oriented search number of G from u to v, denoted by os(G, u, v), is the minimum number of searchers used over all oriented search strategies for G from u to v. An oriented search strategy for G from u to v is optimal if it uses os(G, u, v) searchers. Notice that an optimal oriented strategy may not be an optimal search strategy. The reverse strategy of an oriented search strategy S for G from u to v is the search strategy from v to u. It follows that os(G, u, v) = os(G, v, u). We define os(G, u) = min{os(G, u, v)|v ∈ V (G)}. Then ns(G) = min{os(G, u)|u ∈ V (G)}. Lemma 1. Let G be a graph and u, v two vertices of G. Then ns(G) os(G, u)os(G, u, v) ns(G) + 1. Proof. By definition, we have that ns(G) os(G, u) os(G, u, v). The rest needs to be proved is os(G, u, v) ns (G) + 1. Suppose S = (X1 , X2 , . . . , X ) is an optimal search strategy for G. Let [lu , ru ] and [lv , rv ] be the guarded intervals of u and v in S, respectively. Without loss of generality, we assume that lu lv ; otherwise we can consider S rev instead. Let us consider S = (X1 , X2 , . . . , X ) where Xi = Xi ∪ {u} for 1 i lu − 1, Xi = Xi ∪ {v} for rv + 1 i , and Xi = Xi for others. It is obvious that S is an oriented search strategy for G from u to v with #(S ) #(S) + 1 = ns(G) + 1.  Let S be an oriented search strategy for G from u to v. By the progressiveness of S, along any path from u to v at any stage, there is at least one guarded vertex on the path separating the cleared edges and contaminated edges. By this simple observation, we derive Lemma 2. Lemma 2. Let G be a graph and u, v two vertices of G. If there exists a subgraph H of G disjoint to a path connecting u and v, then os(G, u, v) ns(H ) + 1..

(5) H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. 59. In Lemma 3, we prove two bounds for os(G, u, v) that will be used later. Lemma 3. Let G be a block graph and u, v two vertices of G. (1) Let P be the shortest path connecting u and v. For any edge (x, y) on P, os(G, u, v) ns({G}x,y ) + 1. (2) If u is a non-cut vertex of G, then os(G, u, v)ns(G\{u}) + 1. Proof. (1) Let K be the block of G containing both x and y. Suppose S = (X1 , X2 , . . . , X ) is an optimal oriented search strategy for G from u to v. Let S = S[{G}x,y ] = (X1 , X2 , . . . , X ). By the clique containment property and the definition of induced search strategies, there exists a stage t at which Xt ⊇ V (K) and Xt ⊇ V (K)\{x}. Suppose [ly , ry ] is the guarded interval of y in S . Since y ∈ V (K), it follows that ly t ry . Let us consider S. = (X1. , X2. , . . . , X. ) where Xi. = Xi \{y} for all i

(6) = t, and Xt. = Xt . Since y is a non-cut vertex of {G}x,y and all edges incident to y are cleared at stage t, S. is a search strategy for {G}x,y . Let us compare Xi with Xi. for all 1 i . When i

(7) = t, Xi contains at least one vertex of V (P ). Since Xi. ⊆ Xi and Xi. contains no vertex of V (P ) except i = t, |Xi ||Xi. | + 1 for i

(8) = t. When i = t, x ∈ Xt but x ∈ / Xt. . Thus, |Xt | |Xt. | + 1. It follows that. os(G, u, v) = #(S) #(S ) + 1ns({G}x,y ) + 1. (2) Let Q be the block containing u in G. Suppose T = (Y1 , Y2 , . . . , Y ) is an optimal search strategy for G\{u}. Let [lv , rv ] be the guarded interval of v in T. By the clique containment property, there exists a stage t at which Yt ⊇ V (Q)\{u}. Without loss of generality, we assume that lv t; otherwise we consider T rev instead. Let us consider T = (Y1 , Y2 , . . . , Y ) where Yi = Yi ∪ {v} for 1 i lv − 1, Yi = Yi ∪ {u} for t i , and Yi = Yi for others. It is obvious that T is an oriented search strategy for G from v to u with #(T ) #(T ) + 1 = ns(G\{u}) + 1. It follows that os(G, u, v)ns(G\{u}) + 1.  3. Basic concepts We generalize the avenue concept to block graphs whereby two data structures label and strategy tree are defined to keep track of the structure information of a rooted block graph. For a block graph G and an integer k 2, the vertex condition with respect to k (VCk ) is that for all x ∈ V (G), there are at most two branches at x with search numbers at least k and the block condition with respect to k (BC k ) is that for all block K in G, there exists an edge (x, y) ∈ E(K) such that ns({G}x,y ) < k. Theorem 4. For a block graph G and an integer k 2, G satisfies conditions VCk and BC k if and only if ns(G)k. Before proving Theorem 4, we need the following lemmas. In the following Lemmas 5–7, G is a block graph satisfying conditions VCk and BC k for some integer k 2, and Ak is the set of vertices x in V (G) having exactly two branches of search number no less than k. Lemma 5. Let u be a vertex in Ak and v be an arbitrary vertex in G other than u. Then ns((G)v,u ) k. Proof. Let B be the branch at u with ns(B)k which does not contain v. Obviously, (G)v,u B. Thus, (G)v,u is a branch at v with ns((G)v,u ) k.  Lemma 6. Assume that |Ak |1. Then (1) (2) (3) (4). Ak induces a path in G. For all blocks K in G, |Ak ∩ K|2. Let K be a block such that Ak ∩K ={x}. Then there exists u ∈ V (K) such that ns([G]K,x ) < k and ns({G}x,u ) < k. Let K be a block such that Ak ∩ K = {x, y}. Then ns({G}x,y ) < k.. Proof. (1) The case when |Ak | = 1 is trivial. Let Gk denote the subgraph induced by Ak . It suffices to prove that Gk is connected and there is no vertex of degree greater than or equal to 3 in Gk . Suppose that x, y ∈ Ak are two nonadjacent vertices of G. Let z be a vertex on the shortest path connecting x and y in G. Obviously, two branches (G)z,x and (G)z,y.

(9) 60. H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. at z are disjoint. Since x, y ∈ Ak , by Lemma 5, we have that ns((G)z,x ) k and ns((G)z,y ) k. It follows that z ∈ Ak . Thus, Gk is connected. If there is a vertex v of degree no less than 3 in Gk , then v has at least three branches of G with search numbers no less than k. It contradicts to the condition VCk . Thus, Ak induces a path in G. (2) If there exists a block which contains three vertices in Ak , it implies that Gk contains a triangle, which contradicts to (1). Thus, |Ak ∩ V (K)| 2. Let (x , y ) be an edge of K such that there exists a vertex v ∈ Ak ∩ K but v ∈ / {x , y }. For v ∈ Ak , ns((G)K,v ) k.. Since Gx ,y ⊃ (G)K,v , we have that ns(Gx ,y ) k. Suppose that (x , y ) be an edge in K such that ns(Gx ,y ) < k. Then {x , y } ⊃ Ak ∩ V (K). (3) Without loss of generality, assume that x = x. For (G)y ,x ⊃ (G)K,x , ns((G)y ,x ) k. Since y ∈ / Ak , y has at most one branch with search number no less than k. Thus, ns((G)K,y ) < k. (4) In this case, {x , y } = Ak ∩ V (K). Thus, ns(Gx,y ) < k.  Lemma 7. Assume that |Ak | = 0, and for all x ∈ V (G), there is exactly one branch at x of search number no less than k. Then there is an unique block K such that ns((G)K,u ) < k and ns(G\V ([G]K,u )) k for all u ∈ V (K). Proof. To prove the assertion, we construct a directed block-cut-vertex graph Tˆ of G from the block-cut-vertex graph T of G by assigning directions to edges of T as follows. For each edge (vK , vu ) in T corresponding to block K and cut vertex u in G, (vK , vu ) is directed from vK to vu in Tˆ if ns((G)K,u ) k, and from vu to vK if ns(G\V ([G]K,u ))k. If vu is directed to vK in Tˆ , all block vertices vQ adjacent to vu other than vK are directed to vu since [G]Q,u ⊇ G\V ([G]K,u ) and ns(G\V ([G]K,u ))k. Since each cut vertex has exactly one outgoing edge and each edge has one endpoint a cut vertex in Tˆ , each edge has at least one way directed. If vK is directed to vu in Tˆ , vu must have one outgoing edge directed to a block vertex other than vK . It follows that Tˆ has no cycle because if Tˆ has a bidirected edge (vK , vu ), then u is a cut vertex with two branches having search numbers k, which is a contradiction. Thus, there exists at least one sink in Tˆ and the sink must be a block vertex. Assume that Tˆ has two different block vertices vX and vY which are sinks. Let x be the cut vertex of X such that [G]X,x ⊇ Y . Then vx has two outgoing edges, which is a contradiction. Therefore, G has a unique block K which satisfies the property that ns(G\V ([G]K,u ))k for all u ∈ V (K). Since each vertex has exactly one branch with search number at least k, it follows that ns((G)K,u ) < k for all u ∈ V (K).  Definition 8. Let P = v1 , . . . , vr  be an induced path in G. Let Gi be the subgraph consisting of the non-path forks of P at vi for all 1i r − 1 and Gi,i+1 be the subgraph induced by V ({G}vi ,vi+1 ) ∪ {vi }. Let Si be any optimal oriented search strategy for Gi from vi to vi for all 1 i r, and Si,j be any optimal oriented search strategy for Gi,i+1 from vi to vi+1 for all 1 i < r. The search strategy S composed of S1 , S1,2 , S2 , S2,3 , . . . , Sr−1 , Sr−1,r , Sr is called a basic search strategy for G along P. The number of searchers used in S is max{ns(Gi ) + 1, os(Gi,i+1 , vi , vi+1 )|1 i r − 1}. Proof of Theorem 4. Sufficiency: It suffices to prove that if G does not satisfy VCk or does not satisfy V B k , then ns(G) k + 1. Assume that u and v are the start vertex and the terminal vertex of an optimal search strategy for G and let P be the shortest path connecting u and v. First, let us consider the case when G does not satisfy VCk . Then there exists a vertex x at which there are at least three branches with search numbers no less than k. Then u and v are contained in at most two of them. Thus, we can find a branch at x with search number no less than k which is disjoint to P. By Lemma 2, we have that ns(G) k + 1. Next, let us consider the case when G does not satisfy BC k . Then there exists a block K such that ns({G}x,y ) k for all (x, y) ∈ E(K). If P contains an edge (x , y ) in K, by Lemma 3(1), we have that ns(G) = os(G, u, v) ns({G}x ,y ) + 1k + 1. Otherwise, u and v must be both located in [G]K,x. for some x. ∈ V (K). Let y. be a vertex other than x. in K. Since G does not satisfy BC k , we have that ns({G}x. ,y. ) k. Since P contains no edge in K, {G}x. ,y. is disjoint to P. By Lemma 2, we have that ns(G) k + 1. Necessity: Let Ak be the set of vertices in which each vertex has exactly two branches with search numbers at least k..

(10) H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. 61. First, let us consider the case when |Ak |1. By Lemma 6(1), we have that Ak induces a path in G. Suppose Pˆ = v2 , v3 , . . . , vr−1  for r 3 is the path induced by Ak . By Lemma 6(4), there exists a vertex v1 (vr , resp.) in the non-path branch at v2 (vr−1 , resp.) such that ns(G\V ([G]v1 ,v2 )) < k and ns({G}v1 ,v2 ) < k (ns(G\V ([G]vr ,vr−1 )) < k and ns({G}vr−1 ,vr ) < k, resp.). Let P = v1 , v2 , . . . , vr−1 , vr . Consider the basic search strategy for G along P. Let Gi be the subgraph consisting of the non-path forks of P at vi for all 1 i r − 1 and Gi,j be the subgraph induced by V ({G}vi ,vi+1 ) ∪ {vi }. By Lemma 3(2), we have that os(Gi,i+1 , vi , vi+1 ) ns({G}vi ,vi+1 ) + 1 k, and os(Gi , vi , vi )ns(Gi ) + 1k. It follows that the number of searchers used in the basic search strategy along P is no greater than k. Thus, ns(G) k. Next, let us consider the case when |Vk | = 0. If there exists a vertex u at which all branches have search numbers less than k, then the number of searchers used in the basic search strategy along u is no greater than k. Otherwise, every vertex has exactly one branch with search number at least k. By Lemma 7, we have that there is an unique block K such that ns((G)K,u ) < k and ns(G\V ([G]K,u ))k for all u ∈ V (K). Since G satisfy BC k , there is an edge (u, v) ∈ E(K) such that Gu,v < k, ns((G)K,u ) < k and ns((G)K,v ) < k. It follows that the number of searchers used in the basic search strategy along u, v is no greater than k. Thus, ns(G)k.  Based on the above characterization, we define an avenue of a block graph. Definition 9. A path P = v1 , v2 , . . . , vr  is an avenue of a block graph G, if the following conditions hold: (1) If r = 1, then all branches of G at v1 have search numbers smaller than ns(G). (2) If r > 1, then (a) each of v1 and vr has only one branch, (G)v1 ,v2 and (G)vr ,vr−1 respectively, with search number ns(G); (b) for 2 i r − 1, vi has exactly two branches, (G)vi ,vi−1 and (G)vi ,vi+1 , with search numbers ns(G); (c) for 1 j r − 1, ns({G}vj ,vj +1 ) < ns(G). Let Gi be the subgraph consisting of the non-path forks of P at vi for all 1 i r −1 and Gi,j be the subgraph induced by V ({G}vi ,vi+1 )∪{vi }. Since os(Gi,i+1 , vi , vi+1 ) ns({G}vi ,vi+1 +1 ns(G), and os(Gi , vi , vi ) ns(Gi )+1 ns(G), the number of searchers used in the basic search strategy along P is no greater than ns(G), i.e., the basic search strategy along an avenue is an optimal search strategy. When r = 1, the only vertex on P is called a hub, and in this case a block graph may have more than one hub. When r > 1, the vertices with exactly two branches having search numbers ns(G) are called critical vertices and the vertices with only one branch having search number ns(G) are called outlet vertices. They are all called avenue vertices. As shown in the proof of Theorem 4, all avenues share the same critical vertices and they can be different only on the outlet vertices. An edge in any avenue is called a critical edge. A block containing critical edges is called a critical block. Lemma 10. K is a critical block of a block graph G if and only if ns(G\V ([G]K,x )) = ns(G) for all x ∈ V (K). Proof. Necessity: If G contains no critical vertex, the assertion is true by Lemma 7. Consider the case when K contains at least one critical vertex. Let u ∈ V (K) be the critical vertex and (u, v) ∈ E(K) be the critical edge in G. Since the basic search strategy along an avenue is an optimal search strategy, it implies that ns((G)u,v ) = ns((G)v,u ) = ns(G). Since (G)u,v = G\V ([G]K,u ), it follows that ns(G\V ([G]K,u )) = ns(G). By Lemma 5, we have that ns((G)x,u ) ns(G) for any x ∈ V (K) other than u. Since (G)x,u = G\V ([G]K,x ), it follows that ns(G\V ([G]K,x )) = ns(G). Sufficiency: If ns(G\V ([G]K,x )) = ns(G) for all x ∈ V (K), every vertex of G has at least one branch with search number ns(G). Thus, G has no hub. Let P be an avenue of G with two different endpoints u and v. Notice that os(G, u, v) = ns(G). Assume that P contains no edges in K. Then there exists a vertex w ∈ V (K) such that [G]K,w ⊇ P . Since G\V ([G]K,w ) has ns(G\V ([G]K,w )) = ns(G) and is disjoint to P, by Lemma 2, we have that os(G, u, v)ns(G) + 1, which is a contradiction. Thus, K contains an edge of P, i.e., a critical edge. It follows that K is a critical block of G.  4. Structure information A rooted block graph G[u] is a block graph G with a specified vertex u as its root. For any vertex v in G[u], the parent of v is its neighbor on the shortest path connecting to u, the children of v are its neighbors which are not contained in.

(11) 62. H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. u u. u. u. u. u. Fig. 5. Types of rooted block graphs. (a) Type H. (b) Type I. (c) Type E. (d) Type Mv . (e) Type Mb .. (G)v,u and the children of v which are cut-vertices in G are called the cut-children of v. For any vertex x other than u in G[u], the subgraph rooted at x is the one consisting of all forks at x without u. The structure information for G[u] consists of two data structures: label and strategy tree, which provides the search number of G and the skeleton of an optimal search strategy for G. Our approach is to compute the structure information of G[u] recursively from that of the subgraphs rooted at the cut-children of u. 4.1. Labelling According to the location of u relative to the avenue of G, G[u] is classified into five types, H, E, I, Mv and Mb . The type of G[u], denoted by (G[u]), is defined as follows (see Fig. 5). Definition 11. Let G[u] be a rooted block graph. (1) If u is a hub of G, then (G[u]) = H . (2) If (i) G has a hub but u is not a hub of G, or (ii)G has no hub and u is located in a non-block fork of a critical block at an outlet vertex, then (G[u]) = E. (3) If u is a critical vertex of G, then (G[u]) = I . (4) If u is located in a branch at a critical vertex without any avenue vertex, then (G[u]) = Mv . (5) If u is located in a non-block fork of a critical block without any avenue vertex, then (G[u]) = Mb . Lemma 12. Let G[u] be a rooted block graph. If (G[u]) = H or E, then os(G, u) = ns(G); otherwise os(G, u) = ns(G) + 1. Proof. First, let us consider the case when (G[u]) = H or E. If u is a hub or an outlet vertex, then os(G, u) = ns(G). Otherwise, let h be a hub or an outlet vertex such that u is contained in a branch at h without any avenue vertex. Notice that h is a non-cut vertex in [G]h,u and ns((G)h,u ) < ns(G). By Lemma 3(2), we have that os([G]h,u , u, h) ns(G). With os(G\V ((G)h,u ), h)ns(G), we obtain os(G, u) ns(G). Since ns(G) os(G, u), it follows that os(G, u) = ns(G). In the following two cases, let v be a vertex such that os(G, u, v) = os(G, u) and P the shortest path connecting u and v. Secondly, let us consider the case when (G[u]) = I or Mv . Let  be the critical vertex of G closest to u. Since  has two branches with search numbers ns(G), we can find a branch at  disjoint to P with search number ns(G) no matter where v is located. By Lemma 2, we have that os(G, u) = os(G, u, v) ns(G) + 1. By Lemma 1, we have that os(G, u)ns(G) + 1. It follows that os(G, u) = ns(G) + 1. Finally, let us consider the case when (G[u]) = Mb . Let K be the critical block of G and x a vertex of K such that u is contained in [G]K,x . Since x is not an avenue vertex, ns({G}x,w ) = ns(G) for any vertex w ∈ V (K) other than x. If P contains no edge of K, then there exists a vertex z of K other than x such that ns({G}x,z ) = ns(G) and {G}x,z is disjoint to P. By Lemma 2, we have that os(G, u, v)ns(G) + 1. Next, if P contains an edge (x, y) of K, by Lemma 3(1), we have that os(G, u) = os(G, u, v)ns({G}x,y ) + 1 ns(G) + 1. It follows that os(G, u) = ns(G) + 1. .

(12) H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. u. u v3 v1. 63. v2. v3 v1. v2. u. u v3. Fig. 6. Critical vertices, critical edges and outlet vertices of a rooted block graph G[u] corresponding to its label (G[u]). (a) G[u]. (b) (v1 , v2 ) is a critical edge of G[u]. (c) v3 is a critical vertex of G[u; (v1 , v2 )]. (d) u is an outlet vertex of G[u; (v1 , v2 ), v3 ].. Let 1 , 2 , . . . , i be a sequence of vertices or edges of a rooted block graph G[u]. We denote G[u; 1 , 2 , . . ., i ] as the subgraph of G recursively defined as follows: (1) (2) (3) (4). if i = 0, then G[u; 1 , 2 , . . . , i ] = G; when i = u, G[u; 1 , 2 , . . . , i ] = ∅; when i = v ∈ V (G) other than u, G[u; 1 , 2 , . . . , i ] = (G[u; 1 , 2 , . . . , i−1 ])v,u ; when i = (x, y) ∈ E(K) for some block K in G[u; 1 , 2 , . . . , i−1 ], if u is in {G[u; 1 , 2 , . . . , i−1 ]}x,y , then G[u; 1 , 2 , . . . , i ] = {G[u; 1 , 2 , . . . , i−1 ]}x,y , else G[u; 1 , 2 , . . . , i ] is undefined.. Analogous to the label of a rooted tree defined in [8], we define the label of a rooted block graph as follows. Definition 13. For any rooted block graph G[u], a label of G[u] consists of a list of structure records (R1 , R2 , . . . , Rp ) for some integer p 1, in which each Ri consists of three fields [si , i , i ] where si is a positive integer, i is a type, and i is either a vertex or an edge, such that (1) s1 > s2 > · · · > sp 1. (2) For 0 i < p, ns(G[u; 1 , 2 , . . . , i ]) = si+1 . (3) For 1i < p, i = Mv or Mb . (a) When i = Mv , i is the critical vertex of G[u; 1 , 2 , . . . , i−1 ] such that u is located in a branch at i containing no avenue vertex. (b) When i = Mb , i is a critical edge of G[u; 1 , 2 , . . . , i−1 ] whose enclosure subgraph contains u. (4) p = u and p = H, E, or I. Fig. 6 shows critical vertices, critical edges and outlet vertices of a rooted block graph corresponding to its label ([6, Mb , (v1 , v2 )], [5, Mv , v3 ], [4, E, u]). Fig. 7 gives an example that a rooted block graph G[u] with neither critical vertices nor hubs may have more than one avenue. The labels of G[u] are (a) ([7, Mb , (v1 , v2 )], [6, Mv , v7 ], [5, E, u]) and (b) ([7, Mb , (v2 , v3 )], [6, Mv , v4 ], [3, H, u]) for two different avenues in Fig. 7(a) and (b), respectively. Let i = ([s1i , i1 , i1 ], [s2i , i2 , i2 ], . . . , [slii , ili , ili ]) for i = 1, 2 be two labels. We say labels 1 > 2 if the following conditions hold: (1) s11 > s12 , or.

(13) 64. H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. u. u v1. v2. v4 v3. v5. v1. v2 v5. v4 v3 v6. v6. v7. v7. Fig. 7. Two different avenues of a rooted block graph G[u]. (a) (v1 , v2 ). (b) (v2 , v3 ).. (2) s11 = s12 and (s21 , s31 , . . . , sl11 ) > (s22 , s32 , . . . , sl22 ), or (3) (s11 , s21 , . . . , sl11 ) = (s12 , s22 , . . . , sl22 ), i.e., l1 = l2 and 1l1 > 2l2 by the order of types Mb = Mv > I > E > H . The labels of G[u] with minimum order can be used to represent the structure information of G[u] precisely for the merging routine, as shown later. In the following, we use (G[u]) to denote a minimum label of G[u]. With respect to (G[u]), we use (G[u]) to denote 1 . 4.2. Strategy path system A path P is a k-strategy path of a block graph G if the basic search strategy along P uses k searchers. A k-strategy path of G with k = ns(G) is called an optimal strategy path of G. Clearly, an avenue of G is an optimal strategy path of G. For convenience, k is omitted without ambiguity. In the following, we represent a strategy path by a sequence of alternately vertices and edges, e.g., P =v1 , e1 , v2 , e2 , v3 , . . . , vr  where ei denotes the edge (vi , vi+1 ) for 1 i r −1. Definition 14. For any strategy path P = v1 , e1 , v2 , . . . , vr  of a block graph G which is not an isolated vertex, the decomposition of G w.r.t. P, denoted by FP (G), is a sequence of proper subgraphs of G defined as follows: (1) If r = 1 and v1 is a non-cut vertex of G, then FP (G) consists of the only branch of G at v1 . (2) Otherwise, FP (G) consists of all non-path forks at the vertices of P and all enclosure subgraphs at the edges of P, in which the enclosure subgraph at ei is placed after the non-path forks at vi and before the non-path forks at vi+1 . For each element F in FP (G) which is a branch, non-path fork or enclosure subgraph at x, we call F a p-subgraph of G at x of P for short. A list L = [L1 , L2 , . . . , Lp ] consists of a finite number of ordered elements, in which Li is either a path or a list. In the following, we define the strategy path system of a block graph G to be a list of strategy paths to depict the skeleton of a search strategy for G. Definition 15. For any block graph G and an integer k ns(G), a k-strategy path system D(G, k) is a list of strategy paths recursively defined as follows: (1) If G is an isolated vertex v, then D(G, k) = [< v > , ∅]. (2) Otherwise, let P be a k-strategy path of G and FP (G) = (F1 , F2 , . . . , Ft ), then D(G, k) = [P , [D(F1 , k1 ), D(F2 , k2 ), . . . , D(Ft , kt )]] where ns(Fi ) ki < k for 1 i t. In the definition of D(G, k), the ki -strategy path Pi of Fi is called the main strategy path of Fi . Relatively, Fi is called the container of Pi ..

(14) H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. v10 (v10,v9) v9. v26. v4 v5. v1 v3 v15. v7. v9 v10. v16. v27. v23 v22 v28. v8 v v32 17 v31. v14. 6. (v9,v8) v8. 6. v24. 5' v11 5. v29. v5 4' v12 4' v24 4 3' v13 3' v25 4' 2' v 14 2' v 26 3' 1' v 15 1' v 27 2'. v30. v18. v11 v21 v13 v12. 6. 6. 6. (v8,v16) v16 6. 6. v23 (v23,v22) v22 (v22,v28) v28. v6. v2. v25. 65. v20 v19. 5. 5. 5. (v 5,v 6) v6 4. 4. v4. v7 2'. v3. v8 1'. v2. 5 v17. v29 4' v30 3' v31 2' v32 1'. 5'. v18 4' v19 3' v20 2' v21 1'. 1' v1. Fig. 8. A strategy tree for a rooted block graph G[v6 ]. (a) G[v6 ]. (b) A strategy tree.. 4.3. Strategy tree Given a k-strategy path system D(G, k) of a block graph G with ns(G) k, we propose a data structure called strategy tree to store all the strategy paths in D(G, k). For distinction, we call the vertices (edges, resp.) of a strategy tree nodes (arcs, resp.). For any two adjacent nodes x and y in a strategy tree, we use the notation x → y or y ← x to denote an arc directed from x to y. In such a case, y is called the parent of x and x is called the child of y. Definition 16. Given a k-strategy path system D(G, k) for a rooted block graph G[u] and an integer k ns(G), a k-strategy tree of G[u], denoted by T(G[u], k), is a rooted tree constructed as follows. (1) V (T(G[u], k)) consists of two kinds of nodes: vertex-nodes and edge-nodes. There is a one-to-one mapping (.) from the vertex-nodes (edge-nodes, resp.) in T(G[u], k) to the vertices (edges, resp.) in D(G, k). (2) E(T(G[u], k)) consists of two kinds of arcs: path-arcs and layer-arcs. For each strategy path P = v1 , e1 , v2 , . . . , vr  in D(G, k), let x1 , x2 , . . . , x2r−1 be the sequence of nodes corresponding to the elements of P, (a) we arbitrarily choose a node xp as the root, then xi → xi+1 for 1 i p − 1 and xi ← xi+1 for p i 2r − 2 are added as path-arcs; (b) for each p-subgraph F of G at xj of P, 1 j 2r − 1, let y be the root of the main strategy path of F, then y → xj is added as a layer-arc. Here, k is also omitted without ambiguity and a k-strategy tree of G[u] with k = ns(G) is called an optimal strategy tree of G[u]. For each node x in T(G[u], k), we associate x with an integer id(x) to denote the number of searchers used for the strategy path containing vertex (x) in D(G, k). Let (x) denote the sequence of nodes corresponding to the strategy path containing vertex (x) in D(G, k). If (x) contains only one node x and x corresponds to a non-cut vertex, we mark id(x) with a prime “ ”. Notice that id(x) is not equal to id(x) marked with a prime. Then we can identify whether an arc x ← y is a path-arc or layer-arc according to id(x) and id(y). That is, if id(x) = id(y), then it is a path-arc; otherwise it is a layer-arc. Fig. 8 shows a strategy tree of a rooted block graph G[v6 ], in which circle nodes denote vertices, square nodes denote edges, solid arrows denote path-arcs and dash arrows denote layer-arcs. Given an optimal strategy tree T of G[u], rooted at x, we design the following algorithm to construct an optimal search strategy for G. For any node y in T, we use Ty to denote the subtree rooted at y. Algorithm. SEARCH(T , x) /* Input: an optimal strategy tree T of G[u], rooted at x. */ /* Output: an optimal search strategy. */ find (x) = (x1 , x2 , . . . , xr ); place a searcher on (x1 );.

(15) 66. H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. if r = 1 and x1 corresponds to a non-cut vertex, then SEARCH(Tx , x ) where x is the only child of x1 ; else for i = 1 to r do if i is an odd integer, then (+) for each child x of xi connected by layer-arcs do SEARCH(Tx , x ) in which the search moves “place a searcher on (xi )” and “remove a searcher from (xi )” are deleted; if i is an even integer, then (*) for the only child x of xi connected by a layer-arc do SEARCH(Tx , x )in which if there exists any search move on (xi−1 ), then the search move “place a searcher on (xi−1 )” is replaced by “place a searcher on (xi+1 )”; otherwise the search move “remove a searcher from (xi+1 )” is replaced by “remove a searcher from (xi−1 )”; end for; remove a searcher from (xr ); end SEARCH. Notice that the statement (+) is a trick to clear all the non-path forks at (xi ) during which (xi ) is guarded at all stages, and the statement (∗ ) is a trick to clear the enclosure subgraph at ((xi−1 ), (xi+1 )) and to switch the searcher from (xi−1 ) to (xi+1 ). The statements (+) and (∗ ) can be done in constant time by indexing all the search moves during the recursive call SEARCH(Tx , x ) and returning the indices of the search moves that will be deleted or modified. Lemma 17. Given an optimal strategy tree T of G[u], rooted at x, the algorithm SEARCH(T , x) constructs an optimal search strategy for G in O(|V (T )|) time. Proof. It is trivial that the lemma follows when G is an isolated vertex. Assume |V (G)| > 1. Since every subgraph in FP (G) is a proper subgraph of G, the search strategy constructed by the algorithm SEARCH(T , x) can be shown to be optimal by the similar argument in the proof of Theorem 4. The algorithm traverses each node x of T at most three times: the first time occurs at deciding (y) where y is the parent of x, the second time occurs at determining (x), the third time occurs at clearing along (x). Therefore, the lemma follows.  5. Merging routines In this section, the algorithm computing the structure information and a strategy tree of a rooted block graph is presented. The computation is from the bottom of the rooted block graph to the root. In processing a node v, with the structure information of its cut-children’s structure information available, we merge the information to obtain the structure information of the block graph rooted at v. Let G[u] be a rooted block graph. The main merging routine for computation of the structure information of G[u] proceeds recursively as follows: (1) If G is a complete graph with V (G)={u1 , u2 , . . . , un } where u=un , we set (G[u])=([n, H, u]) and T(G[u], n) as a directed path u1 → u2 → · · · → un with id(ui ) = i for 1 i n. (2) If u is a cut vertex of G, we first split G into two subgraphs G1 and G2 sharing only one vertex u. We recursively compute the structure information for each of G1 [u] and G2 [u], and then merge them by the vertex merging introduced later. (3) If u is a non-cut vertex of G which is not a complete graph, we first compute the structure information for each rooted block subgraph rooted at a cut-child of u, and then sort them by the labels and merge them by the block merging introduced later..

(16) H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. 67. In the following, we first introduce the rules for merging on labels. Then we insert some extra rules for constructing an optimal strategy tree. 5.1. Vertex merging Let G[u] be a rooted block graph which consists of two subgraphs G1 and G2 such that G1 ∪ G2 = G and V (G1 ) ∩ V (G2 ) = {u}. Without loss of generality, we assume that (G1 [u])(G2 [u]). Let k = ns(G1 ) and & be a list concatenation operation to concatenate two labels into one. The vertex merging proceeds by the following rules which are similar to the merging rules on trees [20]. If (G1 [u]) = H, E or I and (G2 [u]) ([k, H, u]), then (G[u]) = (G1 [u]). If (G1 [u]) = E and (G2 [u]) = ([k, E, u]), then (G[u]) = ([k, I, u]). If (G1 [u]) = I and (G2 [u]) = ([k, E, u]) or ([k, I, u]), then (G[u]) = ([k + 1, H, u]). If (G1 [u]) > I and ns(G1 [u; (G1 [u])] ∪ G2 ) < k, then (G[u]) = ([k, (G1 [u]), (G1 [u])]) & ((G1 [u; (G1 [u])] ∪ G2 )[u]). (5) If (G1 [u]) > I and ns(G1 [u; (G1 [u])] ∪ G2 ) k, then (G[u]) = ([k + 1, H, u]).. (1) (2) (3) (4). Lemma 18. (G[u]) is computed correctly by the vertex merging rules. Proof. In this proof, graph pair (H1 , H2 ) is an ordered pair of block subgraphs of G satisfying V (H1 ) ∩ V (H2 ) = {u} and (H1 [u]) (H2 [u]). To prove this lemma, we prove the following two statements: (i) for any graph pair (G1 , G2 ), ((G1 ∪ G2 )[u]) is computed correctly by the vertex merging rules and (ii) for any two graph pairs (G1 , G2 ) and (G 1 , G 2 ) with (G1 [u]) (G 1 [u]), ((G1 ∪ G 1 )[u]) ((G2 ∪ G 2 )[u]). Let i = (Gi [u]) = ([s1i , i1 , i1 ], [s2i , i2 , i2 ], . . . , [slii , ili , ili ]) for i = 1, 2. We will prove statements (i) and (ii) by induction on an ordered pair (s11 , l1 ) in lexicographic order. Notice that l1 s11 . It is easy to verify the correctness of the two statements when s11 = 2, which is omitted here. Assume that the two statements are true when s11 < k. In the following, we will prove the correctness of the two statements when s11 = k. First of all, we show the cases when l1 = 1. Rule (1): Since 2 ([k, H, u]), the search numbers of the branches of G2 at u are all smaller than k. It follows that the avenue of G1 is also an avenue of G1 ∪ G2 . Thus, ns(G) = k and (G[u]) = 11 . Rule (2): Since 11 = 21 = E, we have that os(G1 , u) = os(G2 , u) = k. G thus can be cleared by k searchers, and has two branches at u with search numbers k. Hence, (G[u]) = ([k, I, u]). Rule (3): Since 11 = I and (G2 [u]) ([k, E, u]), u has at least three branches in G with search numbers k, two from G1 and one from G2 . By Theorem 4, we have that ns(G) k + 1. Since u has no branches with search numbers greater than k + 1, (G[u]) = ([k + 1, H, u]). Let s = max{ns(G2 ), ns(G 2 )}. When s < k, ((G2 ∪ G 2 )[u])([k, H, u]) ((G1 ∪ G 1 )[u]). When s = k, we have either ns(G2 ) = k and the length of (G2 [u]) equals 1 or ns(G 2 ) = k and the length of (G 2 [u]) equals 1. From the monotonicity of merging rules (1)–(3), we can verify easily that ((G1 ∪ G 1 )[u])((G2 ∪ G 2 )[u]). Assume that the two statements are true when l1 < t for some integer t > 1. In the following, we prove the two statements when l1 = t. Rule (4): Let P be an avenue of G1 containing 11 . Since ns(G1 [u; 11 ] ∪ G2 ) < k, G1 ∪ G2 can be cleared along P using k searchers. It follows that ns(G) = k. From the definition of avenues, P is also an avenue of G. If 11 is a critical vertex of G1 , by the uniqueness of critical vertices, it is also a critical vertex of G closest to u. Thus, (G[u]) = ([k, 11 , 11 ])&((G1 [u; 11 ] ∪ G2 )[u]). Next, if 11 is a critical edge of a block K in G1 , by the definition of labels, (G1 [u, 11 ][u])(G1 [u, ][u]) < 1 for all critical edge  of K. For any critical edge  of K, (G1 [u, ], G1 [u, 11 ]) is a graph pair. We consider two graph pairs (G1 [u, ], G1 [u, 11 ]) and (G2 , G2 ). Together with ns(G2 ) < k, by the induction hypothesis of statement (ii), ((G1 [u; 11 ] ∪ G2 )[u]) ((G1 [u; ] ∪ G2 )[u]). It follows that 11 is also a critical edge of G such that (G[u, 11 ][u]) is the minimum. Thus, (G[u]) = ([k, 11 , 11 ]) & ((G1 [u; 11 ] ∪ G2 )[u])..

(17) 68. H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. Rule (5): When 11 is a critical vertex of G1 , it has two branches with search numbers k disjoint to G1 [u; 11 ]. Since ns(G1 [u; 11 ] ∪ G2 ) = k, 11 has three branches in G with search numbers k. By Theorem 4, we have that ns(G) k + 1. Hence, (G[u]) = ([k + 1, H, u]). Next, we consider the case when 11 is a critical edge of G1 in a block K. If ns(G2 ) = k, ns(G1 [u;  ] ∪ G2 ) k for all edges  of K. Next, if ns(G2 ) < k, similar to the arguments in the above proof of rule (4), then (G1 [u; 11 ] ∪ G2 )[u])(G1 [u; ] ∪ G2 )[u]) for all critical edges  of K. Since ns(G1 [u; 11 ] ∪ G2 ) k, ns(G1 [u;  ] ∪ G2 ) k for all edges  of K. By Theorem 4, we have that ns(G) k + 1. Hence, (G[u]) = ([k + 1, H, u]). In the following, we prove the correctness of statement (ii) when l1 = t. Since l1 > 1, 11 = Mv or Mb . From the monotonicity of merging rules (1)–(5), the correctness of statement (ii) can be verified easily for the cases when 2 ([k, I, u]), and ((G1 ∪ G 1 )[u]) = ([k + 1, H, u]). Thus, the rest case to be proved is ns(G2 ) = k, l2 > 1 (21 = Mv or Mb ), and ((G1 ∪ G 1 )[u]) < ([k + 1, H, u]). Since (G2 [u])(G1 [u]) and l1 , l2 > 1, (G2 [u; 21 ][u])(G1 [u; 11 ][u]) < ([k, H, u]). Since 11 =Mv or Mb and ((G1 ∪ G 1 )[u]) < ([k + 1, H, u]), (G 1 [u]) < ([k, H, u]). Thus, (G1 [u; 11 ], G2 [u; 21 ]) and (G 1 , G 2 ) are graph pairs with ns(G1 [u; 11 ]) < k and ns(G 1 ) < k. By induction hypothesis, ((G1 [u; 11 ] ∪ G 1 )[u]) ((G2 [u; 21 ] ∪ G 2 )[u]). Together with merging rule (4), ((G1 ∪ G 1 )[u])((G2 ∪ G 2 )[u]).  5.2. Block merging Before introducing the block merging rules, we first prove the label property of re-rooting that will be used later. Lemma 19. Let G1 , G2 , and G3 be three block graphs sharing a vertex u only and v be a non-cut vertex of G3 adjacent to u. If (G1 [u])(G2 [u]), then ((G1 ∪ G3 )[v])((G2 ∪ G3 )[v]).. ,  ,  ] be the first records of (G [u]) and Proof. Let Gi3 denote Gi ∪ G3 for i=1,2, and let [ki3 , i3 , i3 ] and [ki3 i3 i3 i3. (Gi3 [v]), respectively. Notice that ki3 = ki3 . Let K be the block of G3 containing v. The following re-rooted labelling rules can be verified easily.. (1) i3 = H . (1.1) if ns(Gi3 \{v}) < ki3 , then (Gi3 [v]) = ([ki3 , H, v]); (1.2) if ns(Gi3 \{v}) = ki3 , then (Gi3 [v]) = ([ki3 , E, v]). (2) i3 = E. (2.1) if K is critical block of Gi3 , then (Gi3 [v]) = ([ki3 , Mb ,  i3 ])&(Gi3 [v;  i3 ][v]) where  i3 is an edge of K; (2.2) otherwise, (Gi3 [v]) = ([ki3 , E, v]). (3) i3 = I . (3.1) if K is critical block of Gi3 , then (Gi3 [v]) = ([ki3 , Mb ,  i3 ])&(Gi3 [v;  i3 ][v]) where u is an endpoint of  i3 in K; (3.2) otherwise,  i3 = u and (Gi3 [v]) = ([ki3 , Mv , u])&(Gi3 [v; u][v]). (4) i3 = Mv or Mb . (4.1) (Gi3 [v]) = ([ki3 , i3 ,  i3 ])&(Gi3 [v;  i3 ][v]) where  i3 = i3 . Graph triplet (G1 , G2 , G3 ) is an ordered triplet of block graphs such that G1 , G2 and G3 share a vertex u only and (G1 [u])(G2 [u]). We will prove the statement that all such graph triplets satisfy (G13 [v]) (G23 [v]). By Lemma 18, we have that (G13 [u]) (G23 [u]). If (G13 [u]) > (G23 [u]), the lemma can be verified easily by the above re-rooted labelling rules. The rest is to prove the case when (G13 [u]) = (G23 [u]), i.e., k13 = k23 and 13 = 23 . When 13 = H , we have that (G23 [v])([k13 , E, v]). Thus, we only need to consider case (1.1). In case (1.1), ns(G13 \{v}) < k13 . By Lemma 18, we have that (G23 \{v}) (G13 \{v}). Thus, (G23 [v]) (G13 [v]). When 13 = E, we have that (G23 [v])([k13 , E, v]). Thus, we only need to consider case (2.1). Since (G13 [u]) = (G23 [u]), we have that if K is a critical block of G23 , then K is also a critical block of G13 . Thus,  13 =  23 = Mb . When 13 = I , or Mv , Mb , we have that  13 is either Mv or Mb . Thus,  13  23 for all cases..

(18) H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. 69. t stages G1. v2. v1 G2. v3. G3. v4. Gi. vi+1. G4 vi Gi+1 v|V(K)|. Fig. 9. The guarded interval diagram for a greedy search strategy.. For those cases that  13 = Mv or Mb , we need to prove that the tails of their labels satisfy the statement. In cases (2.1), (3.1), and (4.1), the avenue of Gi3 is on [G3 ]u,v . The tails of their labels are (Gi3 [v;  i3 ][v]) where  i3 is an edge of K for case (2.1), (Gi3 [v;  i3 ][v]) where u is an endpoint of  i3 in K for case (3.1), and (Gi3 [v;  i3 ][v]) where  i3 = i3 for case (4.1). Since the avenue of Gi3 belongs to G3 , it can be verified easily by induction that the statement is true when 13 = 23 . Next, we consider the case when 13 > 23 . The only subcases are those 13 = I and 23 = E. Since (G23 [v;  23 ][v])(G23 [v;  13 ][v]) = (G13 [v;  13 ][v]), the statement is true. In cases 3.2 and 4.1, the avenue of Gi3 belongs to [Gi3 ]K,u . The tails of their labels are (Gi3 [v; u][v]) for case (3.2), and (Gi3 [v;  i3 ][v]) where  i3 = i3 for case (4.1). Since the avenue of Gi3 belongs to [Gi3 ]K,u , it can be verified easily by induction that the statement is true when 13 = 23 . Next, we consider the case when 13 > 23 . Since G23 [v; u] ⊂ G13 [v;  13 ], (G23 [v; u][v]) (G13 [v;  13 ][v]), the statement is true.  Lemma 20. Let K be a block of a block graph G with |V (K)| 3 and u a non-cut vertex of G in K. Let x and y be two vertices of K such that ([G]K,x [x])([G]K,z [z]) and ([G]K,y [y]) ([G]K,z [z]) for any z ∈ V (K) other than x, y. Then (1) (x, y) is an edge of K whose enclosure subgraph rooted at u has the smallest label; (2) ns(G) ns({G}x,y )+1. Proof. (1) Assume that K has another vertex v other than x, y, u. Let G = {G}x,y ∩ {G}x,v . Then {G}x,v = [G]K,y ∪ G. and {G}x,y = [G]K,v ∪ G . Notice that (G [y]) = (G [v]) since y and v are non-cut vertices of G in the same block. Since ([G]K,y [y]) ([G]K,v [v]), by Lemma 19, we have that (([G]K,y ∪ G )[u])(([G]K,v ∪ G )[u]). Thus, ({G}x,v [u])({G}x,y [u]).Moreover, assume that K has one another vertex w other than x, y, u, v. Since ([G]K,x [x])([G]K,w [w]), by the same argument as above, we have that ({G}w,v [u])({G}x,v [u]). It follows that ({G}w,v [u])({G}x,y [u]). (2) From the types of rooted block graphs (see Fig. 5), we obtain that there exists an optimal search strategy for G in which the start vertex u and the terminal vertex v are both in V ([G]K,x ) ∪ V ([G]K,y ). By Lemma 3(1), we have that ns(G) = os(G, u , v ) ns({G}x,y ) + 1.  In the block merging, we compute the structure information of G[u] from the ones of the subgraphs rooted at the cut-children of u, using the concept of the greedy search strategy described as follows to estimate ns(G). Let G be a block graph with a non-cut vertex u, and K the block containing u. Suppose v1 , v2 , . . . , vr are the cut vertices of G in K. In brief, we denote [G]K,vi by Gi and i = (Gi [vi ]) = ([s1i , i1 , i1 ], [s2i , i2 , i2 ], . . . , [sli1 , ili , ili ]), for i = 1, 2, . . . , r. Without loss of generality, we assume that 1 2  · · · r . Let Io = {i|i is an odd integer for 1 i r} and Ie = {i|i is an even integer for 1 i r}. A greedy search strategy S for G at K is conceptually described as follows (see Fig. 9): (1) for each i ∈ Io in increasing order, clear Gi by an optimal oriented strategy for it to vi , and keep vi guarded after Gi cleared; (2) for each i ∈ / Io , 1i r, place a searcher on vi ; (3) for each j ∈ / Ie , 1j r, remove the searcher from vj ;.

(19) 70. H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. (4) for each j ∈ Ie in decreasing order, clear Gj by an optimal oriented strategy for it from vj . Obviously, S can be divided into r + 1 intervals, including r intervals in which one Gi is cleared per interval, and a special stage at which only all vertices of K are guarded. We define the weight of each rooted subgraph Gi [vi ], denoted by i , to be the number of searchers used in the ith interval, i.e., i =os(Gi , vi )+(i −1)/2. The maximum number of searchers used before stage t is called the left weight of G at K, denoted by L , i.e., L =max{ i |i ∈ Io }. The maximum number of searchers used after stage t is called the right weight of G at K, denoted by R , i.e., R = max{ i |i ∈ Ie }. It is clear that L  R and #(S) = max{ L , |V (K)|}. Any greedy search strategy for G is near optimal, which will be shown in Lemma 21 later. From the order among L , |V (K)| and R , we divide greedy search strategies into three patterns: (1) centralized : |V (K)| L and |V (K)| > R , (2) balanced : L = R |V (K)|, (3) skewed : L > |V (K)| and L > R . Lemma 21. Let K be a block of a block graph G and S a greedy search strategy for G at K. (1) If S is centralized, then ns(G) = |V (K)|. (2) If S is balanced, then ns(G) = L = R . (3) If S is skewed, then ns(G) = L or L − 1. Proof. Centralized: Since S is centralized, we have that ns(G) #(S) |V (K)|. However, ns(G)|V (K)|. Thus, we conclude that ns(G) = |V (K)|. Balanced: Since S is balanced, p ns(G) #(S) L . Suppose p is the smallest even index such that p = R = L . Let Hj denote the subgraph G[ i=j V (Gi )] for j =1, 2, · · · , p. By Lemma 20(2), we have that ns(G) ns(H1 ) ns(H3 )+ 1  · · · ns(Hp−1 ) + (p − 2)/2. Since p−1  p = L and p−1  L , p−1 = p = L . Thus, os(Gp−1 , vp−1 ) = os(Gp , vp ). It is easy to obtain os(Gp−1 , vp−1 ) = os(Gp−1 ∪ {(vp−1 , vp )}, vp ). From the vertex merge on (Gp−1 ∪ {(vp−1 , vp )})[vp ] and Gp [vp ], we have that ns(Hp−1 )=os(Gp , vp ). It follows that ns(G)os(Gp , vp )+(p −2)/2 = p = L . Hence, ns(G) = L . Skewed: Since S is skewed, ns(G) #(S) L . Suppose q is the smallest odd index such that q = L . Let Hj denote q the subgraph G[ i=j V (Gi )] for j =1, 2, . . . , q. By Lemma 20(2), we have that ns(G) ns(H1 ) ns(Gq )+(q −1)/2. By Lemma 1, we have that ns(Gq ) os(Gq , vq )−1. It follows that ns(G) os(Gq , vq )+(q−1)/2−1= q −1= L −1. Hence, L − 1ns(G) L .  In the following, we use the notations G = G\V (G1 ), G− = G[V (G1 [v1 ; 11 ]) ∪ V (G )] and G. = {G}v1 ,v2 . The block merging proceeds by the rules described as follows. (1) S is centralized, (a) if ns(G\{u}) < |V (K)|, then (G[u]) = ([|V (K)|, H, u]). (b) if ns(G\{u}) = |V (K)|, then (G[u]) = ([|V (K)|, E, u]). (2) S is balanced, (a) if ns(G ) = L , then (G[u]) = ([ L , Mb , (v1 , v2 )])&(G. [u]). (b) if ns(G ) < L , then (G[u]) = ([ L , E, u]). (3) S is skewed, (a) 1 = L and 11 = H or E, then (G[u]) = ([ L , E, u]). (b) 1 = L and 11 = I, Mv or Mb , (i) if ns(G− ) = L − 1 and (G− [u]) = H , then (G[u]) = ([ L , H, u]). (ii) if ns(G− ) = L − 1 and (G− [u])

(20) = H , then (G[u]) = ([ L , E, u]). (iii) if ns(G− ) < L − 1 and 11 = I or Mv , then (G[u]) = ([ L − 1, Mv , 11 ])&(G− [u]). (iv) if ns(G− ) < L − 1 and 11 = Mb , then (G[u]) = ([ L − 1, Mb , 11 ]) & (G− [u]). (c) 1 < L , (i) if ns(G. ) = L − 1 and (G. [u]) = H , then (G[u]) = ([ L , H, u]). (ii) if ns(G. ) = L − 1 and (G. [u])

(21) = H , then (G[u]) = ([ L , E, u]). (iii) if ns(G. ) < L − 1, then (G[u]) = ([ L − 1, Mb , (v1 , v2 )])&(G. [u])..

(22) H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. 71. Lemma 22. The block merging rules correctly compute (G[u]). Proof. Centralized: Let S =(X1 , X2 , . . . , X ) in which Xt ⊇ V (K) and [lu , ru ] is the guarded interval of u. Obviously, t < ru . Let us consider S = (X1 , X2 , . . . , X ) where Xi = Xi for 1 i ru , Xi = Xi ∪ {u} for ru + 1 i . Since S is centralized, ns(G) = |V (K)| > L = max{|Xi ||t + 1 i }. It follows that |Xi | |V (K)| for 1 i . Thus, S. is an oriented search strategy for G to u using ns(G) searchers. Then os(G, u) = ns(G). By Lemma 12, we have that (G[u]) = H or E. From the definition of hubs, we have that if ns(G\{u}) < ns(G),then (G[u]) = ([|V (K)|, H, u]); otherwise (G[u]) = ([|V (K)|, E, u]). Balanced: If ns(G ) = L , by Lemma 10, then K is a critical block of G. From Lemma 20(1), (v1 , v2 ) is the edge in K whose enclosure subgraph rooted at u has the minimum label. Thus, (G[u]) = ([ L , Mb , (v1 , v2 )]) & (G. [u]). Next, if ns(G ) < L , by Lemma 3(2), then os(G[V (G )∪{v1 }], u, v1 )  L . Since os(G1 , v1 )  L , os(G, u)= L =ns(G). Thus, (G[u]) = H or E. It is clear that any greedy search strategy for G\{u} at K\{u} is also balanced. It follows that ns(G\{u}) = ns(G). Thus, (G[u]) = ([ L , E, u]). Skewed: Since S is skewed, ns(G) L . In the case (a), ns(G1 )=os(G1 , v1 )= L . It follows that ns(G)  L . Thus, ns(G) = L . In the case (b), ns(G1 ) = os(G1 , v1 ) − 1 = L − 1. Thus, (G1 [v1 ]) ([ L − 1, I, v1 ]). From a greedy search strategy for G[V (G ) ∪ {v1 }] at K, we have that ns(G[V (G ) ∪ {v1 }]) L − 1. Then ns(G) is determined by ns(G− ) which is obtained by the vertex merge on G1 [v1 ] and G[V (G ) ∪ {v1 }][v1 ]. By the vertex merging rules, if ns(G− ) = L − 1, then ns(G) = L ; otherwise ns(G) = L − 1. In the case (c), os(Gi , vi ) < L for all i. If ns(G. ) = L − 1, by Lemma 20(2), then ns(G)ns(G. ) + 1 = L . Thus, ns(G) = L . Next, if ns(G. ) < L − 1, by Lemma 3(2), then os(G[V (G. ) ∪ {v1 }], v1 , v2 )  L − 1. Since os(G1 , v1 ) L − 1 and os(G2 , v2 )  L − 1, there exists an oriented search strategy for G from a vertex in G1 to a vertex in G2 using at most L − 1 searchers. It follows that ns(G) L − 1. Thus, ns(G) = L − 1. We now consider the case when ns(G) = L . Since L > R , by the same argument used in the centralized case, we have that os(G, u) = ns(G). From the definition of hubs, we have that if ns(G\{u}) < ns(G), then (G[u]) = ([ L , H, u]); otherwise (G[u]) = ([ L , E, u]). Next, we consider the case when ns(G) = L − 1. If 1 = L , they are similar to the vertex merge rules (1), (2) and (5) on G1 [v1 ] and G[V (G ) ∪ {v1 }][v1 ]. Next, if 1 < L , it is clear that any greedy search strategy for G at K\{v1 } is balanced. It follows that ns(G ) = L − 1 = ns(G). By Lemma 10, K is a critical block of G. Thus, (G[u]) = ([ L , Mb , (v1 , v2 )])&(G. [u]).  Next, we show how to obtain the values ns(G\{u}), ns(G ), ns(G. ) and ns(G− ) described in the block merging rules. (1) If S is centralized, we first compute (G∗ [v1 ]) by the block merging recursively where G∗ =G\(V (G1 \{v1 })∪{u}). Next, we compute ((G\{u})[v1 ]) by the vertex merging on (G∗ [v1 ]) and (G1 [v1 ]). (2) If S is balanced, we first compute (G. [u]) by the block merging recursively. Next, we transfer (G. [u]) to (G. [v2 ]). At last, compute (G [v2 ]) by the vertex merging on (G. [v2 ]) and (G2 [v2 ]). (3) If S is skewed, we recursively compute (G− [u]) and (G. [u]) in (b) and (c), respectively. In the above case (2), since u and v2 are both non-cut vertices of G. and have the same neighbors other than them, (G. [u]) can be transferred to (G. [v2 ]) by replacing u by v2 in the last record of (G. [u]) in constant time. Moreover, we show how to sort the labels efficiently in the block merging rules. Let i = (R1i , . . . , Rlii ) where Rji = [sji , ij , ij ],  for i = 1, . . . , r and j = 1, . . . , li . Let L = ri=1 li . In the following, we propose a bottom-up algorithm to assign an index to each record of the labels. According to the indices, we can sort the labels in O(r) time. Algorithm. INDEX(1 , . . . , r ) let ij denote the index of the record j in i ; let i = li and ili +1 = 0, for i = 1, . . . , r; let I = {R i i |1i r}; for i = 1 to L do (a) select the smallest record R t t in I such that the ordered pair (R t t , t t +1 ) is smallest in lexicographic order, and remove R t t from I;.

(23) 72. H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. (b) (c) (d) end. t t = i; t = t − 1; if t 1, then insert R t t to I; for;. end INDEX. The correctness of the algorithm INDEX is trivial. By comparing the indices ip > jq , we can obtain (Rpi , . . . , Rlii )  j. j. (Rq , . . . , Rlj ). That is, each comparison takes constant time. Therefore, the time complexity of the algorithm is O(r ×L). 5.3. Construct an optimal strategy tree In this section, we insert some rules into the vertex merging and the block merging for constructing an optimal strategy tree of G[u]. We first introduce the rules inserted into the vertex merging. Here, we use the same notation and assumption as Section 5.1. Let T1 and T2 be the given optimal strategy trees of G1 [u] and G2 [u] which are rooted at x1 and x2 , respectively. In the following, we say “overlap x1 with x2 ” for redirecting all the children of x2 to x1 and then deleting x2 . 1. In the vertex merging rule (1), the main strategy path of G1 can form an optimal strategy path of G. We insert the following rule after rule (1). (1 ) if id(x2 ) = id(x1 ), then overlap x1 with x2 ; otherwise add layer-arc x2 → x1 . 2. In the vertex merging rule (2), the concatenation of the main strategy paths of G1 and G2 can form an optimal strategy path of G. We insert the following rule after rule (2). (2 ) overlap x1 with x2 . 3. In the vertex merging rules (3) and (5), u forms an optimal strategy path of G. We insert the following rule after each of the rules (3) and (5). (3 ) (a) create a new node x with id(x) = ns(G) and set (x) = u; (b) for i = 1, 2, add layer-arcs xi → x. 4. In the vertex merging rule (4), the strategy path of G1 forms an optimal strategy path of G. We insert the following rule after rule (4). (4 ) (a) remove the subtree rooted at −1 (12 ) from T1 , which results T1 ; (b) merge strategy trees T1 and T2 recursively to a tree T ; (c) add a layer-arc x → −1 (11 ) where x is the root of T . In the following, we introduce the rules inserted into the block merging. Here, we use the same notation and assumption as the ones in Section 5.2. In addition, let Ti be the given optimal strategy tree of Gi [vi ] rooted at xi for 1 i r. 1. In the block merging rules with (G[u]) = H , u forms an optimal strategy path of G. We insert the following rule after each of those rules. (1. ) (a) create a new node x with id(x)=(ns(G)) and (x)=u; (b) construct an optimal strategy tree Tˆ of (G\{u})[v] where v is a vertex adjacent to u; (c) add a layer-arc xˆ → x where xˆ is the root of Tˆ . 2. In the block merging rules with (G[u]) = E, we have that ns(G\V (G1 )) < ns(G). By Lemma 3(2), there exists an optimal search strategy for G from u to a vertex in G1 . Thus, (v1 , u) is a part of an optimal strategy path of G and the following rule is inserted after each of those rules. (2. ) (a) create a directed path y1 → y2 → y3 in which (y1 ) = v1 , (y2 ) = (v1 , u), (y3 ) = u, and id(yi ) = ns(G) for i = 1, 2, 3; (b) if id(x1 ) < ns(G), then add a layer-arc x1 → y1 ; otherwise overlap y1 with x1 ; (c) construct an optimal strategy tree T of G [u]; (d) add a layer-arc x → y2 where x is the root of T . 3. In the block merging rules with (G[u]) = Mv or Mb , (G[u]) is equal to either (v1 , v2 ) or 11 , which corresponds to an optimal strategy path of G. 3.1 If K is a critical block, i.e., (G[u]) = (v1 , v2 ), then the following rule is inserted. (3. ) (a) create a directed path z1 → z3 ← z2 where (z1 ) = v1 , (z2 ) = v2 , (z3 ) = (v1 , v2 ), and id(zi ) = ns(G) for i = 1, 2, 3; (b) for j = 1, 2, if id(xj ) < ns(G), then add a layer-arc xj → zj , otherwise overlap zj with xj ; (c) construct an optimal strategy tree T. for G. [u] by the block merging recursively; (d) add a layer-arc x. → z3 , where x. is the root of T. ..

(24) H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. 73. 3.2 If K is not a critical block, i.e., (G[u]) = 11 , then the following rule is inserted. (4. ) (a) construct an optimal strategy tree T − for G− [u]; (b) remove the subtree rooted at −1 (12 ) from T1 ; (c) add a layer-arc x − → −1 (11 ), where x − is the root of T − . In the step (b) of the rule (1. ), we construct Tˆ for various cases described as follows: (1) If S is centralized, then (i) construct an optimal strategy tree T ∗ of G∗ [v1 ] by the block merging recursively, where G∗ = G\(V (G1 \{v1 }) ∪ {u}); (ii) construct T by the vertex merging on T ∗ and T1 at v1 . (2) If S is skewed and 1 < L , then Tˆ is constructed by the rule (3. ). (3) If S is skewed and 1 = L , then Tˆ is constructed by the rule (4. ). In step (c) of the rule (2. ), we construct T as the greedy strategy tree of G [u] introduced later for efficiency. Let v1 , v2 , . . . , vr be the cut vertices of G in K where r < |V (K)| and v|V (K)| = u. Let Ti be an optimal strategy tree of [G]K,vi [vi ] rooted at xi for i = 1, 2, . . . , r. Without loss of generality, we assume that ([G]K,v1 [v1 ])  ([G]K,v2 [v2 ]) · · · ([G]K,vr [vr ]). Given Ti and ([G]K,vi [vi ]) for i = 1, 2, . . . , r, the greedy strategy tree of G[u] at K is recursively constructed as follows. Function GREEDY_TREE(G[u], K): rooted tree; (1) if G[u] is a rooted complete graph, then (a) create a directed path z1 → z2 → · · · → z|V (K)| with (zi ) = vi and id(zi ) = i for 1 i |V (K)|; (b) return the constructed directed path. (2) else (a) s = max{ L , |V (K)|}; (b) create a directed path z1 → z3 ← z2 in which (z1 ) = v1 , (z2 ) = v2 , (z3 ) = (v1 , v2 ), and id(zi ) = s for i = 1, 2, 3; (c) for j = 1, 2, if id(xj ) < s or id(xj ) = (s) , then add a layer-arc xj → zj ; otherwise overlap zj with xj ; (d) T = GREEDY_TREE({G}v1 ,v2 , K\{v1 }, s − 1); (e) add a layer-arc x → z3 wherex is the root of T ; (f) return the constructed strategy tree; (3) end if; end GREEDY_TREE. Analogous to the proofs of Lemmas 18 and 22, the constructed strategy tree of G[u] by the inserted rules can be shown to be optimal. Lemma 23. Let G[u] be a rooted block graph. The number of nodes in the strategy tree of G[u] constructed by the inserted rules is bounded by O(|V (G)|). Proof. Let T be the optimal strategy tree constructed by the inserted rules and D the strategy path system corresponding to T. From the main merging routine, we have that any non-cut vertex of G appears only once in D. Since the length of the strategy path containing a non-cut vertex is equal to one, the strategy paths of length greater than 1 are all induced by cut vertices. Note that the strategy paths in D are edge disjoint paths. For each block K with r cut vertices, there are at most r edges of K in D. Let us consider the directed tree T rooted at u in which V (T ) is the set of all cut vertices of G and E(T ) = {x → y|y is the parent of x in G[u] for all x, y ∈ V (T )}. Since T is a tree, |E(T )| = |V (T )| − 1. It follows that there are O(c) edges in D where c is the number of cut vertices of G. Thus, the total number of vertices and edges on the strategy paths of length greater than 1 in D is O(c). For each cut vertex v of G, the number of the strategy paths of length 1 containing v is bounded by the number of forks at v not containing u. It follows that the number of the strategy paths of length 1 containing a cut vertex is also bounded by the number of arcs in T, O(c). In total, the number of vertices and edges in D is bounded by O(|V (G)|). Thus, |V (T)| = O(|V (G)|).  Together with Lemma 17, we obtain the following theorem. Theorem 24. Given an optimal strategy tree of G[u]. An optimal search strategy for G can be constructed in O(|V (G)|) time..

(25) 74. H.-H. Chou et al. / Discrete Applied Mathematics 156 (2008) 55 – 75. K2t+2. K2t+3. Kt+2. Kt+3. K2t+2. K2t+3 K2t+1. K2t+1. Kt+2. Kt+3. K2t. Kt+1. Kt. Kt+1. Kt+1. Kt+5. Kt K4. K5. K5. u. Kt+5. K2t. Kt+4. K4 Kt+4. Fig. 10. A rooted block graph G[u] in which Ki represents a block of size i.. 6. Time complexity By the definition of labels, each record of a label corresponds to at least one cut vertex. Thus, we obtain the following proposition. Proposition 25. For any rooted block graph G[u] with c cut vertices, the length of (G[u]) is bounded by c. The time complexity of our algorithm is analyzed as follows. Theorem 26. Let G[u] be a rooted block graph with |V (G)| = n. The time complexity for computing (G[u]) and constructing T(G[u], ns(G)) is O(bc + c2 + n) where b is the number of blocks and c is the number of cut vertices. Proof. First of all, we consider the vertex merging on rooted block graphs G1 [u] and G2 [u]. Let l1 and l2 be the lengths of (G1 [u]) and (G2 [u]), respectively. From the vertex merging rules and the inserted rules, there are at most l1 + l2 recursive calls and each recursive call takes constant time. By Proposition 25, l1 + l2 is bounded by c. It is clear that the vertex merging routine totally proceeds b − 1 times. Thus, it takes O(bc) time in total. Next, we consider the block merging at a non-cut vertex u of a block  K. Let v1 , . . . , vr be the cut vertices in K. Let Gi = [G]K,vi and li denote the length of (Gi [vi ]) for 1 i r. Let L = ri=1 li . By Proposition 25, L is also bounded by c. Before the block merging routine proceeding, we assign an index to each record by the algorithm INDEX and sorting r labels by the indices of their first records. It takes O(r × L) time. In a block merging, there are at most L recursive calls invoked by the block merging rule (3). In such a recursive call, it takes O(r) time to resort the labels, to recompute the weights of the rooted subgraphs, and to decide the pattern of a greedy search strategy at K. On the other hand, there are at most r recursive calls invoked by the block merging rules other than (3). In such a recursive call, it takes O(L) time to proceed an extra vertex merging and O(r) time to recompute the weights of the rooted subgraphs and to decide the pattern of a greedy search strategy at K. At last, it takes O(|V (K)|) time to construct a greedy strategy tree or to construct a directed path of the block containing all the non-cut vertices in K. Suppose the block merging routine proceeds t times in total. Let  r1 , r2 , . . . , rt be the numbers of cut vertices in the respective blocks proceeding block merging. We have that ti=1 ri = O(c). Let k1 , k2 , . . . , kt be the size of.

參考文獻

相關文件

• If a graph contains a triangle, any independent set can contain at most one node of the triangle.. • We consider graphs whose nodes can be partitioned into m

In particular, we present a linear-time algorithm for the k-tuple total domination problem for graphs in which each block is a clique, a cycle or a complete bipartite graph,

Students are asked to collect information (including materials from books, pamphlet from Environmental Protection Department...etc.) of the possible effects of pollution on our

Define instead the imaginary.. potential, magnetic field, lattice…) Dirac-BdG Hamiltonian:. with small, and matrix

In this paper, we illustrate a new concept regarding unitary elements defined on Lorentz cone, and establish some basic properties under the so-called unitary transformation associ-

Monopolies in synchronous distributed systems (Peleg 1998; Peleg

Both problems are special cases of the optimum communication spanning tree problem, and are reduced to the minimum routing cost spanning tree (MRCT) prob- lem when all the

„ There is no Hamilton circuit in G2 (this can be seen by nothing that any circuit containing every vertex must contain the edge {a,b} twice), but G2 does have a Hamilton