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

Slides:



Advertisements
Similar presentations
Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl.
Advertisements

Chapter 9 Greedy Technique. Constructs a solution to an optimization problem piece by piece through a sequence of choices that are: b feasible - b feasible.
Lecture 15. Graph Algorithms
Shortest Paths and Treewidth Algorithms and Networks.
Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
Introduction to Kernel Lower Bounds Daniel Lokshtanov.
Review Binary Search Trees Operations on Binary Search Tree
Graph Isomorphism Algorithms and networks. Graph Isomorphism 2 Today Graph isomorphism: definition Complexity: isomorphism completeness The refinement.
Rooted Routing Using Structural Decompositions Jiao Tong University Shanghai, China June 17, 2013.
Lecture 17 Path Algebra Matrix multiplication of adjacency matrices of directed graphs give important information about the graphs. Manipulating these.
Greedy Algorithms for Matroids Andreas Klappenecker.
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
Graphs CS-240/341. Uses for Graphs computer networks and routing airline flights geographic maps course prerequisite structures tasks for completing a.
Graph COMP171 Fall Graph / Slide 2 Graphs * Extremely useful tool in modeling problems * Consist of: n Vertices n Edges D E A C F B Vertex Edge.
1 Vertex Cover Problem Given a graph G=(V, E), find V' ⊆ V such that for each edge (u, v) ∈ E at least one of u and v belongs to V’ and |V’| is minimized.
Steiner trees Algorithms and Networks. Steiner Trees2 Today Steiner trees: what and why? NP-completeness Approximation algorithms Preprocessing.
Applied Discrete Mathematics Week 12: Trees
Treewidth Algorithms and Networks. Treewidth2 Overview Historic introduction: Series parallel graphs Dynamic programming on trees Dynamic programming.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Introduction to Graph Theory
GRAPH Learning Outcomes Students should be able to:
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Fixed Parameter Complexity Algorithms and Networks.
MST Many of the slides are from Prof. Plaisted’s resources at University of North Carolina at Chapel Hill.
Kernel Bounds for Structural Parameterizations of Pathwidth Bart M. P. Jansen Joint work with Hans L. Bodlaender & Stefan Kratsch July 6th 2012, SWAT 2012,
Graph Theory Topics to be covered:
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
Lecture 22 More NPC problems
Approximating the Minimum Degree Spanning Tree to within One from the Optimal Degree R 陳建霖 R 宋彥朋 B 楊鈞羽 R 郭慶徵 R
UNC Chapel Hill Lin/Foskey/Manocha Minimum Spanning Trees Problem: Connect a set of nodes by a network of minimal total length Some applications: –Communication.
1 CS104 : Discrete Structures Chapter V Graph Theory.
1 Steiner Tree Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
Greedy Algorithms and Matroids Andreas Klappenecker.
V Spanning Trees Spanning Trees v Minimum Spanning Trees Minimum Spanning Trees v Kruskal’s Algorithm v Example Example v Planar Graphs Planar Graphs v.
Week 11 - Monday.  What did we talk about last time?  Binomial theorem and Pascal's triangle  Conditional probability  Bayes’ theorem.
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
CSCI 115 Chapter 8 Topics in Graph Theory. CSCI 115 §8.1 Graphs.
GRAPHS. Graph Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component, spanning tree Types of graphs: undirected,
Data Reduction for Graph Coloring Problems Bart M. P. Jansen Joint work with Stefan Kratsch August 22 nd 2011, Oslo.
Graphs Basic properties.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
CSC 413/513: Intro to Algorithms
Chapter 9: Graphs.
Prims Algorithm for finding a minimum spanning tree
Algorithms for hard problems Parameterized complexity Bounded tree width approaches Juris Viksna, 2015.
Graphs. Graph Definitions A graph G is denoted by G = (V, E) where  V is the set of vertices or nodes of the graph  E is the set of edges or arcs connecting.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
1 Lecture 5 (part 2) Graphs II (a) Circuits; (b) Representation Reading: Epp Chp 11.2, 11.3
Graphs and Algorithms (2MMD30)
Part 3 Linear Programming
Algorithms and Networks
Applied Discrete Mathematics Week 13: Graphs
Fast Hamiltonicity Checking via Bases of Perfect Matchings
Graph Graphs and graph theory can be used to model:
Hans Bodlaender, Marek Cygan and Stefan Kratsch
Graph theory Definitions Trees, cycles, directed graphs.
Parameterized complexity Bounded tree width approaches
Algorithms and networks
Algorithms and Complexity
CS 3343: Analysis of Algorithms
Dissertation for the degree of Philosophiae Doctor (PhD)
Part 3 Linear Programming
Parameterised Complexity
Md. Abul Kashem, Chowdhury Sharif Hasan, and Anupam Bhattacharjee
Minimum Spanning Tree Algorithms
Bart M. P. Jansen Jesper Nederlof
Part 3 Linear Programming
GRAPHS.
Minimum Spanning Trees
Presentation transcript:

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

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 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 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 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 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 Leaf  G(i) is graph with one vertex and no edges: v v

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

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

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 Introduce edge node  Adds an edge between two terminals vv

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