Dissertation for the degree of Philosophiae Doctor (PhD)

Slides:



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

Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
1 Steiner Tree on graphs of small treewidth Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
Dynamic Programming Dynamic Programming is a general algorithm design technique for solving problems defined by recurrences with overlapping subproblems.
The Design and Analysis of Algorithms
Lectures on Network Flows
Introduction to Approximation Algorithms Lecture 12: Mar 1.
Graph & BFS.
Chapter 8 Dynamic Programming Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
The Theory of NP-Completeness
Design and Analysis of Algorithms - Chapter 81 Dynamic Programming Dynamic Programming is a general algorithm design technique Dynamic Programming is a.
Chapter 8 Dynamic Programming Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
2-Layer Crossing Minimisation Johan van Rooij. Overview Problem definitions NP-Hardness proof Heuristics & Performance Practical Computation One layer:
Ch 13 – Backtracking + Branch-and-Bound
Steiner trees Algorithms and Networks. Steiner Trees2 Today Steiner trees: what and why? NP-completeness Approximation algorithms Preprocessing.
Dynamic Programming A. Levitin “Introduction to the Design & Analysis of Algorithms,” 3rd ed., Ch. 8 ©2012 Pearson Education, Inc. Upper Saddle River,
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
GRAPH Learning Outcomes Students should be able to:
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
A. Levitin “Introduction to the Design & Analysis of Algorithms,” 3rd ed., Ch. 8 ©2012 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.
Dynamic Programming Dynamic Programming Dynamic Programming is a general algorithm design technique for solving problems defined by or formulated.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
1 Steiner Tree Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
Data Structures & Algorithms Graphs
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Provinci summer training 2010 June 17: Recursion and recursive decent parser June 24: Greedy algorithms and stable marriage July 1: Holiday July 8: Math.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Combinatorics of colouring 3-regular trees
TK3043 Analysis and Design of Algorithms
Graphs: Definitions and Basic Properties
Graphs Representation, BFS, DFS
Fast Hamiltonicity Checking via Bases of Perfect Matchings
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Hans Bodlaender, Marek Cygan and Stefan Kratsch
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
Dynamic Programming Dynamic Programming is a general algorithm design technique for solving problems defined by recurrences with overlapping subproblems.
Chapter 8 Dynamic Programming
Graph theory Definitions Trees, cycles, directed graphs.
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
Homomorphic Hashing for Sparse Coefficient Extraction
Lecture 22 Complexity and Reductions
Design and Analysis of Algorithm
Lectures on Network Flows
Algorithms and Complexity
1.3 Modeling with exponentially many constr.
Graphs Chapter 13.
Advanced Analysis of Algorithms
Richard Anderson Lecture 30 NP-Completeness
Chapter 11 Limitations of Algorithm Power
Bart M. P. Jansen Jesper Nederlof
3. Brute Force Selection sort Brute-Force string matching
CSCI2100 Data Structures Tutorial
3. Brute Force Selection sort Brute-Force string matching
Backtracking and Branch-and-Bound
What is Computer Science About? Part 2: Algorithms
Discrete Mathematics for Computer Science
A Few Sample Reductions
Hamiltonicity below Dirac’s condition
Applied Discrete Mathematics Week 13: Graphs
Lecture 22 Complexity and Reductions
3. Brute Force Selection sort Brute-Force string matching
Presentation transcript:

Dissertation for the degree of Philosophiae Doctor (PhD) Space and Time Efficient Structural Improvements of Dynamic Programming Algorithms Jesper Nederlof Dissertation for the degree of Philosophiae Doctor (PhD) University of Bergen December 2011

Outline Dynamic Programming Ch2 Subset Sum Ch5 Steiner Tree Ch3 Steiner Tree on graphs of small treewidth Ch7 Hardness of Set Cover Ch8 Further remarks and conclusion

1 Dynamic programming (Chapter 2)

Dynamic Programming (DP) Initiated in 1950's by Bellman in his book "Bottleneck Problems and Dynamic Programming". Nowadays one of most prominent algorithmic techniques in designing algorithms. Discussed in any basic course or text book on algorithms.

