Algorithmica - IIS, SINICA

4 downloads 0 Views 244KB Size Report
The graph-searching problem was first proposed by Parsons [25],. [26]. ... 1 An extended abstract of this paper appears in the Proceedings of ISAAC '96, pp.
Algorithmica (2000) 27: 395–426 DOI: 10.1007/s004530010026

Algorithmica ©

2000 Springer-Verlag New York Inc.

Graph Searching on Some Subclasses of Chordal Graphs1 S.-L. Peng,2 M.-T. Ko,3 C.-W. Ho,4 T.-s. Hsu,3 and C. Y. Tang2 Abstract. In the graph-searching problem, initially a graph with all the edges contaminated is presented. The objective is to obtain a state of the graph in which all the edges are simultaneously cleared by using the least number of searchers. Two variations of the graph-searching problem are considered. One is edge searching, in which an edge is cleared by moving a searcher along this edge, and the other is node searching, in which an edge is cleared by concurrently having searchers on both of its two endpoints. We present a uniform approach to solve the above two variations on several subclasses of chordal graphs. For edge searching, we give an O(mn 2 )-time algorithm on split graphs (i.e., 1-starlike graphs), an O(m + n)time algorithm on interval graphs, and an O(mn k )-time algorithm on k-starlike graphs (a generalization of split graphs), for a fixed k ≥ 2, where m and n are the numbers of edges and vertices in the input graph, respectively. There is no polynomial algorithm known previously for any of the above problems. In addition, we also show that the edge-searching problem remains NP-complete on chordal graphs. For node searching, we give an O(mn k )-time algorithm on k-starlike graphs for a fixed k ≥ 1. This result implies that the pathwidth problem on k-starlike graphs can also be solved in this time bound which greatly improves the previous results. Key Words. Graph searching problem, Edge searching, Node searching, Star-like graphs, Split graphs, Interval graphs.

1. Introduction. The graph-searching problem was first proposed by Parsons [25], [26]. A graph represents a system of tunnels. Initially, all the edges of the graph are contaminated by a gas. We would like to obtain a state of the graph in which all the edges are simultaneously cleared by a sequence of moves using searchers. The objective is to achieve the desired state by using the least number of searchers. The graph-searching problem has applications on deciding the survivability of communication networks [2]. In this paper two versions of the graph-searching problem, the edge-searching problem [22] and the node-searching problem [16], are discussed. These two problems are different in the ways of how searchers are moved in the graph and how contaminated edges are cleared. In node searching, the allowable moves are (1) placing a searcher on a vertex and (2) removing a searcher from a vertex. In node searching, a contaminated edge is cleared if both of its endpoints contain searchers. In edge searching, besides the allowable moves in node searching, one more move, (3) moving a searcher along an 1

An extended abstract of this paper appears in the Proceedings of ISAAC ’96, pp. 156–165, Lecture Note in Computer Science, Vol. 1178, Springer-Verlag, Berlin, 1996. Part of the research by S.-L. Peng and T.-s. Hsu was supported by NSC Grant 85-2213-E-001-003. 2 National Tsing Hua University, Taiwan. {dr818303, cytang}@cs.nthu.edu.tw. 3 Institute of Information Science, Academia Sinica, Nankang, Taipei, Taiwan. {mtko, tshsu}@iis. sinica.edu.tw. 4 National Central University, Taiwan. [email protected]. Received January 28, 1997; revised September 7, 1998. Communicated by H. L. Bodlaender.

396

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

Fig. 1. Node-search and edge-search strategies.

edge, is allowed. In edge searching, a contaminated edge is cleared by moving a searcher along this edge. An edge-search strategy (respectively, node-search strategy) of an initially contaminated graph G is a sequence of allowable moves in edge searching (respectively, node searching) that clears G. A search strategy is optimal if the maximum number of searchers on G at any time step is minimum over all search strategies of G. In edge searching (respectively, node searching), this number is called the edge-search number (respectively, node-search number) of G, and is denoted by es(G) (respectively, ns(G)). For an example, see Figure 1. A vertex is guarded if it contains a searcher. A path is guarded if it contains a guarded vertex. A cleared edge may be recontaminated once there is an unguarded path connecting the edge with a contaminated one. For edge searching, it was shown in [20] and [3] that there always exists an optimal edge-search strategy for G with es(G) searchers that does not recontaminate any edges. Makedon and Sudborough showed that the edge-searching problem is equivalent to the min cut linear arrangement problem on graphs with maximum degree 3 [21]. The edge-searching problem is NP-complete on general graphs [22] and planar graphs with maximum degree 3 [24]. However, it can be solved in polynomial time on trees [22], [27]. For node searching, it was also shown in [16] and [3] that recontamination does not help one to search a graph. It is very interesting that the gate matrix layout problem [23], the interval thickness problem [15], the pathwidth problem [29], the narrowness problem [19], and the vertex separation problem [14] are all equivalent to the node-searching problem. Hence it is not surprising that the node-searching problem is NP-complete on planar graphs with vertex degree at most 3 [24], starlike graphs (a proper subclass of the chordal graphs) [12], bipartite graphs [17], cobipartite graphs (i.e., complement of bipartite graphs) [1], and bipartite distance-hereditary graphs (a proper subclass of the chordal bipartite graphs and distance-hereditary graphs) [18]. However, there are polynomial-time algorithms on trees [8], [23], [27], [30], cographs [6], permutation graphs [5], split graphs [17], partial k-trees [4], and k-starlike graphs [12] for a fixed k. Note that split graphs are 1-starlike graphs. To date, the node-searching problem is solved on several special classes of graphs, but only the trees have polynomial-time algorithms for edge searching. Though edge searching is slightly different from node searching, approaches used previously for solving them appear to be different. In this paper we use a uniform high-level approach to solve the edge- and node-searching problems on several special subclasses of chordal

Graph Searching on Some Subclasses of Chordal Graphs

397

graphs. In edge searching, our approach leads to an O(mn 2 )-time algorithm on split graphs, an O(m + n)-time algorithm on interval graphs, and an O(mn k )-time algorithm on k-starlike graphs for any fixed k ≥ 2, where m and n are the numbers of edges and vertices in the input graph, respectively. All of the above problems were not previously known to be solved in polynomial time. We also show that the edge-searching problem is NP-complete on starlike graphs, which leads to the fact that the edge-searching problem is NP-complete on chordal graphs. In node searching, our approach leads to an O(mn k )time and O(m)-space algorithm on k-starlike graphs for any fixed k ≥ 1, which greatly improves a previous O(n 2k+1 )-time and O(n 2k+1 )-space algorithm proposed by Gustedt [12]. The remainder of this paper is organized as follows: In Section 2 we give definitions and fundamental properties for the paper. We also propose a linear-time algorithm for recognizing k-starlike graphs in this section. The main results of edge searching on split graphs and node searching on k-starlike graphs are presented in Sections 3 and 4, respectively. Combining these two results, we solve the edge-searching problem on kstarlike graphs in Section 5. The results of edge searching on interval graphs are presented in Section 6. Finally, we give the conclusions in the last section.

2. Preliminaries 2.1. Definitions. Let G = (V, E) be a finite, simple, and undirected graph, where V and E denote the vertex and edge sets of G, respectively. Let n = |V | and m = |E|. Let N (v) = {w | (v, w) ∈ E} denote the neighborhood of vertex v and deg(v) = |N (v)|. The closed neighborhood of v is denoted as N [v] = N (v) ∪ {v}. Given vertex subsets X and Y of G, let N (X ) = {w | (v, w) ∈ E, v ∈ X, w ∈ / X } and let NY (X ) = N (X ) ∩ Y . For convenience, we use N (v, w) to denote N ({v, w}). Let G[X ] be the subgraph of G induced by X . Throughout this paper, unless otherwise specified, an uppercase letter denotes a set and a lowercase letter denotes a singleton (e.g., a vertex). For any vertex set with a given degree constraint (e.g., < c or > c where c is a constant), we denote it in the right upper side of its set notation. For example, I c (X ) = {w | w ∈ NY (X ) and deg(w) > c}. A clique in a graph G is a complete subgraph of G. A clique also refers to a set of vertices whose induced subgraph is complete when there is no confusion in the description. An independent set in a graph G is a vertex subset I in G such that no two vertices in I are adjacent in G. A graph G is called a split graph if its vertex set can be partitioned into two subsets C and I such that C induces a maximal clique and I is an independent set of G. Split graphs can be recognized in linear time [13]. Throughout this paper we use G = (C ∪ I, E) to denote a split graph in which C induces a maximal clique and I is an independent set. A graph G is a chordal graph if there is a tree T and a family of subtrees of T indexed by the vertices of G, {Fu }u∈V , such that subtrees Fu and Fv share a node of T if and only if the vertices u and v are adjacent. Furthermore, it is possible to construct T in such a way that there is a bijection between the nodes of T and the maximal cliques of G, where the subtree Fu is comprised of all nodes that correspond to maximal cliques

398

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

containing u [9]. In general, such a tree T is called a clique tree model or representation of G. A graph is an interval graph if the set of maximal cliques can be linearly ordered such that, for any vertex v, the cliques containing v occur consecutively in the linear ordering [10]. Note that a chordal graph is an interval graph if and only if one of its clique trees is a path. A chordal graph G is called starlike if and only if one of its clique trees is a star. Let {X 0 , X 1 , . . . , X r } be the set of all maximal cliques of a starlike graph. Throughout this paper X 0 denotes the clique corresponding to the central node of the star clique tree of G. X 0 is called the central clique and the other maximal cliques X i ’s, i 6= 0, are called peripheral cliques. A peripheral clique X is called an i-p-clique if |X \X 0 | = i. We call the vertices in X 0 (respectively, V \X 0 ) the central (respectively, peripheral) vertices of G. For an integer k, we call a starlike graph G k-starlike if maxri=1 |X i \X 0 | = k. Hence a split graph G = (C ∪ I, E) is a 1-starlike graph with the central clique C. Let G be a k-starlike graph with the maximal cliques X 0 , X 1 , . . . , X r . Given two peripheral vertices u, v ∈ X i , 1 ≤ i ≤ r , N [u] = N [v]. We recognize a k-starlike graph G as follows. We first partition the vertices in G into disjoint subsets. Vertices u and v are in the same subset if N [u] = N [v]. This can be done in linear time by slightly modifying the lexicographic breadth-first search algorithm presented in [11]. Peripheral vertices in the same subset are then contracted into one vertex. After contraction, the resulting graph is a split graph if and only if G is a starlike graph. By checking the maximum cardinality among subsets of vertices corresponding to peripheral vertices in the contracted graph, we can decide the value k. Thus k-starlike graphs can be recognized in linear time. We discuss the properties of edge searching in Section 2.2 and in Section 2.3 we derive the necessary and sufficient conditions for a k-starlike graph with the central clique size at most 3 to have a given edge-search number. 2.2. Properties. In graph searching, a vertex is called clear if all of its incident edges are cleared, contaminated if all of its incident edges are contaminated, and partially clear if there are both contaminated and cleared edges incident to it. At any time step, during an edge searching of any graph, there are three types of vertices: clear, contaminated, and partially clear [20]. A partially clear vertex is called a spot vertex if it has only one contaminated incident edge; otherwise it is called a stain vertex. LaPaugh [20] defined a clearing move composed of several allowable moves. A clearing move clears an edge and reaches a state that satisfies the following two conditions: (I) no clear or contaminated vertex contains a searcher; and (II) no vertex contains more than one searcher. Clearing moves for clearing an edge (x, y) are of the following two types: 1. m + (x, y): Vertex x has at least two incident contaminated edges. If vertex x contains no searcher, we first place a searcher on x. Then we place a second searcher on x and move it to y along the edge (x, y). Remove searchers from y if vertex y violates conditions (I) or (II). 2. m − (x, y): Vertex x has only one incident contaminated edge. If vertex x contains no searcher, we first place a searcher on x. Then move the searcher on x to y along the edge (x, y). Remove searchers from y if vertex y violates conditions (I) or (II).

Graph Searching on Some Subclasses of Chordal Graphs

399

We use m ∗ (x, y) to denote either m − (x, y) or m + (x, y). In an edge-search strategy, when clearing an edge (x, y), we may always assume that the type of clearing move using less searchers is used with ties breaking arbitrary. For example, if x is a spot vertex and y is a stain vertex, then we use m − (x, y) rather than m + (y, x). THEOREM 2.1 [20]. moves.

