steiner tree parameterized by treewidth

28
Steiner Tree parameterized by Treewidth Saket Saurabh The Institute of Mathematical Sciences, India Saket Saurabh (The Institute of Mathematical Sciences, India) Steiner Tree parameterized by Treewidth 1 / 10

Upload: aspak2014

Post on 29-Jun-2015

321 views

Category:

Education


2 download

TRANSCRIPT

Page 1: Steiner Tree Parameterized by Treewidth

Steiner Tree parameterized by Treewidth

Saket Saurabh

The Institute of Mathematical Sciences, India

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 1 / 10

Page 2: Steiner Tree Parameterized by Treewidth

The Steiner Tree Problem

Steiner TreeInput: A gonnected graph G of treewidth t, a set of Terminal verticesK ⊆ V (G ).Question: Find a minimum size sub-tree S of G such that K is con-nected in S .

Theorem

Steiner Tree parameterized by treewidth is solvable in timetO(t)poly(n).

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 2 / 10

Page 3: Steiner Tree Parameterized by Treewidth

The Steiner Tree Problem

Steiner TreeInput: A gonnected graph G of treewidth t, a set of Terminal verticesK ⊆ V (G ).Question: Find a minimum size sub-tree S of G such that K is con-nected in S .

Theorem

Steiner Tree parameterized by treewidth is solvable in timetO(t)poly(n).

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 2 / 10

Page 4: Steiner Tree Parameterized by Treewidth

Tree Decomposition

We are given a Tree Decomposition T = (T , χ) of the graph G , where Tis rooted at a vertex r .

For a node i ∈ T , Xi is the corresponding bag of vertices of G .

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 3 / 10

Page 5: Steiner Tree Parameterized by Treewidth

Dynamic Programming

Let S be an optimum steinertree.

Let Xi be a bag in T and G [Vi ]be the graph “below” Xi .

Corresponding to Xi we need tostore a table of partial solutions.

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 4 / 10

Page 6: Steiner Tree Parameterized by Treewidth

Dynamic Programming

Let F = S ∩ G [Vi ]. So Fcontains all terminals in K ∩ Vi .

F is a forest of G [Vi ] and letF1,F2, . . . ,Fl be it’s connectedcomponents.

H = F ∩ Xi and X = Xi \ F .Let E (H) be the edges in G [H]

Pq = Fq ∩ Xi whereq ∈ {1, 2 . . . l}. LetP = {Pq|q ∈ {1, 2 . . . l}}P is a partition of H, where Pq

is the set of vertices of H whichare connected in the tree Fq

Therefore corresponding to Fwe have a tuple (X ,H,P).

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 4 / 10

Page 7: Steiner Tree Parameterized by Treewidth

Dynamic Programming

Let F = S ∩ G [Vi ]. So Fcontains all terminals in K ∩ Vi .

F is a forest of G [Vi ] and letF1,F2, . . . ,Fl be it’s connectedcomponents.

H = F ∩ Xi and X = Xi \ F .Let E (H) be the edges in G [H]

Pq = Fq ∩ Xi whereq ∈ {1, 2 . . . l}. LetP = {Pq|q ∈ {1, 2 . . . l}}P is a partition of H, where Pq

is the set of vertices of H whichare connected in the tree Fq

Therefore corresponding to Fwe have a tuple (X ,H,P).

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 4 / 10

Page 8: Steiner Tree Parameterized by Treewidth

Dynamic Programming

Let F = S ∩ G [Vi ]. So Fcontains all terminals in K ∩ Vi .

F is a forest of G [Vi ] and letF1,F2, . . . ,Fl be it’s connectedcomponents.

H = F ∩ Xi and X = Xi \ F .Let E (H) be the edges in G [H]

Pq = Fq ∩ Xi whereq ∈ {1, 2 . . . l}. LetP = {Pq|q ∈ {1, 2 . . . l}}

P is a partition of H, where Pq

is the set of vertices of H whichare connected in the tree Fq

Therefore corresponding to Fwe have a tuple (X ,H,P).

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 4 / 10

Page 9: Steiner Tree Parameterized by Treewidth

Dynamic Programming

Let F = S ∩ G [Vi ]. So Fcontains all terminals in K ∩ Vi .

F is a forest of G [Vi ] and letF1,F2, . . . ,Fl be it’s connectedcomponents.

H = F ∩ Xi and X = Xi \ F .Let E (H) be the edges in G [H]

Pq = Fq ∩ Xi whereq ∈ {1, 2 . . . l}. LetP = {Pq|q ∈ {1, 2 . . . l}}P is a partition of H, where Pq