Dynamic Programming (DP) The method works with a big table of data that has to be stored in the (preferably working) memory. A relatively easy procedure computes new table entries using already computed table entries. This easy procedure is often so easy that we just write it down as a single formula, obtaining a recurrence.

Dynamic Programming (DP) Some problems for which DP is the best approach (in theory): “Easy problems” (we know how to solve them fast) Weighted shortest path (Bellman-Ford algorithm). Weighted longest path in directed acyclic graphs. Matrix multiplication, Sequence alignment. “Hard problems” (       -hard problems) Subset Sum, Knapsack, Steiner Tree, Set Cover, Traveling Salesman Problem. Problems on graphs of small treewidth.

Dynamic Programming (DP) Some problems for which DP is the best approach (in theory): “Easy problems” (we know how to solve them fast) Weighted shortest path (Bellman-Ford algorithm). Weighted longest path in directed acyclic graphs. Matrix multiplication, Sequence alignment. “Hard problems” (       -hard problems) Subset Sum, Knapsack, Steiner Tree, Set Cover, Traveling Salesman Problem. Problems on graphs of small treewidth.

Dynamic Programming (DP) Some problems for which DP is the best approach (in theory): “Easy problems” (we know how to solve them fast) Weighted shortest path (Bellman-Ford algorithm). Weighted longest path in directed acyclic graphs. Matrix multiplication. Sequence alignment. “Hard problems" (       -hard problems) Subset Sum, Knapsack, Steiner Tree, Set Cover, Traveling Salesman Problem. Problems on graphs of small treewidth. Almost as fast, but using a lot less space.

Dynamic Programming (DP) Some problems for which DP is the best approach (in theory): “Easy problems“ (we know how to solve them fast) Weighted shortest path (Bellman-Ford algorithm). Weighted longest path in directed acyclic graphs. Matrix multiplication. Sequence alignment. “Hard problems" (       -hard problems) Subset Sum, Knapsack, Steiner Tree, Set Cover, Traveling Salesman Problem. Problems on graphs of small treewidth. Can be solved faster.

Dynamic Programming (DP) Some problems for which DP is the best approach (in theory): “Easy problems“ (we know how to solve them fast) Weighted shortest path (Bellman-Ford algorithm). Weighted longest path in directed acyclic graphs. Matrix multiplication. Sequence alignment. “Hard problems" (       -hard problems) Subset Sum, Knapsack, Steiner Tree, Set Cover, Traveling Salesman Problem. Problems on graphs of small treewidth. If counting version is solved faster, then a big open question is solved.

2 Subset Sum (Chapter 5)

Subset Sum                       Given:     integers                  and integer    Asked: is there                          such that             

Subset Sum                       Given:     integers                  and integer    Asked: is there                          such that              Example {1 2 3 4 5 6 7 8 9 10 11 12},   = 50

Subset Sum                       Given:     integers                  and integer    Asked: is there                          such that              Example {1 2 3 4 5 6 7 8 9 10 11 12},   = 50

Subset Sum Integers: Target: Oef.... 3 20 58 90 267 493 869 961 1000 1153 1246 1598 1766 1922

Subset Sum Integers: Target: Oef.... 3 20 58 90 267 493 869 961 1000 1153 1246 1598 1766 1922

Subset Sum Integers: Target: Oef.... In fact, I even know there are 5 solutions! 3 20 58 90 267 493 869 961 1000 1153 1246 1598 1766 1922

Subset Sum Integers: Target: Oef.... In fact, I even know there are 5 solutions! How did I find I out? 3 20 58 90 267 493 869 961 1000 1153 1246 1598 1766 1922

Subset Sum Integers: Target: Oef.... In fact, I even know there are 5 solutions! How did I find I out? 3 20 58 90 267 493 869 961 1000 1153 1246 1598 1766 1922

Subset Sum Integers: Target: Oef.... In fact, I even know there are 5 solutions! How did I find I out? 3 20 58 90 267 493 869 961 1000 1153 1246 1598 1766 1922

Subset Sum Integers: Target: Oef.... In fact, I even know there are 5 solutions! How did I find I out? 3 20 58 90 267 493 869 961 1000 1153 1246 1598 1766 1922

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ?

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply Apply -1

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply Apply -1

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply Apply -1

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply Apply -1

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply Apply -1

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply Apply -1

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply Apply -1

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply Apply -1

