Steiner Tree Parameterized by Treewidth

Post on 29-Jun-2015

321 views 2 download

Tags:

Transcript of 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Thank you. Questions ?

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