is the set of vertices of H whichare connected in the tree Fq

Therefore corresponding to Fwe have a tuple (X ,H,P).

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 4 / 10

Page 10: Steiner Tree Parameterized by Treewidth

Dynamic Programming

Let F = S ∩ G [Vi ]. So Fcontains all terminals in K ∩ Vi .

F is a forest of G [Vi ] and letF1,F2, . . . ,Fl be it’s connectedcomponents.

H = F ∩ Xi and X = Xi \ F .Let E (H) be the edges in G [H]

Pq = Fq ∩ Xi whereq ∈ {1, 2 . . . l}. LetP = {Pq|q ∈ {1, 2 . . . l}}P is a partition of H, where Pq

is the set of vertices of H whichare connected in the tree Fq

Therefore corresponding to Fwe have a tuple (X ,H,P).

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 4 / 10

Page 11: Steiner Tree Parameterized by Treewidth

Dynamic Programming

Suppose forests F1 and F2which correspond to the sametuple (X ,H,P).

Then (S \ F1) ∪ F2 is also asolution.

Thus we only need to keep onlya minimum F corresponding toeach choice of (X ,H,P) in Xi .

The dynamic programming tablestores the following,

c[X ,H,P, i ] = |F |

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 4 / 10

Page 12: Steiner Tree Parameterized by Treewidth

Dynamic Programming

Suppose forests F1 and F2which correspond to the sametuple (X ,H,P).

Then (S \ F1) ∪ F2 is also asolution.

Thus we only need to keep onlya minimum F corresponding toeach choice of (X ,H,P) in Xi .

The dynamic programming tablestores the following,

c[X ,H,P, i ] = |F |

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 4 / 10

Page 13: Steiner Tree Parameterized by Treewidth

Dynamic Programming

We build the dynamicprogramming table in a bottomup fashion.

Finally, we output the minimumsized F corresponding to theroot-bag of T .

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 4 / 10

Page 14: Steiner Tree Parameterized by Treewidth

Leaf Nodes

For a leaf node Xi of T , |G [Vi ]| ≤ t + 1.

Thus we can compute the table entries in time tO(t) using abruteforce algorithm.

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 5 / 10

Page 15: Steiner Tree Parameterized by Treewidth

Forget Node

Let Xi be a forget node with child node Xj .

For each tuple of Xi we store the minimum of the Xj which areconsistent with it.

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 6 / 10

Page 16: Steiner Tree Parameterized by Treewidth

Introduce Node

Let Xi be an introduce node with child node Xj .

Xi = Xj ∪ {v}

Suppose v ∈ X .I If v is a terminal then, the table entries will be φ.I Else, c[X ,H,P, i ] = c[X \ v ,H,P].

Otherwise, v /∈ X .

I Assume that v ∈ P1 where P1 ∈ P.I Let F1 be the tree corresponding to P1.I Deleting v fro P1 results in subtrees

F 11 ,F

21 , . . . ,F

p1 .

I This gives us a tuple (X ,H \ v ,P ′) of Xj where

P ′ = {P11 , . . .P

p1 } ∪ (P \ {P1})

I Therefore, c(X ,H,P, i) = minP′ c(X ,H \ v ,P ′, j)

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 7 / 10

Page 17: Steiner Tree Parameterized by Treewidth

Introduce Node

Let Xi be an introduce node with child node Xj .

Xi = Xj ∪ {v}

Suppose v ∈ X .I If v is a terminal then, the table entries will be φ.I Else, c[X ,H,P, i ] = c[X \ v ,H,P].

Otherwise, v /∈ X .

I Assume that v ∈ P1 where P1 ∈ P.I Let F1 be the tree corresponding to P1.I Deleting v fro P1 results in subtrees

F 11 ,F

21 , . . . ,F

p1 .

I This gives us a tuple (X ,H \ v ,P ′) of Xj where

P ′ = {P11 , . . .P

p1 } ∪ (P \ {P1})

I Therefore, c(X ,H,P, i) = minP′ c(X ,H \ v ,P ′, j)

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 7 / 10

Page 18: Steiner Tree Parameterized by Treewidth

Introduce Node

Let Xi be an introduce node with child node Xj .

Xi = Xj ∪ {v}

Suppose v ∈ X .I If v is a terminal then, the table entries will be φ.I Else, c[X ,H,P, i ] = c[X \ v ,H,P].

Otherwise, v /∈ X .

I Assume that v ∈ P1 where P1 ∈ P.I Let F1 be the tree corresponding to P1.I Deleting v fro P1 results in subtrees

