1 Graph Searching and Search Time Franz J. Brandenburg and Stefanie Herrmann University of Passau
2 Survey graph searching: the game cost measures: time and space (searchers) monotone strategies graph representations speed-ups
3 The Game introduction by Parsons (1976) in speleology „How do you systematically explore a cave“. given: –an undirected graph G (a network, a system of tunnels or roads) –a gas contaminating the edges or an invisible fugitive who tries to escape –a team of searchers goal clear the graph by a systematic sweep and clean all edges or catch the fugitive by a systematic search of G versions node search: clear an edge by searchers on either side edge seach: clear an edge by a sweep
4 Rules all actions at discrete time steps, T = 0,1,...,t the searchers visit and guard nodes clear an edge node searching: by searchers at both ends for at least one time unit edge searching: a searcher sweeps the edge from either side recontaminate a cleared edge if there is an „open“ path from a contaminated to a cleared edge guarded paths a path with at least one guarded node the gas expands the fugitive tries to escape the searchers with unlimited speed
5 Example Ústì Lab Praha Plzen Karlovy vary Ceske Bud. Liberec Hradec Králove Brno Olomuc Ostrava
6 Example
7
8 Recontamination
9 Search Strategy a search strategy is a computation on the graph G = (V,E) describing the compete search on G s = ((C 0, B 0 ), (C 1, B 1 ),..., (C t, B t )) C i = set of cleared edges, C i E B i = set of guarded vertices, B i V step i: remove searchers from R i B i and simultaneously place searchers at new nodes P i V–B i update: B i+1 = B i – R i P i C i+1 = C i {(u,v) | u,v B i+1 } new cleared edge – {(u,v) C i | (u,v) is recontaminated} recontamination: there is an unguarded path to a cleared edge
10 Cost Measures a search strategy s = ((C 0, B 0 ), (C 1, B 1 ),..., (C t, B t )) width(s) = max { | B i | | 0≤i≤t} the maximal number of searchers, “space” search number(G) = min width(s) NEW length(s) = t-1 (discard the last step) the number of steps, “time” NEW: parameterized measures a connected, undirected graph G = (V,E) search-width(t) = min {width(s) | such that length(s) ≤ t} ∞ given: time t, minimize the number of searchers in time t search-time(k) = min {length(s) | such that width(s) ≤ k} ∞ given: k searchers, minimize the number of steps for k searchers
11 Monotone Strategies used terms: monotone, progressive, recontamination free a search strategy s = ((C 0, B 0 ), (C 1, B 1 ),..., (C t, B t )) is monotone, if Ø = C 0 ... C i C i+1 ... C t =E i.e. a monotone sequence of cleared edges consequence: the guards at B i prohibit any contamination. They do not leave a gap (to escape). B i separates “old”, clear edges from ”new”, contaminated edges search-time(G) ≤ n-1 search-time(G) =n-1 e.g. for a path and two “node”-searchers
12 Monotonicity THEOREM 1: for every connected graph G and integers k, t ≥ 1 search strategy s monotone search strategy s’ with search-width(t) ≤ k and search-time(k) ≤ t (same bounds) generalization (only for search number) Bienstock&Seymour DIMACS Series (1991) Fomin Discrete Appl. Math. (2004) Fomin&GolovachSIAM J. Disc. Appl. Math. (2005) Idea: (a nonconstructive proof) among all “good” search strategies with search-width(t) ≤ k and search-time(k) ≤ t let s’ be the “lightest” with ∑ i |B i | —> MIN This search strategy s’ must be monotone.
13 Monotonicity Corollary graph searching is in NP (first A. LaPaugh 1986; JACM 1993) i.e. do k searchers suffice, search number Corollary search-time(∞) ≤ n-1 for |G|=n i.e. visit and guard at least one new node per step
14 Min-Max Bounds THEOREM 2 let |G|=n, G connected integers k, t with k ≥ search number(G). There is a (monotone) search strategy s such that and Corollary speed-up for k searchers: at most a factor of (k-1)
15 Complexity PROPOSITION Search number (the least number of searchers), no time bounds is NP-complete for chordal graphs for star like graphs for bipartite and co-bipartite graphs for planar graphs of degree ≤ 3 is polynomially solvable for cographs for permutation graphs for graphs of bounded treewidth
16 Complexity: Searching THEOREM for connected graphs and integers t, k search-time(k) ≤ t is NP-complete i.e. given k searchers can they search G in time ≤ t? search-width(t) ≤ k is NP-complete i.e. given t+1 steps can G then be searched with only k searchers? Proof: reduction from 3-PARTITION an instance with m items of total size mB every item of size a is transformed into an a-clique and there is a center node 3-Partition iff B+1 searchers can search G in time m.
17 Graph Representations THEOREM The following are equivalent both for time = length and searchers = width –graph searching –pathwidth –interval thickness –vertex separation Consequence a constructive strategy for monotone graph searching Compute an optimal search (NP-hard).
18 Pathwidth path decomposition of G = (V, E) sequence of subsets of V, (X 1,..., X t ) X i = V every edge is contained in a bag X i for every node v: v X i and v X j implies v X k for i ≤k≤j width = max { |X i | -1}, the size of the bags length = t
19 Pathwidth P C K P K U U P C L P UL L P C L H H O B P C H B H O B
20 Interval Thickness interval representation of G = (V, E) every node of G is an interval v.left, v.right for every edge (u,v) the intervals must overlap G is a subgraph of the interval graph (edge iff intervals overlap) width = max {overlapping intervals at some point x} length = max{v.right} – min{v.left}
21 Interval Thickness P C K UL H O B K PZ U P C L H B O O O
22 Vertex Separation linear layout of G = (V, E) number the nodes by 1,2,...,n for every position p, 1 ≤ p <n left(p) = {u ≤ p | there is an edge (u,v) with v > p} vertex separation number = max { | left(p)|} 01243
23 2-D Layouts 2-D layout map the positions into 2D p (x,y) preserve the ordering p x < x’ or x=x and y<y’ width = max y-coordinate length = max x-coordinate
24 2-D Layouts P C K UL H O B P C K U L H OB O PZ
25 Equivalence THEOREM for connected graphs the following are equivalent: 1.search-width(t) = k and search-time(k) = t 2.pathwidth(t) = k-1 and path-length(k) = t 3.interval thickness(t) = kand interval length(k) = t 4.2D-width(t) = k-1and 2D-length(k) = t. Proof. Known constructions for width can be generalized to both parameters width + length. Corollary NP-completeness for pathwidth-length; interval thickness-length, 2Dwidth-length
26 Speed-Up Problem: if k searchers can search a graph G in time t – how fast can k+1 searchers do? – how many extra searchers are necessary for time t/2.
27 Speed-Up THEOREM there are classes G i and H i with search-number = k i such that there is maximal speed up for G i there is poor speed up for H i G i is searched by k i searchers in time |G i |+1-k i and k i +p searches search G i in time 1+ t/p 1 extra seacher saves 50% in time on n (k i -1) grids H i is searched by k i searchers in time t and (2k i -1) searchers cannot do better e.g. (k-1) extra searchers do not help on (k i -1)-paths (paths of (k i -1) cliques)
28 Open Characterize the class of graphs with search number k and in every step we need k searchers. I.e. search-width(t)=k is strict. … under work by C. König Example: (k-1) n grids Study new normal form for path decompositions. Minimize the length at a given width. Problem the fixed parameter complexity of search-time(k)
29 Thank You!
30 Pathwidth
31 Pathwidth
32 Interval Thickness interval representation of G = (V, E) every node of G is an interval v.left, v.right for every edge (u,v) the intervals must overlap G is a subgraph of the interval graph (edge iff intervals overlap) width = max {overlapping intervals at some point x} length = max{v.right} – min{v.left}
33 Interval Thickness
34 Vertex Separation linear layout of G = (V, E) number the nodes by 1,2,...,n for every position p, 1 ≤ p <n left(p) = {u ≤ p | there is an edge (u,v) with v > p} vertex separation number = max { |left(p)|} 12345
35 2-D Layouts 2-D layout map the positions into 2D p (x,y) preserve the ordering p x < x’ or x=x and y<y’ width = max y-coordinate length = max x-coordinate