IEOR 266: Graph Algorithms and Network Flows

IEOR 266: Graph Algorithms and Network Flows

Lecture Notes for IEOR 266: Graph Algorithms and Network Flows Professor Dorit S. Hochbaum Contents 1 Introduction 1 1.1 Assignment problem .................................... 1 1.2 Basic graph definitions ................................... 2 2 Totally unimodular matrices 4 3 Minimum cost network flow problem 5 3.1 Transportation problem .................................. 7 3.2 The maximum flow problem ................................ 8 3.3 The shortest path problem ................................. 8 3.4 The single source shortest paths ............................. 9 3.5 The bipartite matching problem ............................. 11 3.6 Summary of classes of network flow problems ...................... 12 3.7 Negative cost cycles in graphs ............................... 13 4 Other network problems 14 4.1 Eulerian tour ........................................ 14 4.1.1 Eulerian walk .................................... 15 4.2 Chinese postman problem ................................. 15 4.2.1 Undirected chinese postman problem ....................... 16 4.2.2 Directed chinese postman problem ........................ 16 4.2.3 Mixed chinese postman problem ......................... 16 4.3 Hamiltonian tour problem ................................. 16 4.4 Traveling salesman problem (TSP) ............................ 16 4.5 Vertex packing problems (Independent Set) ....................... 17 4.6 Maximum clique problem ................................. 17 4.7 Vertex cover problem .................................... 17 4.8 Edge cover problem .................................... 18 4.9 b-factor (b-matching) problem ............................... 18 4.10 Graph colorability problem ................................ 18 4.11 Minimum spanning tree problem ............................. 19 5 Complexity analysis 19 5.1 Measuring quality of an algorithm ............................ 19 5.1.1 Examples ...................................... 20 5.2 Growth of functions .................................... 23 i IEOR 266 notes: Updated 2018 ii 5.3 Definitions for asymptotic comparisons of functions ................... 23 5.4 Properties of asymptotic notation ............................. 23 5.5 Caveats of complexity analysis .............................. 24 5.6 A sketch of the ellipsoid method ............................. 24 6 Graph representations 25 6.1 Node-arc adjacency matrix ................................ 25 6.2 Node-node adjacency matrix ............................... 26 6.3 Node-arc adjacency list .................................. 26 6.4 Comparison of the graph representations ......................... 27 6.4.1 Storage efficiency comparison ........................... 27 6.4.2 Advantages and disadvantages comparison .................... 27 7 Graph search algorithms 27 7.1 Generic search algorithm .................................. 27 7.2 Breadth first search (BFS) ................................. 28 7.3 Depth first search (DFS) .................................. 29 7.4 Applications of BFS and DFS ............................... 30 7.4.1 Checking if a graph is strongly connected .................... 30 7.4.2 Checking if a graph is acyclic ........................... 31 7.4.3 Checking if a graph is bipartite .......................... 31 8 Shortest paths 31 8.1 Introduction ......................................... 31 8.2 Properties of DAGs ..................................... 32 8.2.1 Topological sort and directed acyclic graphs ................... 32 8.3 Properties of shortest paths ................................ 33 8.4 Alternative formulation for SP from s to t ........................ 34 8.5 Shortest paths on a directed acyclic graph (DAG) .................... 35 8.6 Applications of the shortest/longest path problem on a DAG . 35 8.7 Dijkstra's algorithm .................................... 39 8.8 Bellman-Ford algorithm for single source shortest paths . 41 8.9 Floyd-Warshall algorithm for all pairs shortest paths . 43 8.10 D.B. Johnson's algorithm for all pairs shortest paths . 44 8.11 Matrix multiplication algorithm for all pairs shortest paths . 45 8.12 Why finding shortest paths in the presence of negative cost cycles is difficult . 46 9 Maximum flow problem 47 9.1 Introduction ......................................... 47 9.2 Linear programming duality and max flow min cut ................... 48 9.3 Applications ......................................... 49 9.3.1 Hall's theorem ................................... 49 9.3.2 The selection problem ............................... 50 9.3.3 Vertex cover on bipartite graphs ......................... 53 9.3.4 Forest clearing ................................... 54 9.3.5 Producing memory chips (VLSI layout) ..................... 55 9.4 Flow Decomposition .................................... 56 9.5 Algorithms ......................................... 57 IEOR 266 notes: Updated 2018 iii 9.5.1 Ford-Fulkerson algorithm ............................. 58 9.5.2 Maximum capacity augmenting path algorithm . 60 9.5.3 Capacity scaling algorithm ............................ 61 9.5.4 Dinic's algorithm for maximum flow ....................... 63 10 Goldberg's Algorithm - the Push/Relabel Algorithm 68 10.1 Overview .......................................... 68 10.2 The Generic Algorithm .................................. 69 10.3 Variants of Push/Relabel Algorithm ........................... 72 10.4 Wave Implementation of Goldberg's Algorithm (Lift-to-front) . 73 11 The pseudoflow algorithm (Hochbaum's PseudoFlow HPF) 74 11.1 Initialization ........................................ 74 11.2 A labeling pseudoflow algorithm ............................. 75 11.3 The monotone pseudoflow algorithm ........................... 75 11.4 Complexity summary .................................... 76 12 The minimum spanning tree problem (MST) 79 12.1 IP formulation ....................................... 79 12.2 Properties of MST ..................................... 80 12.2.1 Cut Optimality Condition ............................. 80 12.2.2 Path Optimality Condition ............................ 80 12.3 Algorithms of MST ..................................... 81 12.3.1 Prim's algorithm .................................. 82 12.3.2 Kruskal's algorithm ................................ 83 12.4 Maximum spanning tree .................................. 83 13 Complexity classes and NP-completeness 85 13.1 Search vs. Decision ..................................... 85 13.2 The class NP ........................................ 86 13.2.1 Some Problems in NP ............................... 86 13.3 co-NP ............................................ 87 13.3.1 Some Problems in co-NP ............................. 87 13.4 NP and co-NP ....................................... 87 13.5 NP-completeness and reductions ............................. 88 13.5.1 Reducibility ..................................... 88 13.5.2 NP-Completeness .................................. 89 14 Approximation algorithms 93 14.1 Traveling salesperson problem (TSP) ........................... 94 15 Integer programs with two variables per inequality (IP2) 95 15.1 A practical example: open-pit mining .......................... 95 15.2 The maximum closure problem .............................. 97 15.3 Monotone IP2 ........................................100 15.4 Non{monotone IP2 .....................................102 15.5 2-approximations for integer programs with two variables per inequality . 103 15.5.1 The quality of the bound provided by the monotonized system . 103 15.5.2 Computing an approximate solution . 104 IEOR 266 notes: Updated 2018 iv 15.6 Vertex cover problem ....................................105 15.6.1 Vertex cover on bipartite graphs . 105 15.6.2 Vertex cover on general graphs . 106 15.7 The s-excess problem ....................................108 16 Necessary and Sufficient Condition for Feasible Flow in a Network 109 16.1 For a network with zero lower bounds . 109 16.2 In the presence of positive lower bounds . 110 16.3 For a circulation problem .................................110 16.4 For the transportation problem ..............................110 17 Planar Graphs 111 17.1 Properties of Planar Graphs ................................112 17.2 Geometric Dual of Planar Graph .............................113 17.3 s-t Planar Flow Network ..................................114 17.4 Min Cut in an Undirected Weighted s-t Planar Flow Network . 114 17.5 Max Flow in a Undirected Weighted s-t Planar Flow Network . 114 18 Cut Problems and Algorithms 115 18.1 Network Connectivity ...................................115 18.2 Matula's Algorithm .....................................116 18.3 Brief Review of Additional Results ............................117 19 Algorithms for MCNF 118 19.1 Network Simplex ......................................118 19.2 (T,L,U) structure of an optimal solution . 119 19.3 Simplex' basic solutions and the corresponding spanning trees . 119 19.4 Optimality Conditions ...................................120 19.5 Implied algorithms { Cycle cancelling . 121 19.6 Solving maximum flow as MCNF .............................122 19.7 The gap between the primal and dual . 123 These notes are based on \scribe" notes taken by students attending Professor Hochbaum's course IEOR 266. The current version has been updated and edited by Professor Hochbaum in fall 2017. The text book used for the course, and mentioned in the notes, is Network Flows: theory, algo- rithms and applications by Ravindra K. Ahuja, Thomas L. Magnanti and James B. Orlin. Published by Prentice-Hall,

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    128 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us