F 11 ,F

21 , . . . ,F

p1 .

I This gives us a tuple (X ,H \ v ,P ′) of Xj where

P ′ = {P11 , . . .P

p1 } ∪ (P \ {P1})

I Therefore, c(X ,H,P, i) = minP′ c(X ,H \ v ,P ′, j)

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 7 / 10

Page 19: Steiner Tree Parameterized by Treewidth

Introduce Node

Let Xi be an introduce node with child node Xj .

Xi = Xj ∪ {v}

Suppose v ∈ X .I If v is a terminal then, the table entries will be φ.I Else, c[X ,H,P, i ] = c[X \ v ,H,P].

Otherwise, v /∈ X .I Assume that v ∈ P1 where P1 ∈ P.

I Let F1 be the tree corresponding to P1.I Deleting v fro P1 results in subtrees

F 11 ,F

21 , . . . ,F

p1 .

I This gives us a tuple (X ,H \ v ,P ′) of Xj where

P ′ = {P11 , . . .P

p1 } ∪ (P \ {P1})

I Therefore, c(X ,H,P, i) = minP′ c(X ,H \ v ,P ′, j)

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 7 / 10

Page 20: Steiner Tree Parameterized by Treewidth

Introduce Node

Let Xi be an introduce node with child node Xj .

Xi = Xj ∪ {v}

Suppose v ∈ X .I If v is a terminal then, the table entries will be φ.I Else, c[X ,H,P, i ] = c[X \ v ,H,P].

Otherwise, v /∈ X .I Assume that v ∈ P1 where P1 ∈ P.I Let F1 be the tree corresponding to P1.

I Deleting v fro P1 results in subtreesF 11 ,F

21 , . . . ,F

p1 .

I This gives us a tuple (X ,H \ v ,P ′) of Xj where

P ′ = {P11 , . . .P

p1 } ∪ (P \ {P1})

I Therefore, c(X ,H,P, i) = minP′ c(X ,H \ v ,P ′, j)

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 7 / 10

Page 21: Steiner Tree Parameterized by Treewidth

Introduce Node

Let Xi be an introduce node with child node Xj .

Xi = Xj ∪ {v}

Suppose v ∈ X .I If v is a terminal then, the table entries will be φ.I Else, c[X ,H,P, i ] = c[X \ v ,H,P].

Otherwise, v /∈ X .I Assume that v ∈ P1 where P1 ∈ P.I Let F1 be the tree corresponding to P1.I Deleting v fro P1 results in subtrees

F 11 ,F

21 , . . . ,F

p1 .

I This gives us a tuple (X ,H \ v ,P ′) of Xj where

P ′ = {P11 , . . .P

p1 } ∪ (P \ {P1})

I Therefore, c(X ,H,P, i) = minP′ c(X ,H \ v ,P ′, j)

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 7 / 10

Page 22: Steiner Tree Parameterized by Treewidth

Introduce Node

Let Xi be an introduce node with child node Xj .

Xi = Xj ∪ {v}

Suppose v ∈ X .I If v is a terminal then, the table entries will be φ.I Else, c[X ,H,P, i ] = c[X \ v ,H,P].

Otherwise, v /∈ X .I Assume that v ∈ P1 where P1 ∈ P.I Let F1 be the tree corresponding to P1.I Deleting v fro P1 results in subtrees

F 11 ,F

21 , . . . ,F

p1 .

I This gives us a tuple (X ,H \ v ,P ′) of Xj where

P ′ = {P11 , . . .P

p1 } ∪ (P \ {P1})

I Therefore, c(X ,H,P, i) = minP′ c(X ,H \ v ,P ′, j)

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 7 / 10

Page 23: Steiner Tree Parameterized by Treewidth

Join Node

Let Xi be a join-node with children Xj and Xk .

We merge the solution of Xj and Xk , but we mustcarefully avoid cycles.

Consider a tree F in G [Vi ],

I F = (F 1j ∪ F 2

j . . .Fpj )

⋃(F 1

k ∪ F 2k . . .F

qk )

I (F 1j , . . . ,F

pj ) correspond to Xj and (F 1

k , . . . ,Fqk )

correspond to Xk

I Therefore we have a corresponding (X ,H,P) forXi (X ,Hj ,Pj) for Xj and (X ,Hk ,Pk) for Xk .(H,P) is obtained by tree-merge of (Hj ,Pj) and(Hk ,Pk).

I Given (Hj ,Pj) and (Hk ,Pk) we can build anauxillary graph and test if they can be tree-merged.

Thus for H,P of Xi , we find the minimum partialsolutions in Xj and Xk which can be tree-merged.c[X ,H,P, i ] = min(Pj ,Hj ,Pk ,Hk ) c[X ,Hj ,Pj , j ] +c[X ,Hk ,Pk , k]− |E (Hj) ∩ E (Hk)|

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 8 / 10

Page 24: Steiner Tree Parameterized by Treewidth

Join Node

Let Xi be a join-node with children Xj and Xk .

We merge the solution of Xj and Xk , but we mustcarefully avoid cycles.

Consider a tree F in G [Vi ],I F = (F 1

j ∪ F 2j . . .F

pj )

⋃(F 1

k ∪ F 2k . . .F

qk )

I (F 1j , . . . ,F

pj ) correspond to Xj and (F 1

k , . . . ,Fqk )

correspond to Xk

I Therefore we have a corresponding (X ,H,P) forXi (X ,Hj ,Pj) for Xj and (X ,Hk ,Pk) for Xk .(H,P) is obtained by tree-merge of (Hj ,Pj) and(Hk ,Pk).

I Given (Hj ,Pj) and (Hk ,Pk) we can build anauxillary graph and test if they can be tree-merged.

Thus for H,P of Xi , we find the minimum partialsolutions in Xj and Xk which can be tree-merged.c[X ,H,P, i ] = min(Pj ,Hj ,Pk ,Hk ) c[X ,Hj ,Pj , j ] +c[X ,Hk ,Pk , k]− |E (Hj) ∩ E (Hk)|

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 8 / 10

Page 25: Steiner Tree Parameterized by Treewidth

Join Node

Let Xi be a join-node with children Xj and Xk .

We merge the solution of Xj and Xk , but we mustcarefully avoid cycles.

Consider a tree F in G [Vi ],I F = (F 1

j ∪ F 2j . . .F

pj )

⋃(F 1

k ∪ F 2k . . .F

qk )

I (F 1j , . . . ,F

pj ) correspond to Xj and (F 1

k , . . . ,Fqk )

correspond to Xk

I Therefore we have a corresponding (X ,H,P) forXi (X ,Hj ,Pj) for Xj and (X ,Hk ,Pk) for Xk .(H,P) is obtained by tree-merge of (Hj ,Pj) and(Hk ,Pk).

I Given (Hj ,Pj) and (Hk ,Pk) we can build anauxillary graph and test if they can be tree-merged.

Thus for H,P of Xi , we find the minimum partialsolutions in Xj and Xk which can be tree-merged.c[X ,H,P, i ] = min(Pj ,Hj ,Pk ,Hk ) c[X ,Hj ,Pj , j ] +c[X ,Hk ,Pk , k]− |E (Hj) ∩ E (Hk)|

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 8 / 10

Page 26: Steiner Tree Parameterized by Treewidth

Join Node

Let Xi be a join-node with children Xj and Xk .

We merge the solution of Xj and Xk , but we mustcarefully avoid cycles.

Consider a tree F in G [Vi ],I F = (F 1

j ∪ F 2j . . .F

pj )

⋃(F 1

k ∪ F 2k . . .F

qk )

I (F 1j , . . . ,F

pj ) correspond to Xj and (F 1

k , . . . ,Fqk )

correspond to Xk

I Therefore we have a corresponding (X ,H,P) forXi (X ,Hj ,Pj) for Xj and (X ,Hk ,Pk) for Xk .(H,P) is obtained by tree-merge of (Hj ,Pj) and(Hk ,Pk).

I Given (Hj ,Pj) and (Hk ,Pk) we can build anauxillary graph and test if they can be tree-merged.

Thus for H,P of Xi , we find the minimum partialsolutions in Xj and Xk which can be tree-merged.c[X ,H,P, i ] = min(Pj ,Hj ,Pk ,Hk ) c[X ,Hj ,Pj , j ] +c[X ,Hk ,Pk , k]− |E (Hj) ∩ E (Hk)|

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 8 / 10

Page 27: Steiner Tree Parameterized by Treewidth

Running Time

Clearly, the leaf, forget and introduce nodes take time tO(t).

For the join operation, we need to go over all entries for Xi and Xk

which could be tree-merged.

This can be done in time tO(t).

Thus the algorithm runs in time tO(t).

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 9 / 10

Page 28: Steiner Tree Parameterized by Treewidth

Thank you. Questions ?

Saket Saurabh (The Institute of Mathematical Sciences, India)Steiner Tree parameterized by Treewidth 10 / 10