There is an optimal edge-search strategy only composed of clearing

With Theorem 2.1, in the following we only consider edge-search strategies composed of clearing moves. Note that a clearing move clears exactly one edge and does not cause any recontamination. Therefore, any considered edge-search strategy of no recontamination has |E| clearing moves. In an edge-search strategy, the state at time step t is defined as St = (Yt , Z t ) where Yt ⊆ V is the set of guarded vertices and Z t ⊆ E is the set of the remaining contaminated edges at time step t. Recall that a guarded vertex is a vertex which contains a searcher. Note that in St every vertex in Yt is a partially clear vertex. A vertex is clear in St if all its incident edges are not in Z t . Given a graph G, we also define a state of G to be S = (Y, Z ) where Y ⊆ V is the set of guarded vertices and Z ⊆ E is the set of remaining contaminated edges. An edge-search strategy S of G starting from state S0 = (Y0 , Z 0 ) can be represented as a sequence of states Si and clearing moves m i : S0 , m 1 , S1 , . . . , m i , Si , . . . , m |Z 0 | , S|Z 0 | , where S|Z 0 | = (∅, ∅) and state Si is obtained from Si−1 by applying the clearing move m i , 1 ≤ i ≤ |Z 0 |. S is an edge-search strategy of G if S0 = (∅, E). For S, we denote the number of searchers used while applying clearing move m i by n i . Thus,  |Yi−1 |    |Yi−1 | + 1 ni = |Yi−1 | + 1    |Yi−1 | + 2

if if if if

mi mi mi mi

= m − (x, y) = m − (x, y) = m + (x, y) = m + (x, y)

and and and and

x x x x

∈ Yi−1 , ∈ / Yi−1 , ∈ Yi−1 , ∈ / Yi−1 .

We define es(S) for a state S = (Y, Z ) of G to be the minimum number of searchers needed to clear G starting from S. Let S be an optimal edge-search strategy of G starting |Z | from S. Then es(S) = maxi=1 {n i }. In particular, es(G) = es((∅, E)). With respect to a state, any searcher not guarding a vertex is called a free searcher. If the number of searchers to clear a graph is given, a deadlock state in an edgesearch strategy is a state with no free searcher and in which every guarded vertex is a stain vertex. Note that there is no deadlock state in an optimal edge-search strategy. Let S = (Y, Z ) and S 0 = (Y 0 , Z 0 ) be two states. We define S º S 0 if and only if Y ⊆ Y 0 and Z ⊆ Z 0 . LEMMA 2.2.

Let S º S 0 be two states of G. Then es(S) ≤ es(S 0 ).

400

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

PROOF. Let S = (Y, Z ) and S 0 = (Y 0 , Z 0 ). We prove this lemma by induction on |Z 0 |, the number of contaminated edges in S 0 . If |Z 0 | = 0, then |Z | = 0. In other words, all the edges are cleared in S 0 and in S which implies es(S) = es(S 0 ) = 0. Thus, our statement holds for |Z 0 | = 0. Assume that, for |Z 0 | = i, our statement holds. We will prove that the statement also 0 be an optimal edge-search strategy holds for |Z 0 | = i + 1. Let S 0 , m 1 , S10 , . . . , m i+1 , Si+1 0 0 0 0 0 = (∅, ∅). Let (x, y) of G starting from S , where Sj = (Y j , Z j ) for 1 ≤ j ≤ i and Si+1 be the edge cleared by the clearing move m 1 . There are two cases: Case 1: (x, y) ∈ / Z . In the case that x (respectively, y) is a spot vertex or a contaminated / Y10 (respectively, y ∈ / Y10 ) and x ∈ / Y (respectively, vertex of degree 1 in S 0 , then x ∈ 0 0 y ∈ / Y ). In this case, Y ⊆ Y1 . In the other cases, Y1 = Y 0 ∪ {x, y} ⊇ Y . Together with Z 10 = Z 0 \{(x, y)} ⊇ Z , we obtain S º S10 . By the induction hypothesis, es(S) ≤ es(S10 ) ≤ es(S 0 ). Case 2: (x, y) ∈ Z . Let S1 = (Y1 , Z 1 ) be the resulting state by applying m 1 to S. Then Z 1 ⊆ Z 10 . By an argument similar to the one used in Case 1, Y1 ⊆ Y10 . Thus, S1 º S10 . By the induction hypothesis, es(S1 ) ≤ es(S10 ). Let n 1 (respectively, n 01 ) be the number of searchers used in applying m 1 to S (respectively, S 0 ). Since Y ⊆ Y 0 and Z ⊆ Z 0 , n 1 ≤ n 01 . Therefore, es(S) = max{n 1 , es(S1 )} ≤ max{n 01 , es(S10 )} = es(S 0 ). LEMMA 2.3. Let x be a spot vertex with the contaminated edge (x, y) in a state S. Let S 0 be the resulting state by applying m − (x, y) to S. Then es(S 0 ) ≤ es(S). PROOF. Let S = (Y, Z ) and let S = S, m 1 , S1 , m 2 , . . . , m |Z | , S|Z | be an arbitrary optimal edge-search strategy starting from S, where Si = (Yi , Z i ) for 1 ≤ i ≤ |Z |. If m 1 = m − (x, y), then S 0 = S1 . It is obvious that es(S 0 ) ≤ es(S). Otherwise, suppose (x, y) is cleared in St where t > 1, namely, m t = m − (x, y). Consider another edge0 0 0 0 search strategy S 0 = S, m 01 , S10 , m 02 , . . . , m 0|Z | , S|Z | , where Si = (Yi , Z i ) for 1 ≤ i ≤ |Z |, 0 0 − such that m i = m i for t + 1 ≤ i ≤ |Z |, m 1 = m (x, y) = m t , and m i0 = m i−1 for 2 ≤ i ≤ t. For all i, t + 1 ≤ i ≤ |Z |, Si0 = Si and n i0 = n i . In strategy S, since x is a spot vertex in state S and is cleared in state St , x ∈ Yi for all i, 1 ≤ i ≤ t − 1 and x ∈ / Yi for t ≤ i ≤ |Z |. However, in strategy S 0 , x is cleared in state S10 . Therefore, x ∈ / Yi0 for 1 ≤ i ≤ |Z |. We obtain that Yi0 ⊆ (Yi−1 \{x}) ∪ {y} for 1 ≤ i ≤ t − 1. Together with the fact that m i0 = m i−1 and m i0 does not clear an edge incident to x for 2 ≤ i ≤ t, we conclude that n i0 ≤ n i−1 for 2 ≤ i ≤ t, and n 01 = |Y | ≤ n 1 . Hence, es(S 0 ) = es(S10 ) ≤ es(S). Let S be an arbitrary edge-search strategy. For each state Si of S, there are either spot vertices or free searchers in Si . If x is a spot vertex, then a contaminated edge (x, y) can be cleared by m − (x, y) in which no free searcher is used. In the case that x and y are guarded and there is a free searcher, the contaminated edge (x, y) can be cleared by this free searcher, which remains free after (x, y) is cleared. Hence we have the following lemma.

Graph Searching on Some Subclasses of Chordal Graphs

LEMMA 2.4. such that

401

There exists an optimal edge-search strategy S0 , m 1 , S1 , m 2 , . . . , m |E| , S|E|

1. if there exists a spot vertex in Si , 0 ≤ i ≤ |E| − 1, then m i+1 = m − (x, y) where x is a spot vertex; and 2. if there is no spot vertex in Si , 0 ≤ i ≤ |E| − 1, but there exists a contaminated edge with both its endpoints guarded, then m i+1 = m + (x, y) where (x, y) is a contaminated edge and x and y are guarded. PROOF. Suppose the contrary that there exists no such optimal edge-search strategy. We consider an optimal edge-search strategy S0 , m 1 , S1 , . . . , m |E| , S|E| such that the first time step i, Si violates the conditions, is the latest among all optimal edge-search strategies. There are two cases: Case 1: There are spot vertices in Si and none of them is cleared in Si+1 . Let x be 0 be the resulting state after a spot vertex with contaminated edge (x, y) in Si . Let Si+1 0 − applying m (x, y). By Lemma 2.3, es(Si+1 ) ≤ es(Si ). Case 2: There is no spot vertex in Si , and there are contaminated edges with both their endpoints guarded, but none of them is cleared by m i+1 . Let (x, y) be a contaminated 0 be the resulting state after applying edge with x and y being guarded in Si . Let Si+1 0 ) ≤ es(Si ). m + (x, y). By Lemma 2.2, es(Si+1 Thus, in Case 1 (respectively, Case 2), by applying the clearing move m − (x, y) 0 . Let S 0 be any optimal edge(respectively, m + (x, y)) on Si , we obtain the new state Si+1 0 ∗ search strategy starting from Si+1 . Let S be the edge-search strategy S0 , m 1 , S1 , . . . , 0 m i , Si , m ∗ (x, y), Si+1 followed by S 0 . Then S ∗ is also optimal. It is obvious that in S ∗ , the first time step j, Sj violates the conditions, is later than i, which contradicts the assumption on S. Hence, our lemma holds. Note that in a state, if there are contaminated edges that are incident to spot vertices or with both their endpoints guarded, these contaminated edges can be cleared in an arbitrary order. A cleared path at a state is a path whose edges and internal vertices are cleared at the state. LEMMA 2.5. At any state in an edge-search strategy satisfying Lemma 2.4, there are at most two spot vertices. If there are two spot vertices, then they are connected by a cleared path. PROOF. Let S = S0 , m 1 , . . . , m |E| , S|E| be an edge-search strategy satisfying Lemma 2.4. We will prove this lemma by induction on the number of time steps and show the statement is true at any time step of S. At state S0 , there is no spot vertex. Thus the statement is true. Assume that at St the statement is true. If there is no spot vertex in St , then the clearing move m t+1 must be m + (x, y) where (x, y) is a contaminated edge in St . In St+1 , only x and y can become spot vertices since the numbers of incident contaminated edges of other vertices do not change. Thus, there are at most two spot

402

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

vertices in St+1 . If x and y are spot vertices in St+1 , then the path x, y is the desired cleared path. On the other hand, consider the case that St has spot vertices. Then the clearing move m t+1 must be m − (x, y), where x is a spot vertex in St . In St+1 , x becomes clear. Further, the only possible new spot vertex is y. Thus, there are at most two spot vertices in St+1 . If there are two spot vertices in St+1 , they must be y and u in which u is already a spot vertex in St . By the induction hypothesis, there is a cleared path u, v1 , . . . , vk , x in St . Thus, the path u, v1 , . . . , vk , x, y is the desired cleared path in St+1 . In the rest of this paper we only consider the edge-search strategies satisfying Lemma 2.4. LEMMA 2.6 [25].

If G is a subgraph of G 0 , then es(G) ≤ es(G 0 ).

LEMMA 2.7 [25]. if n ≥ 4.

For a clique K n , (1) es(K n ) = n−1 if n = 2 or 3, and (2) es(K n ) = n

LEMMA 2.8. Let K n be a clique, n ≥ 4. If W ⊆ K n , |W | ≥ 2, and all the vertices in K n \W are guarded, then K n can be cleared by using additional |W | searchers without moving any guarding searchers in K n \W . PROOF. The proof is given by the following edge-search strategy which uses additional |W | searchers and does not move searchers guarding vertices in K n \W . We first place |W | − 1 searchers on W except one vertex, say v. Since |W | ≥ 2, there exists another vertex u ∈ W which is now guarded. By using a free searcher, we then clear all the contaminated edges incident to u except the edge (u, v). Next, by applying m − (u, v) to clear the edge (u, v), u is cleared and v is guarded. Finally, we clear all the remaining contaminated edges in K n by the remaining free searcher. LEMMA 2.9 [16].

For any graph G, ns(G) − 1 ≤ es(G) ≤ ns(G) + 1.

2.3. Edge Searching on k-Starlike Graphs of Central Clique Size at Most 3. In this subsection we consider a k-starlike graph G with the central clique X 0 and |X 0 | ≤ 3. Let ω denote the maximum clique size of G. Since X 0 is a maximal clique of G, |X 0 | ≥ 2 if |V (G)| ≥ 2. In the following we first consider the case of |X 0 | = 2. LEMMA 2.10. Let G be a k-starlike graph with |X 0 | = 2. Then (1) es(G) = 1 if G is a path, (2) es(G) = 2 if G is not a path and k ≤ 2, and (3) es(G) = k + 1 if k ≥ 3. PROOF. Statement (1) is trivial. Now we show Statements (2) and (3). Since |X 0 | = 2, for all i-p-clique X , 1 ≤ i ≤ k, |X ∩ X 0 | = 1. Hence, ω = k + 1. Let X 0 = {u, v}. An edge-search strategy to clear G is as follows. We first place one searcher on u and then clear each i-p-clique X containing u one by one. If |X | ≥ 4, then we use the strategy described in Lemma 2.8 to clear X . If |X | = 2 or 3, then one free searcher is sufficient to clear X . After this, u has only one contaminated edge (u, v). By applying m − (u, v), u is cleared and v is guarded. Finally, we clear each i-p-clique X containing v similarly. The

Graph Searching on Some Subclasses of Chordal Graphs

403

number of searchers used is equal to that used to clear a maximum clique. By Lemma 2.7, our edge-search strategy is optimal. Hence Statements (2) and (3) hold. We now consider the case of |X 0 | = 3. Let X 0 = {u 1 , u 2 , u 3 }. The following algorithm describes an edge-search strategy which shows es(G) ≤ ω + 1. Algorithm ESA(G, u 1 , u 2 , u 3 ) 1. Guard vertex u 1 and clear every i-p-clique X with X ∩ X 0 = {u 1 }, 1 ≤ i ≤ k. 2. Clear the edge (u 1 , u 3 ) and every i-p-clique X with X ∩ X 0 = {u 1 , u 3 }, 1 ≤ i ≤ k. 3. Clear the edge (u 1 , u 2 ) and every i-p-clique X with X ∩ X 0 = {u 1 , u 2 }, 1 ≤ i ≤ k. 4. Clear every i-p-clique X with X ∩ X 0 = {u 2 }, 1 ≤ i ≤ k. 5. Clear the edge (u 2 , u 3 ) and every i-p-clique X with X ∩ X 0 = {u 2 , u 3 }, 1 ≤ i ≤ k. 6. Clear every i-p-clique X with X ∩ X 0 = {u 3 }, 1 ≤ i ≤ k. End ESA. In Algorithm ESA, u 1 , u 2 , and u 3 are cleared after Steps 3, 5, and 6, respectively. Since u 3 is guarded in Step 2, if a peripheral clique cleared in Step 3 is a maximum clique, then we use at most ω + 1 searchers in Step 3. Similarly, at most ω + 1 searchers can be used in Step 4. At most ω searchers are used in the rest of the steps. Thus es(G) ≤ ω + 1. Therefore we have the following lemma. LEMMA 2.11.

For any k-starlike graph G with |X 0 | = 3, es(G) ≤ ω + 1.

Lemma 2.11 gives an upper bound of es(G) in the case of |X 0 | = 3. Note that a clique of size 3 can be cleared using two searchers. Hence we need to pay special attention to solve our problem when ω = 3. We now consider the case of ω = 3 in Lemma 2.12 and the case of ω ≥ 4 in Lemmas 2.13 and 2.14. LEMMA 2.12. Let G be a k-starlike graph with |X 0 | = 3 and ω = 3. Let I be the set of all peripheral vertices. Then 1. es(G) = 2 if and only if ∃w ∈ X 0 , deg(w) = 2, and, ∀u, v ∈ X 0 , |N I (u) ∩ N I (v)| = 0, 2. es(G) = 4 if and only if, ∀u, v ∈ X 0 , |N I (u) ∩ N I (v)| ≥ 2, and 3. es(G) = 3 if and only if none of above conditions holds. PROOF. 1. Since |X 0 | = 3, es(G) > 1. Firstly, assume that G does not satisfy the specified condition. That is, either all vertices in X 0 are of degree greater than 2 or there exist two vertices in X 0 having common peripheral neighbors. Let G a and G b be the graphs depicted in Figures 2(a) and 2(b), respectively. Either G a or G b is a subgraph of G. It can be verified that es(G a ) = es(G b ) = 3. Hence, es(G) ≥ 3. We conclude that if es(G) = 2, then G satisfies the specified condition.

404

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

Fig. 2. Graphs G a , G b , and H .

Next, assume G satisfies the specified condition. Let X 0 = {u, v, w} and deg(w) = 2. By the specified condition, every vertex in I is adjacent to vertices u or v. We can clear G by applying Algorithm ESA(G, u, w, v). Though the maximum clique size is 3, Algorithm ESA(G, u, w, v) only uses two searchers to clear G. By Lemma 2.7, our strategy is optimal. Hence es(G) = 2. 2. Suppose that G satisfies the condition that, for all u, v ∈ X 0 , |N I (u) ∩ N I (v)| ≥ 2. Graph G must contain the graph H depicted in Figure 2(c) as a subgraph. It can be verified that es(H ) = 4. By Lemma 2.11, es(G) = 4. On the other hand, suppose that G does not satisfy the specified condition. That is, there exist two vertices u and v in X 0 , such that |N I (u) ∩ N I (v)| ≤ 1. We denote the rest vertex in C by w. It is not hard to see that Algorithm ESA(G, u, v, w) uses exactly three searchers to clear G. Hence, Statement (2) holds. 3. By Statements (1) and (2). LEMMA 2.13. Let G be a k-starlike graph with |X 0 | = 3 and ω = k + 1 ≥ 4. Then es(G) = ω + 1 if and only if (1) ∀u ∈ X 0 , there exists a k-p-clique X such that u ∈ X or (2) ∀u, v ∈ X 0 , there exists a (k − 1)-p-clique X such that u, v ∈ X . PROOF. Let H1 be the k-starlike graph with the central clique X 0 = {u 1 , u 2 , u 3 } and the peripheral cliques X 1 , X 2 , X 3 where X i , 1 ≤ i ≤ 3, is a k-p-clique and X i ∩ X 0 = {u i }. Let H2 be the k-starlike graph with the central clique Y0 = {v1 , v2 , v3 } and the peripheral cliques Y1 , Y2 , Y3 where Yi , 1 ≤ i ≤ 3, is a (k − 1)-p-clique and Yi ∩ Y0 = {vi , v j | j = (i mod 3) + 1}. Suppose that G satisfies one of the specified conditions in the statement of this lemma, then G must contain either H1 or H2 as a subgraph. It can be verified that es(H1 ) = ω + 1 and es(H2 ) = ω + 1. By Lemmas 2.6 and 2.11, we conclude that es(G) = ω + 1. On the other hand, suppose that G does not satisfy the specified condition. Let X 0 = {u, v, w}. Then there exists a vertex, say u, in X 0 that is not contained by any k-p-clique. Since ω = k + 1, there is no k-p-clique X with |X ∩ X 0 | = 2. If u and v have no common (k − 1)-p-clique, then we apply Algorithm ESA(G, v, u, w) to clear G. If u and w have no common (k − 1)-p-clique, then we apply Algorithm ESA(G, w, u, v) to clear G. In each of the above edge-search strategies, exactly ω searchers are used. If v and w have no common (k − 1)-p-clique, then we exchange Steps 2 and 3 of Algorithm ESA and

Graph Searching on Some Subclasses of Chordal Graphs

405

call this modified algorithm ESA0 . By applying Algorithm ESA0 (G, v, u, w), we clear G using ω searchers. By an argument similar to that in the proof of Lemma 2.13, we have the following lemma. LEMMA 2.14. Let G be a k-starlike graph with |X 0 | = 3 and ω = k + 2 ≥ 4. Then es(G) = ω + 1 if and only if, ∀u, v ∈ X 0 , there exists a k-p-clique X such that u, v ∈ X .

3. Edge Searching on Split Graphs. In this section we discuss the edge-searching problem on split graphs. Gustedt [12] proved that for any split graph G = (C ∪ I, E), ns(G) is either |C| or |C| + 1. Together with Lemmas 2.7 and 2.9, we have the following lemma. LEMMA 3.1. If G = (C ∪ I, E) is a split graph, then |C| − 1 ≤ es(G) ≤ |C| + 2. Furthermore, if |C| ≥ 4, then |C| ≤ es(G) ≤ |C| + 2. From Lemma 3.1, es(G) ∈ {|C| − 1, |C|, |C| + 1, |C| + 2} for any split graph G = (C ∪ I, E). Hence, our approach is to derive the necessary and sufficient conditions for a split graph to have a given search number. We examine the input split graph to learn which condition it satisfies and then to determine its edge-search number by checking the conditions it has satisfied. In Section 3.1 we exploit these conditions. Then we describe an algorithm for solving the edge-searching problem on split graphs in Section 3.2. 3.1. The Necessary and Sufficient Conditions. Since we only consider edge-search strategies without recontamination, each vertex is cleared exactly once in an edge-search strategy. Furthermore, the time steps at which a vertex is guarded are consecutive. With respect to an optimal edge-search strategy, we denote the first time step that a vertex x is guarded by tg (x) and the first time step that x is cleared by tc (x). Note that if tc (u) = tc (v), then edge (u, v) is the only contaminated edge incident to u and v at state Stc (u)−1 and m tc (u) = m ∗ (u, v). We define the clearing ordering 2 (α) are cleared before tc (α). LEMMA 3.5. Let G = (C ∪ I, E) be a split graph with es(G) = |C|. Let S be a strict strategy of G. Then at most one vertex in N I=2 (ε) is cleared before tc (α) in S. PROOF. Recall that tg (ε) = tc (α) or tg (ε) = tc (α) − 1. At tc (α) − 1, at most one edge incident to ε is cleared. Since m tc (α) = m − (α, ε), at most one vertex in N I (ε) is cleared before tc (α). In particular, at most one vertex in N I=2 (ε) is cleared before tc (α). LEMMA 3.6. Let G = (C ∪ I, E) be a split graph with es(G) = |C|. Let S be a strict strategy of G. Then no vertex in N I>2 (ε) is cleared before tc (α) in S. PROOF. Suppose that w is a vertex in N I>2 (ε) that is cleared before tc (α). If tg (w) ≥ tg (δ), all the |C| searchers are used to guard the vertices in (C\{ε}) ∪ {w} at tg (w). By Lemma 3.3, α is a spot vertex at tg (w) and tc (α) = tg (w) + 1 since w is a stain vertex at tg (w). Thus w is cleared after tc (α) which contradicts the assumption on w. Hence, tg (w) < tg (δ). Since tg (w) < tg (δ), all the |C| searchers are used to guard the vertices in (C\{ε}) ∪ {w} at tg (δ). By Lemma 3.3, either w or α is a spot vertex. Since w is cleared before tc (α), w must be a spot vertex whose incident contaminated edge is (w, ε) at tg (δ). Hence, m tg (δ)+1 = m − (w, ε). Since all the |C| searchers are used to guard the central vertices at tg (δ) + 1, α must be a spot vertex. Since m tg (δ)+1 = m − (w, ε), α is already a spot vertex at tg (δ). Since there is no cleared central vertex at tg (δ), by Lemma 2.5,

Graph Searching on Some Subclasses of Chordal Graphs

409

(α, w) ∈ E is a cleared path and (α, w) is cleared by m tg (δ) . Since m tg (δ) clears an edge incident to δ, δ = α. However, δ is a stain vertex at tg (δ) which contradicts the fact that α, which is equal to δ, is a spot vertex at tg (δ). Therefore, no vertex in N I>2 (ε) is cleared before tc (α). LEMMA 3.7. Let G = (C ∪ I, E) be a split graph with es(G) = |C|. Let S be a strict strategy of G. Then at most one vertex in N I>2 (δ) is cleared before tc (α) in S. PROOF. Suppose the contrary. Let w1 and w2 be two vertices in N I>2 (δ) with tc (w1 ) < tc (w2 ) < tc (α). Firstly, we prove that tg (wi ) < tg (δ), for i = 1, 2. If tg (wi ) ≥ tg (δ), all the central vertices except ε are guarded at tg (wi ). Since wi is a stain vertex at tg (wi ), by Lemma 3.3, α is a spot vertex and tc (α) = tg (wi ) + 1. Then wi is cleared after tc (α) which is a contradiction. Thus, tg (wi ) < tg (δ) for i = 1, 2. Since tg (wi ) < tg (δ) for i = 1, 2, at tg (δ) − 1, w1 and w2 are guarded, and all the central vertices except δ and ε are guarded stain vertices. It implies that w1 is a spot vertex at tg (δ) − 1 and m tg (δ) = m − (w1 , δ). Then α is a stain vertex at tg (δ) since δ is a stain vertex, and (α, δ) and (α, ε) are not cleared if α 6= δ . Thus, w2 must also be a spot vertex at tg (δ) − 1 and tg (δ) since m tg (δ) does not clear an edge incident to w2 . However, by Lemma 2.5, neither w1 nor w2 is a spot vertex at tg (δ) − 1. Therefore, there is at most one vertex in N I>2 (δ) that is cleared before tc (α). LEMMA 3.8. Let G = (C ∪ I, E) be a split graph with es(G) = |C|. Let S be a strict strategy of G. Then at most one vertex in N I>2 (β) is cleared after tc (α) in S. PROOF. Suppose the contrary. Let w1 and w2 be two vertices in N I>2 (β) which are cleared after tc (α). Assume without loss of generality that tg (w1 ) < tg (w2 ) ≤ tc (β). We have two cases: Case 1: tg (w1 ) < tc (α). We first prove that w1 cannot be a spot vertex at tc (α). If w1 is a spot vertex at tc (α), then w1 is a spot vertex at tc (α) − 1 since m tc (α) = m − (α, ε). Since α is also a spot vertex at tc (α) − 1, by Lemma 2.5, there is a cleared path at tc (α) − 1 connecting α and w1 . Further, w1 is a neighbor of α. However, by Lemma 3.4, all the vertices in N I>2 (α) are cleared before tc (α). Hence, we derive a contradiction. That is, w1 is a stain vertex at tc (α). Next, we show that this case is impossible. Since tg (w1 ) < tc (α), ε is not guarded at tc (α) − 1 which implies that tc (α) = tg (ε). If tg (w1 ) ≤ tg (δ), then at tg (δ) there is no free searcher and, by Lemma 3.3, α is a spot vertex and tc (α) = tg (δ) + 1. If β 6∈ {δ, ε}, then (β, δ) and (β, ε) are not cleared at tg (δ). Together with the fact that δ and ε are not spot vertices at tg (δ), β is not a spot vertex at tg (δ). Since m tc (α) = m − (α, ε), both β and w1 are not spot vertices at tc (α). This implies Stc (α) is a deadlock state. If tg (w1 ) > tg (δ), / E, by by Lemma 3.3, α must be a spot vertex at tg (w1 ). However, since (α, w1 ) ∈ Lemma 2.4, α is not a spot vertex at tg (w1 ) − 1. That is, α is a stain vertex at tg (w1 ), a contradiction. Case 2: tg (w1 ) > tc (α). Since tg (w1 ) > tc (α), all the central vertices except α are guarded and w1 is a stain vertex at tg (w1 ). By Lemma 3.3, β is a spot vertex at tg (w1 ) and

410

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

tc (β) = tg (w1 )+1. Since tg (w1 ) < tg (w2 ) ≤ tc (β), tg (w2 ) = tc (β). Namely, the clearing moves between tg (w1 ) − 1 and tc (β) are Stg (w1 )−1 , m + (β, w1 ), Stg (w1 ) , m − (β, w2 ), Stc (β) . Both w1 and w2 are stain vertices at tc (β). At tg (w1 ) − 1, β is a stain vertex and β is the second cleared central vertex. Thus all the central vertices in C\{α, β} are stain vertices at tg (w1 ) − 1. Since only the edges (β, w1 ) and (β, w2 ) are cleared between tg (w1 ) − 1 and tc (β), every vertex in C\{α, β} is still a stain vertex at tc (β). This implies that Stc (β) is a deadlock state which is a contradiction. Therefore, at most one vertex in N I>2 (β) is cleared after time step tc (α). A 4-tuple (u, v, x, y), where u, v, x, y are central vertices, is called feasible if the four vertices satisfy the following conditions: (Y0) (Y1) (Y2) (Y3) (X1) (XY)

u 6= y. |N I>2 (u) ∩ N I>2 (y)| = 0. |N I>2 (v) ∩ N I>2 (y)| ≤ 1. |N I=2 (u) ∩ N I=2 (y)| ≤ 1. |N I>2 (u) ∩ N I>2 (x)| ≤ 1. |N I>2 (u, v) ∩ N I>2 (x, y)| ≤ 2.

The above six conditions are called feasibility conditions. Now we derive the necessary and sufficient conditions for es(G) = |C|. THEOREM 3.9. Let G = (C ∪ I, E) be a split graph. Then es(G) = |C| if and only if there exist four central vertices u, v, x, y such that (u, v, x, y) is feasible. PROOF. Suppose that es(G) = |C|. Let S be a strict strategy of G. We consider the four central vertices α, β, δ, and ε. In the following we show that (α, β, δ, ε) is feasible. As noticed in the proof of Lemma 3.2, α 6= ε. Thus Condition (Y0) holds. Condition (Y1) holds by Lemmas 3.4 and 3.6. Condition (Y2) holds by Lemmas 3.6 and 3.8. Condition (X1) holds by Lemmas 3.4 and 3.7. Next we prove Condition (Y3) holds. If all the vertices in N I=2 (α) ∩ N I=2 (ε) are cleared before tc (α), by Lemma 3.5, |N I=2 (α) ∩ N I=2 (ε)| ≤ 1. If there exist vertices in N I=2 (α) ∩ N I=2 (ε) which are cleared after tc (α), then at most one vertex in N I=2 (α) ∩ N I=2 (ε) is cleared after tc (α) since there is only one peripheral vertex guarded at tc (α). In this case, let w ∈ N I=2 (α) ∩ N I=2 (ε) be cleared after tc (α). Vertex w is guarded at tc (α) − 1 and tc (α). It implies that tc (α) = tg (ε). Hence, in this case, no vertex in N I (ε) is cleared before tc (α). We conclude that |N I=2 (α) ∩ N I=2 (ε)| ≤ 1. Now we prove Condition (XY) holds. If |N I>2 (α, β) ∩ N I>2 (δ, ε)| > 2, two of vertices in N I>2 (α, β) ∩ N I>2 (δ, ε) are cleared either before tc (α) or after tc (α), which contradicts Lemmas 3.4, 3.6, 3.7, and 3.8. Thus, Condition (XY) holds. Hence (α, β, δ, ε) is feasible. On the other hand, suppose there exist u, v, x, y ∈ C such that (u, v, x, y) is feasible. We will prove es(G) = |C| by providing an edge-search strategy using exactly |C| searchers. By Conditions (Y0) and (Y3), u 6= y and |N I=2 (u) ∩ N I=2 (y)| ≤ 1. If |N I=2 (u) ∩ =2 N I (y)| = 1, then we denote the vertex in N I=2 (u) ∩ N I=2 (y) by b. By Condition (XY), there are at most two vertices in N I>2 (u, v) ∩ N I>2 (x, y). We use two variables a and

Graph Searching on Some Subclasses of Chordal Graphs

411

w to denote the vertices in N I>2 (u, v) ∩ N I>2 (x, y). The values of a and w are either null or vertices, and are decided by the following rules. Initially a and w are null. If |N I>2 (u) ∩ N I>2 (x)| = 1, we denote the vertex in N I>2 (u) ∩ N I>2 (x) by a and the other vertex in N I>2 (u, v) ∩ N I>2 (x, y), if exists, by w. If |N I>2 (v) ∩ N I>2 (y)| = 1, we denote the vertex in N I>2 (v) ∩ N I>2 (y) by w and the other vertex in N I>2 (u, v) ∩ N I>2 (x, y), if exists, by a. If |N I>2 (u) ∩ N I>2 (x)| = 0 and |N I>2 (v) ∩ N I>2 (y)| = 0, then N I>2 (u, v) ∩ N I>2 (x, y) = N I>2 (v) ∩ N I>2 (x). In this case, if |N I>2 (v) ∩ N I>2 (x)| = 2, then {a, w} = N I>2 (u, v)∩ N I>2 (x, y); and if |N I>2 (v)∩ N I>2 (x)| = 1, then we denote the vertex in N I>2 (u, v)∩N I>2 (x, y) by a. Note that if a is not null, then a ∈ N I>2 (x)\N I>2 (y); and if w is not null, then w ∈ N I>2 (v)\N I>2 (u). Now, we describe an edge-search strategy using exactly |C| searchers. 1. Clear I \N I (x, y): guard the vertices in C\{x, y} using |C| − 2 searchers and clear every vertex in I \N I (x, y) by the two free searchers. 2. If a exists, i.e., not null, then clear a; else simply guard x: Suppose a exists. Recall that a is incident to x but not incident to y. Since deg(a) ≥ 3 and a ∈ / N I>2 (y), there exists a central vertex c 6∈ {u, x, y} such that (a, c) ∈ E. At this step, we have two free searchers. Apply m + (c, a) using the first free searcher. Then we use the second free searcher to clear all the edges incident to a with the constraint that (a, x) is the last cleared edge. After this, a is cleared and x is guarded. 3. Clear every edge in G[C\{y}] by the remaining free searcher. 4. Clear every uncleared vertex in N I2 (x, y)) ∪ {a}. If u = x, then, by (X1), a is the only vertex in N I>2 (u). If v 6∈ {x, y}, then N I>2 (v) ⊆ (I \N I>2 (x, y)) ∪ {a, w}. If v = x, then, by (XY), N I>2 (v) = {a, w}. If v = y, then, by (Y1) and (Y2), {w} = N I>2 (v). The above strategy clears G using exactly |C| searchers. Note that the roles of u and v are symmetric to y and x. If there is an optimal edgesearch strategy such that u and v are the first and the second cleared central vertices, respectively, then there exists an optimal edge-search strategy such that y and x are the first and the second cleared central vertices, respectively. According to Theorem 3.9, for a split graph G, es(G) = |C| if there are central vertices u, v, x, y such that the subgraph induced by C and N I (u, v) ∩ N I (x, y) is a subgraph of that depicted in Figure 3, where a (respectively, w) is a peripheral vertex

412

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

Fig. 3. A graph satisfies the feasibility conditions.

adjacent to all the central vertices except y (respectively, u) and b is a peripheral vertex with N (b) = {u, y}. Next, we give a necessary and sufficient condition for G to have es(G) = |C| + 1. THEOREM 3.10. Let G = (C ∪ I, E) be a split graph with |C| ≥ 4 and es(G) > |C|. Then es(G) = |C| + 1 if and only if ∃u, v ∈ C such that |N I>2 (u) ∩ N I>2 (v)| ≤ 2. PROOF. Suppose that es(G) = |C| + 1. Let S be an optimal edge-search strategy satisfying Lemma 2.4. In S, let u (respectively, v) be the first cleared (respectively, last guarded) vertex in C. Every vertex in N I>2 (u) ∩ N I>2 (v) is cleared either before tc (u) or after tc (u). There are two cases. Case 1: tc (u) = tg (v). In this case, m tc (u) = m − (u, v). It implies that no vertex in N I>2 (v) is cleared before tg (v). In particular, no vertex in N I>2 (u) ∩ N I>2 (v) is cleared before tg (v). At tc (u), at most two vertices in N I>2 (u) are guarded. Thus at most two vertices in N I>2 (u) (particularly, in N I>2 (u) ∩ N I>2 (v)) are cleared after tc (u). Therefore, |N I>2 (u) ∩ N I>2 (v)| ≤ 2. Case 2: tc (u) > tg (v). In this case, all the central vertices are guarded at tc (u) − 1. Thus, at most one peripheral vertex is guarded at tc (u) − 1. That is, at most one vertex in N I>2 (u) (particularly, in N I>2 (u) ∩ N I>2 (v)) is cleared after tc (u). Next, we prove that at most one vertex in N I>2 (u) ∩ N I>2 (v) is cleared before tc (u). Let w ∈ N I>2 (u) ∩ N I>2 (v) be any vertex cleared before tc (u). We first prove that tg (w) < tg (v). Suppose that tg (v) ≤ tg (w) < tc (w) ≤ tc (u). At tg (w), all the |C| + 1 searchers are guarding on vertices. We obtain that tg (w) + 1 = tc (u) and w is cleared after tc (u), a contradiction. Hence, tg (v) > tg (w). Suppose that there are two vertices w1 , w2 ∈ N I>2 (u) ∩ N I>2 (v) cleared before tc (u). Thus, they are guarded at tg (v) − 1. Since tg (v) 6= tc (u) and there is no free searcher at tg (v) − 1, w1 or w2 must be a spot vertex. Assume without loss of generality that w1 is a spot vertex at tg (v) − 1. By Lemma 2.5, w2 is a stain vertex at tg (v) − 1. Thus, m tg (v) = m − (w1 , v) and w2 remains a stain vertex at tg (v). Then u must be a spot vertex at tg (v), which implies that w2 is cleared after tc (u). It is a contradiction. Thus, at most one vertex in N I>2 (u) ∩ N I>2 (v) is cleared before tc (u). Therefore, we conclude that |N I>2 (u) ∩ N I>2 (v)| ≤ 2.

