700 likes | 956 Views
Graph Searching and Related Problems. 中央研究院 資訊科學研究所 高明達. Graph Searching Problems. Input: A graph is looked as a system of contaminated tunnels. Goal: To find a strategy using the least number of searchers to clear the entire graph. Graph Searching Problems. Operations
E N D
Graph Searching and Related Problems 中央研究院 資訊科學研究所 高明達 中山大學資訊工程研究所
Graph Searching Problems Input: A graph is looked as a system of contaminated tunnels. Goal: To find a strategy using the least number of searchers to clear the entire graph.
Graph Searching Problems • Operations • Place Remove Move • Clearing rules • movealong an edge • guardthe two endpoints of an edge • Recontamination • a cleared edge connects a contaminated edge bya path with no searcher • Versions: • Operations Rule • Edge place move • remove • move • Node place guard • remove • Mixed place both • remove • move
Searching Strategy Node search number =3 Edge search number = 2 There exists an optimal search strategy without recontamination.
Equivalent Problems • Node searching problem is equivalent to • Interval thickness problem • Gate matrix layout problem • Vertex separation problem • Narrowness problem • Path-width problem
Interval Thickness Problem • Given a graph G=(V, E), find an interval graph G’= (V, E’), E E’, such that the maximum clique of G’ is minimum. C D A B C D E F A B E F
Gate Matrix Layout Problem • Given a gate matrix, each column represents a gate and each row represents a net, the problem is to permute the columns such that the nets can be arranged in minimal number of tracks.
A D B F C E A C F B D E
incompatible graph G1G2 G3G5 G6G4 G7G8 A B C D E F C D G6 G3 G4 G2 G5 G7 A B E F
Vertex Separation Problem • G=(V, E) • Linear layout: L: V {1, 2, …, |V|} • VL(i) = {u|L(u) i, w, L(w)>i, (u, w)E}. • vsL(G) = maxi{|VL(i)|} • vs(G) = minLvsL(G)
e h a d a b e d c f g h g f V(1) = {a} V(2) = {a, b} V(3) = {a, b, e} V(4) = {a, e, d} V(5) = {d, e} V(6) = {e, f} V(7) = {e, f} V(8) = {} c b a b e d c f g h c a d b e f h g V(1) = {c} V(2) = {a} V(3) = {d} V(4) = {d} V(5) = {d, e} V(6) = {e, f} V(7) = {e, f} V(8) = {} c a d b e f h g
Narrowness Problem Outer Memory Inner Memory Shack in-sequence out-sequence Limited Short term memory constraint: A vertex can be moved from the shack to OM only if all of the vertices connected to it by an arc are also in the shack or already in OM.
c h a d g f b e Narrowness Problem In-sequence b a d e c f h g b a e d ch fg Out-sequence In-sequence a b c e d f h g b ae d ch fg Out-sequence
Path-width Problem Path decomposition of G=(V, E): • X={X1, X2, …, Xn}, Xi V, 1 i n. • (a, b)E, i such that {a, b} Xi. • i < j < k, Xi Xk Xj. Path-width of G = minXmaxi{|Xi|-1} C D A B E F X ={{A, B}, {B, C, E}, {C, D, E}, {E, F}}
Tree-width Problem Tree decomposition of G=(V, E): • X={X1, X2, …, Xn}, Xi V, 1 i n. • (a, b)E, i such that {a, b} Xi. • Xi, Xj,Xk,Xj is on the path fromXi to Xk,Xi Xk Xj. Tree-width of G = minXmaxi{|Xi|-1} Tree decomposition is equivalent to the embedding into a chordal graph.
A computing paradigm based on tree decomposition using dynamic programming. • Maximum independent set problem • Maximum clique problem • Pathwidth problem • Minimum fill-in problem • Minimum dominating set problem • Hamiltonian cycle problem • Minimum coloring problem • Minimum edge coloring problem • ……………………
Maximum Independent Set I: an independent set of [X7] {Xi}= subgraph induced by Xi and its descendents. Ii= I [Xi], i = 5. 6. {Ii} the MIS containing Ii in {Xi}. X7 X6 X5 X1 X2 X3 X4 {I} = I {I5} {I6}
Bounded treewidth graphs have linear time algorithm for the decision problem of pathwidth problem. • Tree • serial-parallel graphs • cactus graphs • partial 2-tree
Previous Results on Trees • Search number: O(n) • Search strategy:O(n logn) O(n) • Node search: • R. H. Moehring 1990, P. Scheffler 1990, J. Ellis, I. Sudborough, J. Turner 1994
Branch Ttv v t
Three-Branch Lemma • [Pa76,Sc90, EST94, TUK95] For any tree T, s(T) k+1, k ≧ 2 if and only if there exists a vertex t with at least three branches Ttu, Ttv, Ttw such that s(Ttu)≧k, s(Ttv)≧k, s(Ttw)≧k. k +1 k k k
σ = 3 σ = 3 σ = 2 Node Search Example Node search number = 3
Avenue • [MHGJP88] A path P is an avenue of Tif the following conditions hold: • For every path branch T ’ at P, (T ’) = (T), • For every non-path branch T ’ at P, (T ’) < (T). • [MHGJP88] For any tree T, T has an avenue. If the length of the avenue is at least two, then the avenue is unique.
Avenue (T) = k <k <k =k k= <k
Example (Node) Avenue branch Non-avenue branch
Extended Avenue • A path P is an extended avenue of Tif the following conditions hold: • For every path branch T ’ at P, (T ’) (T), • For every non-path branch T ’ at P, (T ’) < (T). • An extended avenue must contain the avenue of the tree.
Avenue System • If T is a basis, then • If T is not a basis: where GP is the set of nonpath branches of P.
Avenue Tree • Let P A(T) and TP denote the branch in F(A(T)) with P as its main avenue. • A(T) is the set of nodes of the logical avenue tree. • P is the parent of Q if and only if TPis a non-path branch of Q.
Avenue Tree Construction • Look tree T as a rooted tree. • Labeling algorithm • Avenue tree construction
Labeling Algorithm • A vertex u is k-critical if the subtree rooted at u is of s(Tu)=k and there exists exactlytwo children v and w of u such that s(Tv)=k and s(Tw)=k. u v w <k <k k k
Labeling Algorithm Label Critical vertices up= u u2 u1 u3
Labeling Algorithm (case 1) (k+1)’ If more than 2 children of s = k Then s = (k+1)’ k k k
k k k Labeling Algorithm (case 2) (k+1)’ If exactly 2 children of s = k and one of them contains a k-critical vertex Then s = (k+1)’ k’ < k k
Labeling Algorithm (case 3) k If exactly 2 children of s = k and none of them contain a k-critical vertex Then s = k k’ k’ < k < k
x k k k Labeling Algorithm (case 4) (k+1)’ If exactly 1 children of s = k and it contains a k-critical vertex x and s(Tu[x]) =k Then s = (k+1)’ k < k < k x: k-critical : Tu[x]
x k k k Labeling Algorithm (case 5) k If exactly 1 children of s = k and it contains a k-critical vertex x and s(Tu[x]) < k Then s = k < k k < k x: k-critical : Tu[x]
Labeling Algorithm (case 6) k’ If exactly 1 children of s = k and it contains no k-critical vertex Then s = k’ < k k’ < k
Running Example (8,7,6‘) (8,2‘) (4,2‘) (7,5,3,2‘) critical vertex (4) (8) (4) (5) (7) (3) (4‘) (4‘)
(8,7,6‘) (8,2‘) (4,2‘) ( 7,5,3,2‘) (4) (8) (5) (7) (3) Avenue Tree Construction Pointer Assignment (before)
(8,7,6‘) (8,2‘) (4,2‘) ( 7,5,3,2‘) (4) (8) (5) (7) (3) Avenue Tree Construction Pointer Assignment (after)
Notation Let u be the root with children v1, …, vk. l = (a1, …, ap) : the label of u. li : the label of vi for i = 1, …,k. li’: the elements of liwhich is greater than ap. bi : bi is the maximal element in li no greater than ap. ui: the vertex corresponding to bi. Then
Pointer Assignment a1 a2…… ap-1 ap w1 w2 …… wp-1 wp u1 b1 u2 b2 : : : : uk bk
Main Theorem An optimal searching strategy on trees can be constructed in linear time.
Block Graphs • Ablock graphis a graph in which every • block is a clique. Block-cut- vertex tree