1 2 ... 14 3 4 5 6 7 8 9 10 5842 ? 1 2 ... 14 3 4 5 6 7 8 9 10 5842 Apply Apply -1

Subset Sum Bellman(1950’s): Can be solved in time and space. In the thesis: Can be solved in           time and            space.

3 Steiner Tree (Chapter 3)

Steiner Tree . Given: Graph , terminal vertices and integer .                           Given: Graph                   , terminal vertices              and integer   . Asked: Is there              such that             ,              and          connected?          .

Steiner Tree . Given: Graph , terminal vertices and integer .                           Given: Graph                   , terminal vertices              and integer   . Asked: Is there              such that             ,              and          connected?          .

Steiner Tree Resembles many network design problems. Often, the original network (the graph     ) is huge, but there a relatively few terminals. So can we give algorithms exploiting this?

Steiner Tree Resembles many network design problems. Often, the original network (the graph     ) is huge, but there a relatively few terminals. So can we give algorithms exploiting this? Dreyfus & Wagner (1972): can be solved in                time and space. Björklund et al. (2006): can be solved in                time and space. Fuchs et al. (2007):                         time and space for the (orginal) weighted variant. Fomin et al. (2008):                              time and            space.

Steiner Tree Resembles many network design problems. Often, the original network (the graph     ) is huge, but there a relatively few terminals. So can we give algorithms exploiting this? Dreyfus & Wagner (1972): can be solved in                time and space. Björklund et al. (2006): can be solved in                time and space. Fuchs et al. (2007):                         time and space for the (orginal) weighted variant. Fomin et al. (2008):                              time and            space. This thesis:                time and            space.

1 2 ... |V| 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1111 ?

1 2 ... |V| 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1111

1 2 ... |V| 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1111 ? 1 2 ... |V| 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1111 Apply Apply -1

1 2 ... |V| 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1111 ? 1 2 ... |V| 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1111 Apply Apply -1

Steiner Tree In the thesis a combinatorial interpretation of the space efficient algorithm is also given by introducing the notion of branching walks.

Steiner Tree In the thesis a combinatorial interpretation of the space efficient algorithm is also given by introducing the notion of branching walks. d h d k g i a b e j f l c

Steiner Tree In the thesis a combinatorial interpretation of the space efficient algorithm is also given by introducing the notion of branching walks. d h d k a g h g i a b e j f l c

Steiner Tree In the thesis a combinatorial interpretation of the space efficient algorithm is also given by introducing the notion of branching walks. d h d k a g h g i a b i j e d j f l c

Steiner Tree In the thesis a combinatorial interpretation of the space efficient algorithm is also given by introducing the notion of branching walks. d h d k a g h g i b i a j e d j f l c f l f

1 2 ... |V| 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1111 1 2 ... |V| 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1111 Apply Count the number of branching walks in the graph obtained by removing a certain subset of the terminals. Apply -1

4 Steiner Tree on graphs of small treewidth (Chapter 7)

Graphs of small treewidth Means the graph is decomposable in small pieces of size at most treewidth. Important concept, for example all planar graphs have small treewidth (           ). An efficient decomposition can be used to solve many graph problems quickly using dynamic programming. For connectivity problems like                           the best known algorithm used            time where    is the treewidth by DP.

Graphs of small treewidth Means the graph is decomposable in small pieces of size at most treewidth. Important concept, for example all planar graphs have small treewidth (           ). An efficient decomposition can be used to solve many graph problems quickly using dynamic programming. For connectivity problems like                           the best known algorithm used            time where    is the treewidth by DP. We show that this can be improved to             for some constant   .

graphs Definition A simplification of graphs of treewidth ~ . Graph on           vertices ordered in    rows and     columns Only edges between vertices in adjacent columns.

graphs Definition Example (with and ): A simplification of graphs of treewidth ~  . Definition Graph on           vertices ordered in    rows and     columns Only edges between vertices in adjacent columns. Example (with           and            ):

graphs Definition Example (with and ): A simplification of graphs of treewidth ~  . Definition Graph on           vertices ordered in    rows and     columns Only edges between vertices in adjacent columns. Example (with           and            ):