Graph Searching on Some Subclasses of Chordal Graphs

413

On the other hand, assume that there exist u, v ∈ C such that |N I>2 (u) ∩ N I>2 (v)| ≤ 2. By Lemma 2.6, we assume without loss of generality that N I>2 (u) ∩ N I>2 (v) = {a, b}. We describe an edge-search strategy using exactly |C| + 1 searchers as follows. At first, vertices in I \N I (v) are cleared before v is guarded. Then u has two neighbors a and b in I >2 which are uncleared. We first clear a. After a is cleared, v is guarded and there is exactly one free searcher. By using this free searcher, we clear all the contaminated edges in the central clique and all the contaminated vertices in I ≤2 . Then u is cleared by the clearing move m − (u, b). By using the free searcher, we clear b. After b is cleared, we have two free searchers again. Finally, all the uncleared vertices can be cleared using these two searchers. 3.2. Our Algorithm and Implementation. Our algorithm naturally follows from Lemmas 2.10 and 2.12, and Theorems 3.9 and 3.10. It is not hard to see that we can compute the edge-search number of a split graph with |C| ≤ 3 in O(m + n) time (Lemmas 2.10 and 2.12). We now describe an efficient way to implement our algorithm in the case of |C| ≥ 4 (Theorems 3.9 and 3.10). LEMMA 3.11. Checking the condition of Theorem 3.10 can be done either in the time complexity of matrices multiplication and O(n 2 ) space or in O(mn) time and O(m) space. PROOF. Let C = {c1 , c2 , . . . , cr }. We show the two implementation methods as follows: (1) Let H = (C ∪ I >2 , E H ) be the bipartite graph with C and I >2 being the two parties and E H = {(c, w) ∈ E|c ∈ C, w ∈ I >2 }. Note that for two vertices u, v ∈ C, |N I>2 (u) ∩ N I>2 (v)| equals the number of length-2 paths connecting u and v in H . Let I >2 = {w1 , w2 , . . . , ws }. Let M = [m i j ] be the adjacency matrix of C and I >2 , where the i jth entry m i j = 1 if (ci , w j ) ∈ E; otherwise m i j = 0. Let M T be the transpose of M. The i jth entry of M M T is the number of distinct paths of length 2 connecting ci and c j . Thus, es(G) = |C| + 1 if there is an entry in M M T that is no greater than 2. The time complexity equals that of the multiplication of matrices. However, it needs O(n 2 ) space. (2) For each vertex u, we construct the set N I>2 (u) in O(m +n) time. Let D be an array such that D[i] is the number of ci ’s neighbors in N I>2 (u). This can also be determined in O(m + n) time. Thus, for each ci with D[i] ≤ 2, ci can be the vertex v. Using this method needs O(mn) time and O(m) space. For a pair of central vertices u and v, we call a pair of central vertices x and y an indicator pair for u and v if (u, v, x, y) is feasible. For a pair of central vertices u and v, a central vertex c is called an x-candidate if it satisfies |N I>2 (u) ∩ N I>2 (c)| ≤ 1 and |N I>2 (u, v) ∩ N I>2 (c)| ≤ 2, and c is called a y-candidate if c 6= u and c satisfies |N I>2 (u) ∩ N I>2 (c)| = 0, |N I>2 (v) ∩ N I>2 (c)| ≤ 1, and |N I=2 (u) ∩ N I=2 (c)| ≤ 1. Note that a y-candidate must be an x-candidate. Let cx and c y , cx 6= c y , be an x-candidate and a ycandidate, respectively. In the cases of |N I (cx )∩ N I>2 (u, v)| ≤ 1 or |N I (c y )∩ N I>2 (v)| = 0, cx and c y can serve as an indicator pair for u and v since (u, v, cx , c y ) is feasible. Similarly, in the case of |N I (cx ) ∩ N I>2 (u, v)| = 2 and |N I (c y ) ∩ N I>2 (v)| = 1, cx and c y

414

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

can serve as an indicator pair for u and v only if N I (c y )∩ N I>2 (v) ⊂ N I (cx )∩ N I>2 (u, v); otherwise, Condition (XY) is not satisfied. LEMMA 3.12. Checking the existence of the indicator pair for central vertices u and v can be done in O(m + n) time and O(m) space. PROOF. Let C = {c1 , c2 , . . . , cr }. We first construct the sets N I>2 (u, v), N I>2 (u), and N I=2 (u). It can be done in O(m + n) time. Let D1, D2, and F be arrays such that D1[i] is the number of ci ’s neighbors in N I>2 (u, v), D2[i] is the number of ci ’s neighbors in N I>2 (u), and F[i] is the number of ci ’s neighbors in N I=2 (u). The arrays D1, D2, and F can be computed in O(m + n) time by looking up the adjacency list of G for vertices in N I>2 (u, v), N I>2 (u), and N I=2 (u), respectively. If D1[i] > 2, then ci cannot be an x-candidate. If D1[i] > 1, then ci cannot be a y-candidate. For each central vertex ci , we use T [i] to record the following information. If ci is a y-candidate, then let T [i] = 0. If ci is an x-candidate but not a y-candidate, then let T [i] = 1. Otherwise let T [i] = 2. There are three cases: Case 1: D1[i] = 2. By conditions (Y1) and (Y2), ci cannot be a y-candidate and, by condition (X1), ci is an x-candidate if and only if D2[i] ≤ 1. Thus if D2[i] ≤ 1, then let T [i] = 1; otherwise let T [i] = 2. Case 2: D1[i] = 1. By Conditions (X1) and (XY), ci is an x-candidate. By Conditions (Y1) and (Y3), ci is a y-candidate if and only if D2[i] = 0, F[i] ≤ 1, and ci 6= u. Thus if D2[i] = 0, F[i] ≤ 1, and ci 6= u, then let T [i] = 0; otherwise let T [i] = 1. Case 3: D1[i] = 0. By Conditions (X1), ci is an x-candidate. By Conditions (Y1), (Y2) and (Y3), ci is a y-candidate if and only if F[i] ≤ 1 and ci 6= u. Thus if F[i] ≤ 1 and ci 6= u, then let T [i] = 0; otherwise let T [i] = 1. The array T is determined in O(n) time. With T , C is partitioned into three subsets: C y , the set of y-candidates, C x , the set of x-candidates not in C y , and the set of central vertices not in C x and C y . Recall that a y-candidate can also be an x-candidate. If |C y | ≥ 2, let w1 , w2 ∈ C y , w1 6= w2 . Then w1 and w2 is an indicator pair for u and v since |N I (w1 ) ∩ N I>2 (u, v)| ≤ 1. In the case of |C y | = 1, let ci ∈ C y . If there exists an x-candidate c j such that D1[ j] ≤ 1, or D1[ j] = 2 and N I (ci ) ∩ N I>2 (u, v) ⊂ N I (c j ) ∩ N I>2 (u, v), then c j and ci is an indicator pair for u and v. The feasibility conditions are not satisfied in any of the other cases. We conclude that an indicator pair of u and v can be determined in O(m + n) time and O(m) space. THEOREM 3.13. For any split graph G, both es(G) and an optimal edge-search strategy of G can be determined in O(mn 2 ) time and O(m) space. PROOF. By Lemma 3.12, for each pair of central vertices u and v, it takes O(m + n) time to determine the existence of its indicator pair. Since there are O(n 2 ) possible pairs of u and v, the feasibility conditions can be checked in O(mn 2 ) time. Note that it uses O(m) space. When u, v and their indicator pair are found, as shown in the proof of

Graph Searching on Some Subclasses of Chordal Graphs

415

Theorem 3.9, an optimal edge-search strategy can also be constructed in O(m + n) time. Together with Lemma 3.11 and Theorem 3.10, this theorem holds.

4. Node Searching on k-Starlike Graphs. In this section we discuss the node-searching problem on k-starlike graphs. A node-search strategy can be represented by a sequence of vertex subsets (Yi ) = (Y0 , . . . , Ys ), where Yi is the vertex subset guarded by searchers at step i [15]. We assume recontamination does not occur. If v is guarded at step i and is cleared at step j, then v ∈ Yt for all t, i ≤ t ≤ j. We call such a property the consecutive property. Moreover, every edge is cleared at some step i, i.e., there exists some i such that u, v ∈ Yi , for every edge (u, v) ∈ E. On the other hand, every sequence of vertex subsets (Yi ) satisfying the above two properties corresponds to a node-search strategy [15]. Let (Yi ) be a node-search strategy. For any maximal clique W of G, there is a time step t such that W ⊆ Yt [12], i.e., all the edges in W are cleared at t. We call such a property the clique containment property. Assume that the clearing order of the maximal cliques is given by a permutation π : {0, . . . , r } → {0, . . . , r }, i.e., X i is cleared before X j if π(i) < π( j). Then we define a node-search strategy (Yi ) corresponding to the clearing order: Y0 = X π −1 (0) , Yr = X π −1 (r ) , Yi = (Yi−1 ∩ X 0 ) ∪ X π −1 (i) for 0 < i ≤ π(0) and Yi = (Yi+1 ∩ X 0 ) ∪ X π −1 (i) for π(0) ≤ i < r . Such a node-search strategy is called normalized. Gustedt [12] proved that every starlike graph G has a normalized optimal node-search strategy (in terms of path decomposition). From now on, we assume (Yi ) is normalized and G is a k-starlike graph. During the course of an optimal node-search strategy, the number of guarded vertices in the central clique increases until the central clique is guarded and then decreases. Recall that a guarded vertex is the vertex containing a searcher. Since each node-search strategy (Yi ) uses maxi |Yi | searchers, we have the following lemma. LEMMA 4.1. If G = (V, E) is a k-starlike graph with the central clique X 0 , then |X 0 | ≤ ns(G) ≤ |X 0 | + k. Assume that ns(G) = |X 0 | + s for some integer s, 0 ≤ s ≤ k − 1. Let (Yi ) be an optimal node-search strategy, let t0 be the first time step when all vertices in X 0 are guarded (i.e., X 0 ⊆ Yt0 and X 0 6⊆ Yt0 −1 ), and let fl be the lth cleared vertex in X 0 for 1 ≤ l ≤ k − s. We claim that all the i-p-cliques containing fl with i ≥ s + l must be cleared before t0 . Otherwise, suppose X is an i-p-clique such that fl ∈ X , i ≥ s + l, and X is cleared at time step t ≥ t0 . According to the consecutive property, we know that at time step t, at least |X 0 | − (l − 1) vertices in X 0 are guarded. We need another i ≥ s +l searchers to clear the peripheral vertices in X which contradicts the assumption that ns(G) = |X 0 | + s. Let Q i be the set of all i-p-cliques for 1 ≤ i ≤ k. Let Fl = { f 1 , f 2 , . . . , fl } and let Q li = {X ∈ Q i |X ∩ Fl 6= ∅}. According to the above discussion, the cliques in Q 1s+1 ∪ Q 2s+2 ∪ · · · ∪ Q k−s are cleared before t0 . Now, for all i, 1 ≤ i ≤ k − s, consider k the time step t < t0 such that |Yt ∩ X 0 | ≤ |X 0 | − i and |Yt+1 ∩ X 0 | > |X 0 | − i. Since there are at most s + i − 1 available free searchers between t + 1 and t0 , all the cliques

416

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

k−s in Q is+i ∪ Q i+1 are cleared before t + 1. Let Pik−s = {x|x ∈ X ∩ X 0 and s+i+1 ∪ · · · ∪ Q k i+1 k−s i X ∈ Q s+i ∪ Q s+i+1 ∪ · · · ∪ Q k }. We have |Pik−s | ≤ |X 0 | − i, i.e., |X 0 \Pik−s | ≥ i. Conversely, assume there exist vertices f 1 , . . . , f k−s ∈ X 0 , such that |X 0 \Pik−s | ≥ i, for all i, 1 ≤ i ≤ k − s. We use the following steps to clear G:

1. Clear all the cliques in Q is+i from i = k − s down to 1, 2. Clear the central clique X 0 and all the cliques in Q i for i ≤ s. 3. Clear all the cliques in Q s+i \Q is+i from i = 1 to k − s. Since for each i in {1, . . . , k − s}, |X 0 \Pik−s | ≥ i, all the (s + i)-p-cliques in Q is+i are cleared using (|X 0 | − i) + (s + i) = |X 0 | + s searchers in Step 1. In Step 2 the number of searchers used is |X 0 | + i ≤ |X 0 | + s. After Steps 1 and 2, f 1 is cleared, and then we have s + 1 searchers to clear all the cliques in Q s+1 \Q 1s+1 . In Step 3, for all i, 1 ≤ i ≤ k − s − 1, after all the cliques in Q s+i \Q is+i are cleared, f i+1 is cleared since all the j-p-cliques, j ≤ s + i, are cleared and all the j-p-cliques containing f i+1 , j > s + i, are in Q k−s k . Then we have s + i + 1 free searchers to clear all the cliques in Q s+i+1 \Q i+1 s+i+1 . Hence, the resulting node-search strategy corresponding to this clearing order uses at most |X 0 | + s searchers. Therefore, we have the following lemma. LEMMA 4.2. Let G be a k-starlike graph with the central clique X 0 and let s be a given integer such that 0 ≤ s ≤ k − 1. Assume that ns(G) ≥ |X 0 | + s. Then ns(G)=|X 0 | + s if and only if ∃ f 1 , . . . , f k−s ∈ X 0 such that |X 0 \Pik−s | ≥ i, for all i, 1 ≤ i ≤ k − s. By Lemma 4.2, we construct an algorithm to determine ns(G) as follows. Our algorithm iteratively executes the following test from s = 0 to k −1: “Is there any sequence of vertices f 1 , f 2 , . . . , f k−s in X 0 such that |X 0 \Pik−s | ≥ i, for all i, 1 ≤ i ≤ k−s?” If any of the test conditions holds, then the algorithm terminates with the output ns(G) = |X 0 |+s. Otherwise, the algorithm concludes that ns(G) = |X 0 | + k. In each iteration, when a sequence of vertices f 1 , f 2 , . . . , f k−s are given, a standard graph traversal algorithm is used to compute Pik−s , for all i in {1, . . . , k − s}, in O(m) time if each vertex is marked with a flag indicating whether it is in X 0 and if not, which ip-clique it is in (such information can be obtained by the linear-time algorithm described in Section 2.1 for recognizing k-starlike graphs). Since the algorithm tries all possible |X | sequences of k − s vertices in X 0 , we need O((k − s)! · Ck−s0 · m) = O((k − s)! · n k−s · m) time in each iteration. If k is a fixed constant, then the time bound of the algorithm is O(mn k ). Notice that only O(m) working space is needed to label the vertices in the algorithm. We have the following theorem. THEOREM 4.3. For any k-starlike graph G, where k ≥ 1 is a fixed constant, both ns(G) and an optimal node-search strategy of G can be determined in O(mn k )-time and O(m)-space. Our algorithm improves a previous algorithm in [12] which runs in O(n 2k+1 ) time and uses O(n 2k+1 ) space.

Graph Searching on Some Subclasses of Chordal Graphs

417

5. Edge Searching on k-Starlike Graphs. In this section we consider the edgesearching problem on k-starlike graphs. Our approach is an extension of the one for solving edge searching on split graphs given in Section 3 and the one for solving node searching on k-starlike graphs given in Section 4. We derive the necessary and sufficient conditions for a k-starlike graph to have a given edge-search number by discovering properties of the first k cleared vertices of the central clique in an optimal edge-search strategy. LEMMA 5.1. Let G be a k-starlike graph, k ≥ 2, with the central clique X 0 . Then |X 0 | − 1 ≤ es(G) ≤ |X 0 | + k. PROOF. The lower bound is by Lemma 2.7. The upper bound can be derived by applying the following edge-search strategy. Given |X 0 | + k searchers, we first guard vertices in X 0 by using |X 0 | searchers. Next, we clear all the edges in X 0 using a free searcher. Finally, since k ≥ 2, we can apply the strategy described in Lemma 2.8 to clear all the peripheral cliques one by one. By Lemma 2.8, each peripheral clique can be cleared using at most k searchers. Hence, our lemma follows. The case of |X 0 | ≤ 3 has been discussed in Section 2.3. In the following, we concentrate on the case of |X 0 | ≥ 4. Consider an optimal edge-search strategy S of G. A clique X of G is cleared continuously after the time step t in S if for all i, t + 1 ≤ i ≤ t 0 , m i is either m + (xi , yi ) with xi , yi guarded or m − (xi , yi ) with xi being a spot vertex where xi and yi are in X and t 0 is the first time step that X is cleared in S. LEMMA 5.2. Let S be an optimal edge-search strategy for a k-starlike graph G satisfying Lemma 2.4. Let X be an i-p-clique of G, |X | ≥ 4. Let u and x be the first cleared vertex and the next to last guarded vertices in X, respectively. Suppose that all the guarded vertices not in X are stain vertices at tg (x). Then there is a free searcher at tg (x). Furthermore, if i ≥ 2, then X is cleared continuously after tg (x), and there is a free searcher at every time step between tg (x) and the first time step that X is cleared. PROOF. Let y be the last guarded vertex in X . Suppose that there is no free searcher at tg (x). At the time step tg (x) − 1, every vertex w ∈ X \{x, y} has two contaminated edges (w, x) and (w, y). Since the guarded vertices not in X are stain vertices at tg (x), u must be a spot vertex and tc (u) = tg (x) + 1. Furthermore, m tg (x) = m + (u, x), m tg (x)+1 = m − (u, y) and there is no free searcher at tc (u). All the vertices in X \{u} are still stain vertices at tc (u). Since m tg (x) and m tg (x)+1 clear edges in X , all the guarded vertices not in X are still stain vertices at tc (u). Thus, Stc (u) is a deadlock state, which is a contradiction. Therefore, there is a free searcher at tg (x). In the case that u is a spot vertex at tg (x), m tg (x)+1 = m − (u, y). At tc (u) (i.e., tg (x) + 1), there is a free searcher and all the vertices in X \{u} are guarded. Since S satisfies Lemma 2.4, X is cleared continuously after tg (x). In the case that u is not a spot vertex at tg (x), since S satisfies Lemma 2.4, G[X \{y}] is cleared continuously after tg (x) by using a free searcher. Let t be the first time step that X \{y} is cleared, i.e., all the edges in G[X \{y}] are cleared. At every time step between tg (x) and t, there is a free searcher. If X is an i-p-clique, i ≥ 2, then there is at least one peripheral vertex w

418

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

in X \{y}. Since all the neighbors of w are in X , w becomes a spot vertex and is then cleared during the time steps between tg (x) and t. It implies that u is cleared at some time step between tg (x) and t. Similar to the case that u is a spot vertex at tg (x), X is cleared continuously after tg (x) and there is a free searcher at every time step between tg (x) and the first time step that X is cleared. We now consider k-starlike graphs without 2-p-clique of size 3. The case of k-starlike graphs containing 2-p-cliques of size 3 is discussed in the paragraph before Theorem 5.7. Recall that Q i is the set of all i-p-cliques, for 1 ≤ i ≤ k; for a sequence of k central vertices, f 1 , . . . , f k , Fl = { f 1 , f 2 , . . . , fl } and Q li = {X ∈ Q i |X ∩ Fl 6= ∅}. In Section 4 we proved that there exists an optimal node-search strategy of G with f j being the jth cleared central vertex such that if ns(G) = |X 0 | + s, 0 ≤ s ≤ k − 1, then all the cliques j in Q j+s , 1 ≤ j ≤ k − s, are cleared before f 1 is cleared. LEMMA 5.3. Let G be a k-starlike graph with the central clique X 0 and es(G) = |X 0 | + s, 0 ≤ s ≤ k − 1. Then there exists an optimal edge-search strategy for G with f j being the jth cleared vertex in X 0 such that all the cliques X in Q 1s+1 ∪ Q 2s+2 ∪· · ·∪ Q k−s k with |X | ≥ 4 are cleared before the first time step that f 1 is cleared. Furthermore, if X is an i-p-clique, i ≥ 2, then there is a free searcher at tc (u) where u is the first cleared vertex of X . PROOF. Let S be an optimal edge-search strategy for G satisfying Lemma 2.4 with f j being the jth cleared vertex in X 0 . Let Fj = { f 1 , f 2 , . . . , f j } and let t j be the first time j step that f j is cleared in S. We first prove that all the ( j + s)-p-cliques X ∈ Q j+s except 1 1 one in Q s+1 are cleared before t1 in S. In the case of s = 0, every X ∈ Q 1 , |X | ≥ 4, is cleared before t1 as shown in the proof of Lemma 3.4. Thus, it remains to consider j j X ∈ Q j , j ≥ 2, if s = 0; and X ∈ Q j+s , 1 ≤ j ≤ k − s, if s > 0. That is, in the following, j + s ≥ 2. Let X be a ( j + s)-p-clique X with X ∩ Fj 6= ∅ which is cleared after t1 . Let u be the first cleared vertex in X , and let y and x be the last and the next to last guarded vertices in X , respectively. We show that tg (x) < t1 by contradiction. There are two cases: Case 1: tg (x) > t1 . Since all the vertices in X 0 \{ f 1 } are guarded at t1 , x is a peripheral vertex. Thus, m tg (x) must be m + (v, x) for some v ∈ X . Since S satisfies Lemma 2.4, there is no spot vertex at tg (x) − 1. Thus, every spot vertex is in X at tg (x). By Lemma 5.2, there is a free searcher at tg (x). Since at least |X 0 | − j + 1 central vertices and s + j − 1 peripheral vertices are guarded at tg (x), |X 0 | + s + 1 searchers are used, which is a contradiction. Case 2: tg (x) = t1 . In this case, m tg (x) = m − ( f 1 , x) and f 1 6∈ X since no vertex in X is cleared at tg (x). Thus, at least |X 0 | + s + j − 2 vertices are guarded at t1 . Since only |X 0 | + s searchers are used, we have i ≤ 2. Since f 1 is not in X , j = 2 and f 2 is in X . Thus, there is no free searcher at t1 . Together with the fact that all the vertices in X are not spot vertices (for all w ∈ X \{x, y}, (w, x) and (w, y) are contaminated at t1 ), St1 is a deadlock state or f 2 is not the second cleared central vertex. That is a contradiction. Hence, tg (x) < t1 .

Graph Searching on Some Subclasses of Chordal Graphs

419

Next, we show that X ∈ Q 1s+1 . At tg (x), no vertex in X is cleared. Since tg (x) < t1 , no central vertex is cleared at tg (x). Let m tg (x) be m + (v, x) for some v ∈ X ∪ X 0 . Since S satisfies Lemma 2.4, there is no spot vertex and no contaminated edge with its two endpoints guarded at tg (x) − 1. First, we claim that there is no spot vertex outside X at tg (x). At tg (x), v is the only vertex that can be a spot vertex. Suppose contrarily that v is not in X and v is a spot vertex at tg (x). In this case, since v is a central vertex, v must be f 1 and t1 = tg (x) + 1. Thus, at t1 , at least |X 0 | − 1 central vertices and at least s + j − 1 peripheral vertices in X are guarded. Since |X 0 | + s searchers are used in S, we obtain / X , j must be 2 and f 2 ∈ X . Hence, there is no free searcher at t1 . For j ≤ 2. Since f 1 ∈ every vertex z in X \{x, y}, (z, x) and (z, y) are contaminated and x and y are not spot vertices at t1 . Since f 2 ∈ X , St1 is a deadlock state or f 2 is not the second cleared central vertex. This derives a contradiction. Therefore, if v becomes a spot vertex at tg (x), then v ∈ X. Since there is no spot vertex outside X , by Lemma 5.2, there is a free searcher at tg (x). Furthermore, since j +s ≥ 2, by using the free searcher, X is cleared continuously after tg (x). Since there is a free searcher at tg (x), at least j central vertices which are unguarded at tg (x). If f 1 ∈ / X , then there are at least two contaminated edges incident to f 1 with the other endpoints unguarded at tg (x) which are not in X . These contaminated edges are not cleared before X is cleared. In other words, f 1 is cleared after X is cleared which contradicts that X is cleared after t1 . Hence, f 1 ∈ X which implies X ∈ Q 1s+1 . Now we show that X is the only one peripheral clique which is cleared after t1 . At tg (x), there is at least one free searcher and |X | − 1 searchers on X . By counting the number of searchers used, we obtain that there exists at least one unguarded central vertex v not in X at tg (x). Since X is cleared after t1 , there is at most one contaminated edge not in X which is incident to f 1 at tg (x). The edge ( f 1 , v) is the contaminated edge not in X . Thus all the peripheral cliques containing f 1 except X are cleared at tg (x). Note that v is the only one unguarded vertex not in X at tg (x). Then we modify S to obtain a desired optimal edge-search strategy by making X be cleared before t1 . At tg (x), since y is a contaminated vertex and if f 1 6= y then ( f 1 , y) and ( f 1 , v) are contaminated edges, it follows that f 1 is not a spot vertex. In S, X is cleared continuously after tg (x) with the help of a free searcher. It is not hard to see that we may change the edge clearing order such that the last cleared edge in X is incident to f 1 . Then the edge ( f 1 , v) is cleared after X is cleared. In other words, X is then cleared before t1 . Finally, we obtain an optimal edge-search strategy in which all cliques are cleared before t1 . in Q 1s+1 ∪ Q 2s+2 ∪ · · · ∪ Q k−s k Note that for each i-p-clique X in Q 1s+1 ∪ Q 2s+2 ∪ · · · ∪ Q k−s k , i ≥ 2, all the guarded vertices not in X are stain vertices at tg (x). By Lemma 5.2, there is a free searcher at tc (u). Let I = {w ∈ X \X 0 |X ∈ Q 1 } and Pik−s = {x ∈ X ∩ X 0 |X ∈ Q is+i ∪ Q i+1 s+i+1 ∪ · · · ∪ k−s Q k }. THEOREM 5.4. Let G be a k-starlike graph with the central clique X 0 and k ≥ 2. Then es(G) = |X 0 | if and only if there exist central vertices f 1 , f 2 , . . . , f k , x and y satisfying

420

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

the following conditions: (1) |X 0 \Pik | ≥ i, for all i, 2 ≤ i ≤ k, and (2) ( f 1 , f 2 , x, y) is feasible. PROOF. Suppose that es(G) = |X 0 |. Let S be an optimal edge-search strategy of G satisfying Lemmas 2.4 and 3.2. In S, let fl be the lth cleared central vertex and let y and x be the last and the next to last guarded central vertices, respectively. We first prove Condition (1) holds. By Lemma 5.3, all the cliques in Q 22 ∪ Q 33 ∪ · · · ∪ Q kk are cleared before t1 , the first time step that f 1 is cleared. Let t X denote the time step that the first vertex in peripheral clique X is cleared. For each i ≥ 2, we consider the clique k X ∈ Q ii ∪ Q i+1 i+1 ∪ · · · ∪ Q k whose t X is the maximum. Let X be a j-p-clique, i ≤ j ≤ k. Let u be the first cleared vertex in X . The vertex u is a peripheral vertex since X is cleared before t1 . At t X , all the vertices in (X \{u}) ∪ Pik are guarded, and there is a free searcher by Lemma 5.3. Let L be the set of all the guarded vertices in X 0 at t X . Then |X 0 | ≥ |L| + |X \X 0 | ≥ |Pik | + i. Hence, |X 0 \Pik | ≥ i. Next, we prove Condition (2) holds. As noted in the proof of Lemma 3.2, y 6= f 1 . Since |X 0 \Pik | ≥ i for all i, 2 ≤ i ≤ k, we have {x, y} ⊆ X 0 \P2k . Similar to the proofs of Lemmas 3.4–3.8, the following hold: 1. 2. 3. 4. 5.

All the vertices in N I>2 ( f 1 ) are cleared before t1 . At most one vertex in N I=2 (y) is cleared before t1 . No vertex in N I>2 (y) is cleared before t1 . At most one vertex in N I>2 (x) is cleared before t1 . At most one vertex in N I>2 ( f 2 ) is cleared after t1 .

Similar to the proof of Theorem 3.9, we conclude that ( f 1 , f 2 , x, y) is feasible. Conversely, if the two conditions hold, we give the following edge-search strategy to clear G. 1. Clear all the i-p-cliques in Q ii from i = k down to 2. Upon starting to clear the i-p-cliques in Q ii , we first guard the central vertices in Pik . Hence we have at least i free searchers. With these i free searchers, every i-p-clique in Q ii can be cleared using Lemma 2.8. 2. Clear all 1-p-cliques by the same strategy described in Theorem 3.9. Note that f 1 and f 2 are cleared after this step. 3. Clear all the i-p-cliques in Q i \Q ii from i = 2 to k. Upon starting to clear the i-pcliques in Q i \Q ii , the vertices f 1 , f 2 , . . . , f i are cleared since all the h-p-cliques, h < i, and all the j-p-cliques, j ≥ i, that have intersection with { f 1 , f 2 , . . . , f i } are cleared. That is, we have i free searchers to clear every i-p-clique in Q i \Q ii using Lemma 2.8. After all the i-p-cliques in Q i are cleared, f i+1 is cleared. We then have i + 1 free searchers to clear continuously all the (i + 1)-p-clique in Q i+1 \Q ii+1 . The above strategy uses exactly |X 0 | searchers. THEOREM 5.5. Let G be a k-starlike graph, k ≥ 2, with the central clique X 0 and es(G) ≥ |X 0 | + 1. Then es(G) = |X 0 | + 1 if and only if there exist central vertices

Graph Searching on Some Subclasses of Chordal Graphs

421

f 1 , f 2 , . . . , f k−1 and v satisfying the following conditions: (1) |X 0 \Pik−1 | ≥ i, for all i, 1 ≤ i ≤ k − 1, and (2) |N I>2 ( f 1 ) ∩ N I>2 (v)| ≤ 2. PROOF. Suppose that es(G) = |X 0 | + 1. Consider an optimal edge-search strategy S of G satisfying Lemmas 2.4 and 5.3. In S, let f i be the ith cleared central vertex. Let Fi = { f 1 , . . . , f i } and let v be the last guarded central vertex. By Lemma 5.3, the are cleared before t1 , the first time step peripheral cliques in Q 12 ∪ Q 23 ∪ · · · ∪ Q k−1 k that f 1 is cleared. By an argument similar to the one used in the proof of Theorem 5.4, |X 0 \Pik−1 | ≥ i, for i = 1, . . . , k − 1. In particular, X 0 \P1k−1 ⊇ {v}. By an argument similar to the one used in the proof of Theorem 3.10, |N I>2 ( f 1 ) ∩ N I>2 (v)| ≤ 2. Conversely, if Conditions (1) and (2) hold, we have an edge-search strategy to clear G. This strategy is similar to the one described in the proof of Theorem 5.4. The main difference is that clearing the 1-p-cliques uses the strategy described in the proof of Theorem 3.10. This strategy uses exactly |X 0 | + 1 searchers. THEOREM 5.6. Let G be a k-starlike graph, k ≥ 3, with the central clique X 0 . Let s be an integer with 2 ≤ s ≤ k − 1. Assume that es(G) ≥ |X 0 | + s. Then es(G) = |X 0 | + s if and only if ∃ f 1 , . . . , f k−s ∈ X 0 such that |X 0 \Pik−s | ≥ i, for all i, 1 ≤ i ≤ k − s. PROOF. Suppose that es(G) = |X 0 | + s. The condition can be proved by an argument similar to the one used in the proof of Theorem 5.4. Conversely, if the conditions hold, we have an optimal strategy similar to the one in the proof of Theorem 5.4 to clear G. Since s ≥ 2, the 1-p-cliques can be cleared one by one in an arbitrary order. Finally, our algorithm to determine es(G) and to find an optimal edge-search strategy of a k-starlike graph G naturally follows from Lemmas 2.10, 2.12–2.14 and Theorems 5.4–5.6. The running time of our algorithm is O(m + n) when |X 0 | = 2 or 3 (Lemmas 2.10, 2.12–2.14). Hence, the time complexity of our algorithm depends on that of checking the conditions of Theorems 5.4–5.6 for each sequence f 1 , f 2 , . . . , f k . By using techniques similar to the one for the implementation of Lemma 4.2, Pik can be found in O(m + n) time. Condition (2) of Theorem 5.4 and Condition (2) of Theorem 5.5 can also be checked by techniques similar to the ones for checking the conditions of Theorems 3.9 and 3.10, respectively. Since there are O(n k ) candidate sequences, the total time used is O(mn k ). Our algorithm uses O(m) space. Now we consider the case when G has 2-p-cliques of size 3. First, we consider the subgraph H of G induced by the central vertices and the peripheral vertices not in 2-p-cliques of size 3. Let S be an optimal edge-search strategy of H as given in the proofs of Theorems 5.4–5.6. For each central vertex x, there is a time step tx in S at which x is guarded and there is a free searcher at that time. For each 2-p-clique X of size 3, which is adjacent to one central vertex x, we can insert clearing moves to clear the 2-p-clique X by the remaining free searcher at tx . The resulting edge-search

422

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

strategy clears G using the same number of searchers as S. Hence, we have the following theorem. THEOREM 5.7. For any k-starlike graph G, k ≥ 2, both es(G) and an optimal edgesearch strategy of G can be computed in O(mn k )-time and O(m)-space. Combining the results of Theorems 5.4–5.6, we have the following corollary. COROLLARY 5.8. Let G be a k-starlike graph without 1-p-cliques, and 2-p-cliques of size 3. Then es(G) = ns(G). A k-starlike graph is called a pure k-starlike graph if all of its peripheral cliques are k-p-cliques. By Corollary 5.8, we have the following lemma. LEMMA 5.9.

Let G be a pure k-starlike graph with k ≥ 3. Then es(G) = ns(G).

Gustedt [12] proved that the pathwidth problem, which is equivalent to the nodesearching problem [23], is NP-complete on chordal graphs by reducing the vertex separator problem on a graph with n vertices and m edges to the pathwidth problem on a pure n-starlike graph with mn + n vertices and (n(n + 1)(m + 1))/2 + 2nm edges. By Lemma 5.9, the node-searching problem is equivalent to the edgesearching problem on pure k-starlike graphs for k ≥ 3. Hence we have the following theorem. THEOREM 5.10.

The edge-searching problem on chordal graphs is NP-complete.

6. Edge Searching on Interval Graphs. In this section we discuss the edge-searching problem on interval graphs. Recall that the maximal cliques of an interval graph G can be linearly ordered in which, for every vertex v of G, the maximal cliques containing v occur consecutively [10]. These linearly ordered maximal cliques C1 , C2 , . . . , Cr of G can be found in O(m + n) time [7]. In the following we assume that the linearly ordered maximal cliques C1 , C2 , . . . , Cr of G are given, and G is denoted as (C1 , C2 , . . . , Cr ). For any interval graph G, ns(G) equals its maximum clique size [15]. By Lemmas 2.7 and 2.9, we have the following lemma. LEMMA 6.1. If G = (V, E) is an interval graph with the maximum clique size ω ≥ 4, then es(G) = ω or ω + 1. We now give an algorithm to find an optimal edge-search strategy when ω ≥ 4. The case of ω < 4 is treated after Theorem 6.2. Let C1 , C2 , . . . , Cr be the linearly ordered maximal cliques of G. For convenience, we add two empty dummy cliques C0 and Cr +1 to G. Our algorithm clears Ci from i = 1 to r . We say that Ci is cleared if all the edges

Graph Searching on Some Subclasses of Chordal Graphs

423

