
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 . .9 3.4 The single source shortest paths . .9 3.5 The bipartite matching problem . 11 3.6 Summary of classes of network flow problems . 13 3.7 Negative cost cycles in graphs . 14 4 Other network problems 15 4.1 Eulerian tour . 15 4.1.1 Eulerian walk . 16 4.2 Chinese postman problem . 16 4.2.1 Undirected chinese postman problem . 16 4.2.2 Directed chinese postman problem . 16 4.2.3 Mixed chinese postman problem . 17 4.3 Hamiltonian tour problem . 17 4.4 Traveling salesman problem (TSP) . 17 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 20 5.1 Measuring quality of an algorithm . 20 5.1.1 Examples . 20 5.2 Growth of functions . 23 i IEOR 266 notes: Updated 2020 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 . 25 6 Graph representations 26 6.1 Node-arc adjacency matrix . 26 6.2 Node-node adjacency matrix . 26 6.3 Node-adjacency list . 27 6.4 Comparison of the graph representations . 28 6.4.1 Storage efficiency comparison . 28 6.4.2 Advantages and disadvantages comparison . 28 7 Graph search algorithms 28 7.1 Generic search algorithm . 28 7.2 Breadth first search (BFS) . 29 7.3 Depth first search (DFS) . 30 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 . 32 8 Shortest paths 32 8.1 Introduction . 32 8.2 Properties of DAGs . 32 8.2.1 Topological sort and directed acyclic graphs . 33 8.3 Properties of shortest paths . 34 8.4 Alternative formulation for SP from s to t ........................ 35 8.5 Shortest paths on a directed acyclic graph (DAG) . 35 8.6 Applications of the shortest/longest path problem on a DAG . 36 8.7 Dijkstra's algorithm . 39 8.8 Bellman-Ford algorithm for single source shortest paths . 42 8.9 Floyd-Warshall algorithm for all pairs shortest paths . 44 8.10 D.B. Johnson's algorithm for all pairs shortest paths . 45 8.11 Matrix multiplication algorithm for all pairs shortest paths . 46 8.12 Why finding shortest paths in the presence of negative cost cycles is difficult . 47 9 Maximum flow problem 48 9.1 Introduction . 48 9.2 Linear programming duality and max flow min cut . 49 9.3 Applications . 50 9.3.1 Hall's theorem . 50 9.3.2 The selection problem . 52 9.3.3 Vertex cover on bipartite graphs . 54 9.3.4 Forest clearing . 55 9.3.5 Producing memory chips (VLSI layout) . 57 9.4 Flow Decomposition . 57 9.5 Algorithms . 58 IEOR 266 notes: Updated 2020 iii 9.5.1 Ford-Fulkerson algorithm . 59 9.5.2 Maximum capacity augmenting path algorithm . 61 9.5.3 Capacity scaling algorithm . 62 9.5.4 Dinic's algorithm for maximum flow . 63 10 Goldberg's Algorithm - the Push/Relabel Algorithm 69 10.1 Overview . 69 10.2 The Generic Algorithm . 70 10.3 Variants of Push/Relabel Algorithm . 74 10.4 Wave Implementation of Goldberg's Algorithm (Lift-to-front) . 74 11 The pseudoflow algorithm (Hochbaum's PseudoFlow HPF) 75 11.1 Initialization . 76 11.2 A labeling pseudoflow algorithm . 76 11.3 The monotone pseudoflow algorithm . 77 11.4 Complexity summary . 78 12 The minimum spanning tree problem (MST) 80 12.1 IP formulation . 80 12.2 Properties of MST . 81 12.2.1 Cut Optimality Condition . 81 12.2.2 Path Optimality Condition . 82 12.3 Algorithms of MST . 83 12.3.1 Prim's algorithm . 83 12.3.2 Kruskal's algorithm . 84 12.4 Maximum spanning tree . 86 13 Complexity classes and NP-completeness 86 13.1 Search vs. Decision . 86 13.2 The class NP ........................................ 87 13.2.1 Some Problems in NP ............................... 88 13.3 co-NP ............................................ 88 13.3.1 Some Problems in co-NP ............................. 89 13.4 NP and co-NP ....................................... 89 13.5 NP-completeness and reductions . 90 13.5.1 Reducibility . 90 13.5.2 NP-Completeness . 91 14 Approximation algorithms 94 14.1 Traveling salesperson problem (TSP) . 95 15 Integer programs with two variables per inequality (IP2) 97 15.1 A practical example: open-pit mining . 97 15.2 The maximum closure problem . 98 15.3 Monotone IP2 . 101 15.4 Non{monotone IP2 . 103 15.5 2-approximations for integer programs with two variables per inequality . 104 15.5.1 The quality of the bound provided by the monotonized system . 104 15.5.2 Computing an approximate solution . ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages130 Page
-
File Size-