Download presentation

Presentation is loading. Please wait.

Published byLea Folsom Modified about 1 year ago

1
1 Steiner Tree on graphs of small treewidth Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij

2
2 This lecture Steiner Tree Recap Steiner Tree on Graphs of Small Treewidth What do we store at tables Computing on Nice Tree Decompositions Improvement using Rank Based Approach Based on work by: B, Cygan, Kratsch, Nederlof (2013) Fafianie, B, Nederlof (2013)

3
3 The Steiner Tree Problem Let G = (V,E) be an undirected graph, and let N µ V be a subset of the terminals. A Steiner tree is a tree T = (V’,E’) in G connecting all terminals in N V’ µ V, E’ µ E, N µ V’ We use k=|N|. Streiner tree problem: Given: an undirected graph G = (V,E), a terminal set N µ V, and an integer t. Question: is there a Steiner tree consisting of at most t edges in G.

4
4 Discussed results Steiner Tree is NP-complete Distance network Steiner Tree, parameterized by number of terminals is FPT: with k terminals, can be solved in O(2 k p(n)) time Today an algorithm using O(c k n) time for: Given: Connected graph G, set of terminals W, tree decomposition of G of width at most k Question: What is the minimum number of edges of a tree that connects all terminals? And the weighted variant: Given: Connected graph G, set of terminals W, tree decomposition of G of width at most k, weight for each edge Question: What is the minimum total weight of a tree that connects all terminals?

5
5 Nice tree decompositions of special type Five types of nodes: Leaf (as before) Join (as before) Forget (as before) Introduce vertex (add a vertex, but without edges) Introduce edge (add an edge between two terminals) We assume in addition: The root of the tree decomposition is a bag with one vertex: a terminal

6
6 To each bag, we associate a subgraph G(i) Bag i: All vertices in bags in subtree rooted by i All edges that are introduced in subtree rooted by i

7
7 Leaf G(i) is graph with one vertex and no edges: v v

8
8 Join nodes Identify the two subgraphs on the vertices in the bag + =

9
9 Forget nodes Same graph – one vertex is no longer ‘boundary’ v v

10
10 Introduce vertex nodes In an introduce vertex node, a new vertex (say v) is added to G(i): at this point, v has no incident edges (yet) v Degree 0 now

11
11 Introduce edge node Adds an edge between two terminals vv

12
12 Partial solutions (1) If we have a Steiner tree T in G, how does the part of T in G(i) look like? v v w w b b a a a, b terminals

13
13 Partial solutions (2) If we have a Steiner tree T in G, how does the part of T in G(i) look like? Maybe like this: v v w w b b a a a, b terminals

14
14 Partial solutions (3) If we have a Steiner tree T in G, how does the part of T in G(i) look like? Or this: v v w w b b a a a, b terminals

15
15 Partial solutions (4) If we have a Steiner tree T in G, how does the part of T in G(i) look like? But not this: We cannot connect a and b to other terminals outside G(i) v v w w b b a a a, b terminals

16
16 Partial solutions (5) A partial solution is a forest in G(i), such that Each tree contains a vertex in the bag/boundary X(i) Each terminal in G(i) belongs to a tree in the forest Or, differently said: each terminal is connected to the boundary bag Next step: characterize such forests with finite information

17
17 Characteristic of partial solution A characteristic of a partial solution for G(i) is: A subset S of the vertices in X(i): the vertices in X(i) that belong to the forest A partition of S Two vertices belong to the same partition, if and only if they are connected in the forest

18
18 Example characterics (weighted example) {{a,b,c}}, 10 {{a,b,c}}, 11 {{a},{b,c}}, 3 Table: {{a},{b},{c}}, 0 {{a},{b,c}}, 3 {{b},{a,c}}, 9 {{c},{a,b}}, 7 {{a,b,c}}, 10 b b c c a b b c c a 2

19
19 DP For each bag, compute a table: For each possible characteristic, what is the minimum weight of a partial solution (forest fulfilling criteria) with that characteristic Compute these tables bottom up in the tree Root bag gives the answer Remember: the root bag had one vertex, a terminal Only one possible characteristic in table for the root Its value gives the answer

20
20 Computing tables Leaf: trivial Forget: discard characteristics with the forgotten vertex as only element in a partition (becomes never connected) Join: try all combinations of characteristics and compute resulting characteristics Introduce vertex: For each element of child bag table: Add characteristic with introduced vertex as single element in partition Add characteristic with introduced vertex not in forest Introduce edge: For each element of child bag table: If both endpoints in forest: Add characteristic with introduced edge in the forest: this increases width and joins two forests Add unchanged characteristic: edge not used in forest

21
21 ? ? Improvement: intuition It is sufficient to have something for all different futures … if you have a set of insurance policies, such that each possible event in the future is covered by at least one of these, you do not need an additional insurance policy The future is here: a forest in the “other part”

22
22 Connectivity matrix Rows and columns marked with partitions Entry is 1 if: row+ column partition connect all a – b - cab - cac - bbc - aabc a – b - c00001 ab - c00111 ac - b01011 bc - a01101 abc11111

23
23 The connectivity matrix 1 iff partitions joined connect all a – b - cab - cac - bbc - aabc a – b - c00001 ab - c00111 ac - b01011 bc - a01101 abc11111 Table: a – b – c: 0 ab – c: 7 ac – b: 9 bc – a: 7 abc: 10 Not needed!!!

24
24 Linear combinations If row i is a linear combination (when computing mod 2) of other rows, but is at least as expensive as these, then we do not need the solution of row i. For any future that helps i, we have an entry that is as least as good, and is also helped by this future… a – b - cab - cac - bbc - aabc a – b - c00001 ab - c00111 ac - b01011 bc - a01101 abc

25
25 Rank Theorem (without proof): The connectivity matrix on r elements has rank 2 r-1 … and the partitions in at most 2 sets form a basis Each column with partition p can be written as sum of the columns in 2 sets that it refines (except the trivial partition)

26
26 The reduce step This enables a reduce step: if a table has more than 2 |W| elements with the same vertices W in the forest, then we can delete some superfluous table entries: Let W be the vertices in X(i) in the forest. Build part of the connectivity matrix: Rows are the entries in the current table with W as forest vertices Columns are partitions in at most two sets of W Perform Gaussian elimination: Find rows that are linear combination of less or equally expensive rows, and delete the corresponding entries

27
27 Wrapping up Table size after reduction step is bounded by 3 tw. Running time is dominated by Gaussian elimination step and join nodes: O(c tw n) Implementation: works fast for real-life graphs Proper representation, choice of data structures helps a lot

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google