graphs Definition Example (with and ): A simplification of graphs of treewidth ~  . Definition Graph on           vertices ordered in    rows and     columns Only edges between vertices in adjacent columns. Example (with           and            ):

graphs Definition Example (with and ): A simplification of graphs of treewidth ~  . Definition Graph on           vertices ordered in    rows and     columns Only edges between vertices in adjacent columns. Example (with           and            ):

Steiner Tree on           graphs An example with            

Steiner Tree on           graphs An example with            

Steiner Tree on           graphs We introduce the notion of cut object: a pair of a subset X of vertices and a blue-white coloring of X such that: The top-left terminal is colored blue If both endpoints of an edge are in X they must have the same color.

Steiner Tree on graphs An example with We introduce the notion of cut object: a pair of a subset X of vertices and a blue-white coloring of X such that: The top-left terminal is colored blue If both endpoints of an edge are in X they must have the same color. An example with            

Steiner Tree on graphs A cut object. We introduce the notion of cut object: a pair of a subset X of vertices and a blue-white coloring of X such that: The top-left terminal is colored blue If both endpoints of an edge are in X they must have the same color. A cut object.

Steiner Tree on graphs A cut object. Then we transform the Steiner problem to counting the number of cut objects. This is possible since the number of cut objects is equal to the number of Steiner tree solutions modulo 2. Counting cut objects can be done quick with standard techniques (in fact, dynamic programming again!). A cut object.

Steiner Tree on graphs A cut object. Then we transform the Steiner problem to counting the number of cut objects. This is possible since the number of cut objects is equal to the number of Steiner tree solutions modulo 2. Counting cut objects can be done quick with standard techniques (in fact, dynamic programming again!). A cut object.

5 Hardness of Set Cover (Chapter 8)

Set Cover Given: A bipartite graphs                      Given: A bipartite graphs                   Asked: Find             of minimum size such that every            has a neighbor in     .

Set Cover Given: A bipartite graphs                      Given: A bipartite graphs                   Asked: Find             of minimum size such that every            has a neighbor in     .         

Set Cover Given: A bipartite graphs                      Given: A bipartite graphs                   Asked: Find             of minimum size such that every            has a neighbor in     .         

Set Cover Given: A bipartite graphs                      Given: A bipartite graphs                   Asked: Find             of minimum size such that every            has a neighbor in     . Can be solved in               by brute force Can be solved in                by DP No improvements known. Using a (fairly) famous hypothesis we prove the brute force can not be improved.

Set Cover Given: A bipartite graphs                         Given: A bipartite graphs                   Asked: Is the number of             such that every            has a neighbor, in      even? Can be solved in               by brute force Can be solved in                by DP No improvements known. Using a (fairly) famous hypothesis we prove the brute force can not be improved.

Set Cover Given: A bipartite graphs                         Given: A bipartite graphs                   Asked: Is the number of             such that every            has a neighbor in     , even? Can be solved in               by brute force Can be solved in                by DP No improvements known. Using a (fairly) famous hypothesis we prove the brute force and DP can not be improved.

Set Cover “The Flip”: Given: A bipartite graphs                         Given: A bipartite graphs                   Asked: Is the number of             such that every            has a neighbor in     , even?          “The Flip”:

Set Cover “The Flip”: Given: A bipartite graphs                         Given: A bipartite graphs                   Asked: Is the number of             such that every            has a neighbor in     , even?                   “The Flip”: It does not matter!!

6 Further remarks and conclusion

Further remarks Chapter 6 studies transformations for the case when the table is sparse that is, contains lots of zeros. In several cases, improvement is possible even when only the last `segment’ is guaranteed to be sparse Work in progress.

Conclusion Conventional DP algorithms that evaluate a (cleverly constructed) recurrence in a naive way, can often be significantly improved using transformations.

Conclusion Conventional DP algorithms that evaluate a (cleverly constructed) recurrence in a naive way, can often be significantly improved using transformations. (!)

Conclusion Conventional DP algorithms that evaluate a (cleverly constructed) recurrence in a naive way, can often be significantly improved using transformations. (!) Many interesting open problems The project will be continued from February Be welcome to join!

End of presentation