in Ci are cleared. The details of our algorithm follow: Algorithm ESI (G = (C0 , C1 , . . . , Cr , Cr +1 )) For i = 1 to r do the following: Let U = (Ci−1 ∩ Ci )\Ci+1 . There are three cases. Case 1: U 6= ∅. Let u ∈ U and w ∈ Ci \Ci−1 . For each vertex v ∈ Ci \Ci−1 and v 6= w, we apply m + (u, v) to clear the edge (u, v). After this, we apply m − (u, w) and then u is cleared. Now all the vertices in Ci \{u} are guarded. By using a free searcher, we can clear all the other contaminated edges in Ci . Case 2: U = ∅ and |Ci \Ci−1 | ≥ 2. Since U = ∅, (Ci \Ci−1 )\Ci+1 6= ∅. Let u ∈ (Ci \Ci−1 )\Ci+1 and w ∈ Ci \Ci−1 such that w 6= u. For each vertex v ∈ Ci \{u, w}, we apply m + (u, v) to clear the edge (u, v). After this, we apply m − (u, w) and then u is cleared. Now all the vertices in Ci \{u} are guarded. By using a free searcher, we can clear all the other contaminated edges in Ci . Case 3: U = ∅ and |Ci \Ci−1 | = 1. Let {u} = (Ci \Ci−1 )\Ci+1 . We place a searcher on u. Then all the vertices in Ci are guarded. By using a free searcher, we can clear all the contaminated edges in Ci . End ESI. Algorithm ESI uses |Ci | searchers for Cases 1 and 2, and |Ci |+1 searchers for Case 3. In Algorithm ESI the vertices in Ci \Ci+1 are cleared after Ci is cleared, since all their incident edges are in the induced subgraph G[C1 ∪ · · · ∪ Ci ] by the consecutive property of interval graphs. At this iteration, only the vertices in Ci ∩ Ci+1 are guarded. We then proceed to clear Ci+1 . We continue to do so until Cr is cleared. If every maximum clique is cleared using the rules of Cases 1 and 2, then the algorithm uses ω searchers. By Lemma 6.1, es(G) = ω. On the other hand, if there exists a maximum clique Ci which is cleared using the rules of Case 3, then the above algorithm uses ω + 1 searchers. We now prove that in this case, es(G) = ω + 1. Since Ci , |Ci | = ω, is cleared in Case 3, |Ci \Ci−1 | = 1. This implies |Ci ∩ Ci−1 | = ω − 1 and (Ci−1 ∩ Ci )\Ci+1 = ∅. Thus (Ci−1 ∩ Ci ) ⊆ Ci+1 and |Ci−1 ∩ Ci ∩ Ci+1 | = ω − 1. Let ci−1 ∈ Ci−1 \Ci and ci+1 ∈ Ci+1 \Ci . The subgraph induced by {ci−1 } ∪ Ci ∪ {ci+1 } is a split graph. Let this split graph be H = (C ∪ I, E 0 ), where C = Ci and I = {ci−1 , ci+1 }. The size of the central clique of H is ω ≥ 4. H does not satisfy the conditions of Theorem 3.9. By Lemma 2.6, es(G) ≥ es(H ) = ω + 1. Hence, Algorithm ESI provides an optimal edgesearch strategy for any interval graph with ω ≥ 4. Notice that |Ci−1 ∩Ci ∩Ci+1 | = ω − 1 if and only if |Ci | = ω, |Ci \Ci−1 | = 1, and (Ci−1 ∩Ci )\Ci+1 = ∅. We have the following theorem. THEOREM 6.2. Let G = (C1 , C2 , . . . , Cr ) be an interval graph with the maximum clique size ω ≥ 4. If there exists an i, 1 ≤ i ≤ r −2, such that |Ci ∩Ci+1 ∩Ci+2 | = ω−1, then es(G) = ω + 1; otherwise es(G) = ω.

424

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

The key point in implementing Algorithm ESI is to determine efficiently the first cleared vertex u in Ci for each i, 1 ≤ i ≤ r . For every vertex v ∈ V , we associate two variables start and end such that start(v) (respectively, end(v)) denotes the index of the first (respectively, the last) clique which contains v. We maintain the set of uncleared vertices, W , in an order according to the end values in nondecreasing order. Vertices with the same end values are ordered according to their start values. Vertices with the same start and end values are ordered arbitrarily. Now, consider the time that Ci−1 is cleared and the algorithm is proceeding to clear Ci for any 1 ≤ i ≤ r . For a vertex v, if end(v) < i, then v 6∈ W at the time when Ci−1 is cleared. Let w be the first guarded vertex in W . Since Ci 6⊆ Ci+1 , w ∈ Ci \Ci+1 , i.e., end(w) = i. For all v ∈ Ci \Ci+1 , since end(v) = i and start(v) ≥ start(w), v ∈ / Ci−1 if w ∈ / Ci−1 . In other words, if w is not guarded, then v is not guarded for all v ∈ Ci \Ci+1 . Hence, w is guarded if and only if (Ci ∩ Ci−1 )\Ci+1 6= ∅. Thus, w can be chosen as the vertex u in all the three cases. Once u is determined, we can clear the contaminated edges in Ci according to the cases discussed above and then delete the cleared vertices in Ci (i.e., every vertex v with end(v) = i) from W . It takes O(n) time to maintain W and O(m) time to clear the edges in G. Hence, the time complexity of Algorithm ESI is O(m + n). The above discussion uses the fact that ω ≥ 4. In the case of ω = 2, es(G) = 1 if G is a path; otherwise, es(G) = 2. For the case of ω = 3, Algorithm ESI can be applied to obtain a strategy using three searchers. Only Case 3 in Algorithm ESI needs to be discussed since it may use ω + 1 searchers. Suppose a maximum clique Ci is cleared in Case 3. The only vertex u ∈ Ci \Ci−1 is of degree 2. Let the other two vertices in Ci be v and w. Vertices v and w are guarded and (v, w) is cleared at this time step. To clear Ci , we simply apply m + (v, u) and then m − (u, w). Thus, es(G) ≤ 3 for any interval graph G with the maximum clique size 3. If there exists an i such that |Ci ∩ Ci+1 | = 2, then the subgraph induced by Ci ∪ Ci+1 is a split graph H = (C ∪ I, E), where C = Ci and I = Ci+1 \Ci . By Lemma 2.12, es(H ) = 3 and then es(G) = 3. On the other hand, if for all i, 1 ≤ i < r , |Ci ∩Ci+1 | = 1, then it is easy to verify that G can be cleared using two searchers. Thus, for an interval graph G of ω = 3, es(G) = 2 if and only if for all i, 1 ≤ i < r , |Ci ∩ Ci+1 | = 1. THEOREM 6.3. For any interval graph G, both es(G) and an optimal edge-search strategy of G can be determined in linear time.

7. Conclusions. In this paper we present a uniform approach to solve the graphsearching problem on split graphs and k-starlike graphs. That is, through discussing the intersection relation of the peripheral cliques with the first several cleared vertices of the central clique in an optimal search strategy, we derive the necessary and sufficient conditions for a k-starlike graph to have a certain search number. Since our algorithms for computing es(G) and ns(G) are constructive, the algorithms can be modified to construct the corresponding search strategies in the same time bound. It would be interesting to know whether graph search numbers can be determined in polynomial time on other special classes of graphs.

Graph Searching on Some Subclasses of Chordal Graphs

425

References [1] [2]

[3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]

[19] [20] [21] [22] [23] [24] [25] [26] [27]

S. Arnborg, D.G. Corneil, and A. Proskurowski, Complexity of finding embeddings in a k-tree, SIAM J. Algebraic Discrete Methods, 8 (1987), 277–284. D. Bienstock, Graph searching, path-width, tree-width and related problems (a survey), in: F. Roberts, F. Hwang, and C. Monma, eds., Reliability of Computer and Communication Networks, pp. 33–49, DIMACS Series in Discrete Mathematics and Theoretical Computer Science, Vol. 5, American Mathematical Society, Providence, RI, 1991. D. Bienstock and P. Seymour, Monotonicity in graph searching, J. Algorithms, 12 (1991), 239–245. H. L. Bodlaender and T. Kloks, Efficient and constructive algorithms for the pathwidth and treewidth of graphs, J. Algorithms, 21 (1996), 358–402. H.L. Bodlaender, T. Kloks, and D. Kratsch, Treewidth and pathwidth of permutation graphs, SIAM J. Discrete Math., 8 (1995), 606–616. H.L. Bodlaender and R.H. Moehring, The pathwidth and treewidth of cographs, SIAM J. Discrete Math., 6 (1993), 181–188. K.S. Booth and G.S. Leuker, Testing for consecutive ones property, interval graphs and graph planarity using PQ-tree algorithms, J. Comput. System Sci., 13 (1976), 335–379. J.A. Ellis, I.H. Sudborough, and J.S. Turner, The vertex separation and search number of a graph, Inform. and Comput., 113 (1994), 50–79. F. Gavril, The intersection graphs of subtrees in trees are exactly the chordal graphs, J. Combin. Theory Ser. B, 16 (1974), 47–56. P.C. Gilmore and A.J. Hoffman, A characterization of comparability graphs and of interval graphs, Canad. J. Math., 16 (1964), 539–548. M.C. Golumbic, Algorithmic Graph Theory and Perfect Graphs, Academic Press, New York, 1980. J. Gustedt, On the pathwidth of chordal graphs, Discrete Appl. Math., 45 (1993), 233–248. P.L. Hammer and B. Simeone, The splittance of a graph, Combinatorica, 1 (1981), 275–284. N.G. Kinnersley, The vertex separation number of a graph equals its path-width, Inform. Process. Lett., 42 (1992), 345–350. L.M. Kirousis and C.H. Papadimitriou, Interval graph and searching, Discrete Math., 55 (1985), 181– 184. L.M. Kirousis and C.H. Papadimitriou, Searching and pebbling, Theoret. Comput. Sci., 47 (1986), 205–218. T. Kloks, Treewidth, Computations and Approximations, Lecture Note in Computer Science, Vol. 842, Springer-Verlag, Berlin, 1994. T. Kloks, H. Bodlaender, H. Muller, and D. Kratsch, Computing treewidth and minimum fill-in: all you need are the minimal separators, Proc. ESA ’93, pp. 260–271, Lecture Note in Computer Science, Vol. 726, 1993. Erratum: Proc. ESA ’94, p. 508, Lecture Note in Computer Science, Vol. 855, 1994. A. Kornai and Z. Tuza, Narrowness, pathwidth, and their application in natural language processing, Discrete Appl. Math., 36 (1992), 87–92. A.S. LaPaugh, Recontamination does not help to search a graph, J. Assoc. Comput. Mach., 40 (1993), 224–245. F. Makedon and I.H. Sudborough, On minimizing width in linear layouts, Discrete Appl. Math., 23 (1989), 243–265. N. Megiddo, S.L. Hakimi, M.R. Garey, D.S. Johnson, and C.H. Papadimitriou, The complexity of searching a graph, J. Assoc. Comput. Mach., 35 (1988), 18-44. R.H. Moehring, Graph problems related to gate matrix layout and PLA folding, in: G. Tinnhofer et al., eds., Computational Graph Theory, pp. 17–32, Springer, Wien, 1990. B. Monien and I.H. Sudborough, Min cut is NP-complete for edge weighted trees, Theoret. Comput. Sci., 58 (1988), 209–229. T.D. Parsons, Pursuit-evasion in a graph, in Y. Alavi and D.R. Lick, eds., Theory and Applications of Graphs, pp. 426–441. Springer-Verlag, New York, 1976. T.D. Parsons, The search number of a connected graph, Proc. 9th S-E Conf. on Combinatorics, Graph Theory, and Computing, pp. 549–554, 1978. S.L. Peng, C.W. Ho, T.-s. Hsu, M.T. Ko, and C.Y. Tang, Edge and node searching problems on trees,

426

S.-L. Peng, M.-T. Ko, C.-W. Ho, T.-s. Hsu, and C. Y. Tang

to appear in Theoret. Comput. Sci., an extended abstract of this paper appears in Proc. COCOON ’97, pp. 284–293, Lecture Note in Computer Science, Vol. 1276, Springer-Verlag, Berlin, 1997. [28] S.L. Peng, C.W. Ho, T.-s. Hsu, M.T. Ko, and C.Y. Tang, A linear-time algorithm for constructing an optimal node-search strategy of a tree, Proc. COCOON ’98, pp. 279–288, Lecture Note in Computer Science, Vol. 1449, Springer-Verlag, Berlin, 1998. [29] N. Robertson and P.D. Seymour, Graph minors, I. Excluding a forest, J. Combin. Theory Ser. B, 35 (1983), 39–61. [30] P. Scheffler, A linear algorithm for the pathwidth of trees, in: R. Bodendiek and R. Henn, eds., Topics in Combinatorics and Graph Theory, pp. 613–620, Physica-Verlag, Heidelberg, 1990.