implementing fixed parameter algorithms
play

Implementing Fixed-Parameter Algorithms Falk Hffner Institut fr - PowerPoint PPT Presentation

Data Implementation Evaluation Implementing Fixed-Parameter Algorithms Falk Hffner Institut fr Softwaretechnik und Theoretische Informatik, TU Berlin 20 November 2012 Falk Hffner (TU Berlin) Implementing Fixed-Parameter Algorithms


  1. Data Implementation Evaluation Implementing Fixed-Parameter Algorithms Falk Hüffner Institut für Softwaretechnik und Theoretische Informatik, TU Berlin 20 November 2012 Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 1/20

  2. Data Implementation Evaluation Real-world instances Recommendation Use real-world data. Easier to “sell” Analysis might lead to new insights and approaches More fun Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 2/20

  3. Data Implementation Evaluation Real-world instance sources Databases Biological networks Social networks Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 3/20

  4. Data Implementation Evaluation Real-world instance sources Databases Biological networks Social networks Web crawling DBLP coauthor graph Song similarity graph (last.fm) Stock correlation graph Wikipedia inter-language links Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 3/20

  5. Data Implementation Evaluation Real-world instance sources Databases Biological networks Social networks Web crawling DBLP coauthor graph Song similarity graph (last.fm) Stock correlation graph Wikipedia inter-language links Cooperation Statistics visualization Power line network Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 3/20

  6. Data Implementation Evaluation Parameters solution size distance from tractable instances (e. g. treewidth) structural parameters (e. g. vertex cover size) Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 4/20

  7. Data Implementation Evaluation Parameters solution size distance from tractable instances (e. g. treewidth) structural parameters (e. g. vertex cover size) Advertisement Graphana (http://fpt.akt.tu-berlin.de/graphana/) is a tool that calculates parameters of graphs such as treewidth, connectivity, vertex cover size, cluster vertex deletion number, cluster editing number, h -index, degeneracy, feedback vertex set size, dominating set size, . . . Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 4/20

  8. Data Implementation Evaluation Randomly generated instances Advantages of randomly generated instances Can have any number and size Can track relation between performance and parameters Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 5/20

  9. Data Implementation Evaluation Randomly generated instances Advantages of randomly generated instances Can have any number and size Can track relation between performance and parameters Types: Application oriented: Phylogenetic trees Web graphs DNA sequences general Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 5/20

  10. Data Implementation Evaluation Example: Colorful Components C OLORFUL C OMPONENTS Instance: An undirected graph G = ( V , E ) and a coloring of the vertices χ : V → { 1 , . . . , c } . Task: Delete a minimum number k of edges such that all connected components are colorful , that is, they do not contain two vertices of the same color. Parameter: k Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 6/20

  11. Data Implementation Evaluation Example: Colorful Components C OLORFUL C OMPONENTS Instance: An undirected graph G = ( V , E ) and a coloring of the vertices χ : V → { 1 , . . . , c } . Task: Delete a minimum number k of edges such that all connected components are colorful , that is, they do not contain two vertices of the same color. Parameter: k Random model: c : number of colors; n : number of vertices; p v : probability that a component contains a vertex of a certain color; p e : edge probability within component; p x : edge probability between components. Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 6/20

  12. Data Implementation Evaluation A simple solver Recommendation Implement a solver that is as simple as possible. Advantages fi rst impression on what solutions look like base line for fi nding bugs Typically simplest: Branching Integer Linear Programming (ILP) Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 7/20

  13. Data Implementation Evaluation Graph Bipartization Graph Bipartization : Find a minimum size set of vertices in a graph whose removal results in the graph being bipartite. Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 8/20

  14. Data Implementation Evaluation Graph Bipartization Graph Bipartization : Find a minimum size set of vertices in a graph whose removal results in the graph being bipartite. Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 8/20

  15. Data Implementation Evaluation ILP for Graph Bipartization c 1 , . . . , c n : binary variables (cover) s 1 , . . . , s n : binary variables (color) Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 9/20

  16. Data Implementation Evaluation ILP for Graph Bipartization c 1 , . . . , c n : binary variables (cover) s 1 , . . . , s n : binary variables (color) n � minimize c i i = 1 Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 9/20

  17. Data Implementation Evaluation ILP for Graph Bipartization c 1 , . . . , c n : binary variables (cover) s 1 , . . . , s n : binary variables (color) n � minimize c i i = 1 s. t. ∀ { v , w } ∈ E : ( s v � = s w ) ∨ c v ∨ c w Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 9/20

  18. Data Implementation Evaluation ILP for Graph Bipartization c 1 , . . . , c n : binary variables (cover) s 1 , . . . , s n : binary variables (color) n � minimize c i i = 1 s. t. ∀ { v , w } ∈ E : ( s v � = s w ) ∨ c v ∨ c w which can be expressed as an ILP constraint as s. t. ∀ { v , w } ∈ E : s v + s w + ( c v + c w ) � 1 ∀ { v , w } ∈ E : s v + s w − ( c v + c w ) � 1 Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 9/20

  19. Data Implementation Evaluation Implementation language Recommendation Use a high-level programming language. Advantages more rapid development of typically exponential speedups, but only constant-factor slowdown persistent data structures allow simpler and less error-prone implementation of branching algorithms Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 10/20

  20. Data Implementation Evaluation Debugging Recommendation Verify that your solution is a solution. Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 11/20

  21. Data Implementation Evaluation Debugging Recommendation Verify that your solution is a solution. Recommendation Make automated tests that compare the result of the simple solver with that of the optimized solver, on randomly generated test cases. Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 11/20

  22. Data Implementation Evaluation Debugging Recommendation Verify that your solution is a solution. Recommendation Make automated tests that compare the result of the simple solver with that of the optimized solver, on randomly generated test cases. Recommendation Use a test case minimization tool (e. g. http://delta.tigris.org/). Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 11/20

  23. Data Implementation Evaluation Debugging Recommendation Verify that your solution is a solution. Recommendation Make automated tests that compare the result of the simple solver with that of the optimized solver, on randomly generated test cases. Recommendation Use a test case minimization tool (e. g. http://delta.tigris.org/). Recommendation Use version control. Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 11/20

  24. Data Implementation Evaluation Data reduction Recommendation Implement data reduction rules. Advantages can be combined with approximation, heuristics, fi xed-parameter, or other exact algorithms often very effective, even solve the whole instance normally, the more, the better Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 12/20

  25. Data Implementation Evaluation Heuristic speedups Heuristic speedups in branching algorithms: Heuristic branching priorities Lower bounds Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 13/20

  26. Data Implementation Evaluation Benchmark set Recommendation Create a benchmark set using the randomized generator and parameter settings that match those measured in the real-world instances. Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 14/20

  27. Data Implementation Evaluation Benchmark set Recommendation Create a benchmark set using the randomized generator and parameter settings that match those measured in the real-world instances. c ∈ { 3 , 5 , 8 } , n ∈ { 60 , 100 , 170 } , p v ∈ { 0 . 4 , 0 . 6 , 0 . 9 } , p e ∈ { 0 . 4 , 0 . 6 , 0 . 9 } , p x ∈ { 0 . 01 , 0 . 02 , 0 . 04 } . Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 14/20

  28. Data Implementation Evaluation Comparison of algorithms Time measurements depend on Machine Compiler options Program name Weather . . . Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 15/20

  29. Data Implementation Evaluation Comparison of algorithms Time measurements depend on Machine Compiler options Program name Weather . . . For exponential-time algorithms, averages of running time are useless. Falk Hüffner (TU Berlin) Implementing Fixed-Parameter Algorithms 15/20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend