1 Graph Searching and Search Time Franz J. Brandenburg and Stefanie Herrmann University of Passau.

35
1 Graph Searching and Search Time Franz J. Brandenburg and Stefanie Herrmann University of Passau

Transcript of 1 Graph Searching and Search Time Franz J. Brandenburg and Stefanie Herrmann University of Passau.

1

Graph Searchingand

Search Time

Franz J. Brandenburg and Stefanie HerrmannUniversity 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

• goalclear the graph by a systematic sweep and clean all edges or catch the fugitive by a systematic search of G

• versionsnode 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 edgeif there is an „open“ path from a contaminated to a cleared edge

• guarded pathsa 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

Karlovyvary

CeskeBud.

Liberec

HradecKrálove

Brno

Olomuc

Ostrava

6

Example

7

Example

8

Recontamination

9

Search Strategy

a search strategy is a computation on the graph G = (V,E)describing the compete search on G

s = ((C0, B0), (C1, B1),..., (Ct, Bt))

Ci = set of cleared edges, Ci E

Bi = set of guarded vertices, Bi V

step i:

remove searchers from Ri Bi and simultaneously

place searchers at new nodes Pi V–Bi update:

Bi+1 = Bi – Ri Pi Ci+1 = Ci {(u,v) | u,v Bi+1} new cleared edge

– {(u,v) Ci | (u,v) is recontaminated}

recontamination:there is an unguarded path to a cleared edge

10

Cost Measures

a search strategy s = ((C0, B0), (C1, B1),..., (Ct, Bt))

width(s) = max { | Bi | | 0≤i≤t}the maximal number of searchers, “space”search number(G) = min width(s)

NEWlength(s) = t-1 (discard the last step)

the number of steps, “time”

NEW: parameterized measuresa 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 = ((C0, B0), (C1, B1),..., (Ct, Bt)) is monotone, ifØ = C0 ... Ci Ci+1 ... Ct =E

i.e. a monotone sequence of cleared edges

consequence:the guards at Bi prohibit any contamination.They do not leave a gap (to escape).

Bi separates “old”, clear edges from ”new”, contaminated edgessearch-time(G) ≤ n-1

search-time(G) =n-1 e.g. for a path and two “node”-searchers

21 63 4 5 7

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&Golovach SIAM 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 |Bi| —> MIN

This search strategy s’ must be monotone.

13

Monotonicity

Corollarygraph searching is in NP (first A. LaPaugh 1986; JACM 1993)

i.e. do k searchers suffice, search number

Corollarysearch-time(∞) ≤ n-1 for |G|=n

i.e. visit and guard at least one new node per step

14

Min-Max Bounds

THEOREM 2let |G|=n, G connected

integers k, t with k ≥ search number(G).

There is a (monotone) search strategy s such that

and

n k

k 1

1 length(s) n 1 k

n 1

t

1 width(s) n

Corollaryspeed-up for k searchers:

at most a factor of (k-1)

15

Complexity

PROPOSITIONSearch 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

THEOREMfor 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-PARTITIONan instance with m items of total size mB

every item of size a is transformed into an a-cliqueand there is a center node

3-Partition iff B+1 searchers can search G in time m.

17

Graph Representations

THEOREMThe following are equivalent

both for time = length

and searchers = width

– graph searching

– pathwidth

– interval thickness

– vertex separation

Consequencea 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, (X1,..., Xt)

Xi = V

every edge is contained in a bag Xi

for every node v: vXi and vXj implies vXk for i ≤k≤j

width = max { |Xi| -1}, the size of the bags

length = t

0 1 2 43 0

1

2

0

2

3

0

3

4

19

Pathwidth

P

C

K

PK

U

U

P

C

L

P

U L

L

P

C

L

H

H

O

B

P

C

H

B

HO

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}

0 1 2 430

1

2

3

4

21

Interval Thickness

P

C

K

U L

H

O

B

KPZUPCLHB

OO

PZO

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)|}

0 1 2 43

23

2-D Layouts

2-D layoutmap the positions into 2D p (x,y)

preserve the ordering p < p’ => x < x’ or x=x and y<y’

width = max y-coordinate

length = max x-coordinate

0

1

2

4

3

0 1 2 43

24

2-D Layouts

P

C

K

U L

H

O

B

P

C

K

UL

H

OB

OPZ

25

Equivalence

THEOREMfor 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) = k and interval length(k) = t

4. 2D-width(t) = k-1 and 2D-length(k) = t.

Proof.Known constructions for width

can be generalized to both parameters width + length.

CorollaryNP-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

THEOREMthere are classes Gi and Hi with search-number = ki

such that

there is maximal speed up for Gi

there is poor speed up for Hi

Gi is searched by ki searchers in time |Gi|+1-ki

and ki+p searches search Gi in time 1+ t/p 1 extra seacher saves 50% in time

on n(ki-1) grids

Hi is searched by ki searchers in time t

and (2ki-1) searchers cannot do bettere.g. (k-1) extra searchers do not help

on (ki-1)-paths (paths of (ki-1) cliques)

28

Open

Characterizethe 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

1

2

6

5

4

3 9

8

7 10

11

12

13

14

31

Pathwidth

1

2

6

5

4

3 9

8

7 10

11

12

13

14

1

2

3

4

5

6

7

8

9

10

11

12

13

14

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

1

2

6

5

4

3 9

8

7 10

11

12

13

14

114

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)|}

1 2 3 4 5

35

2-D Layouts

2-D layoutmap the positions into 2D p (x,y)

preserve the ordering p < p’ => x < x’ or x=x and y<y’

width = max y-coordinate

length = max x-coordinate

1

2

6

5

4

3 9

8

7 10

11

12

13

14