Maximum Flow and Dynamic Programming 11-25-2003. Opening Discussion zWho can describe a flow network to me. What are the properties it has and what types.

Slides:



Advertisements
Similar presentations
Algorithm Design Methodologies Divide & Conquer Dynamic Programming Backtracking.
Advertisements

Dynamic Programming.
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
Network Optimization Models: Maximum Flow Problems
CSE 326: Data Structures Network Flow and APSP Ben Lerner Summer 2007.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
The Maximum Network Flow Problem. CSE Network Flows.
Lectures on Network Flows
Nick McKeown Spring 2012 Maximum Matching Algorithms EE384x Packet Switch Architectures.
Dynamic Programming Part 1: intro and the assembly-line scheduling problem.
CS138A Network Flows Peter Schröder. CS138A Flow Networks Definitions a flow network G=(V,E) is a directed graph in which each edge (u,v)
CSC 2300 Data Structures & Algorithms April 17, 2007 Chapter 9. Graph Algorithms.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
Lecture 34 CSE 331 Nov 30, Graded HW 8 On Wednesday.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2004 Lecture 5 Wednesday, 10/6/04 Graph Algorithms: Part 2.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Assignment 4. (Due on Dec 2. 2:30 p.m.) This time, Prof. Yao and I can explain the questions, but we will NOT tell you how to solve the problems. Question.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
1 Scheduling Crossbar Switches Who do we chose to traverse the switch in the next time slot? N N 11.
Lecture 5 Dynamic Programming. Dynamic Programming Self-reducibility.
MAX FLOW CS302, Spring 2013 David Kauchak. Admin.
Dynamic Programming Opening Discussion zDo you have any questions about the quiz? zWhat did we talk about last class? zDo you have any questions.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
Dynamic Programming. Well known algorithm design techniques:. –Divide-and-conquer algorithms Another strategy for designing algorithms is dynamic programming.
Lecture 16 Maximum Matching. Incremental Method Transform from a feasible solution to another feasible solution to increase (or decrease) the value of.
Network Flow How to solve maximal flow and minimal cut problems.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 11, 2014.
1 Summary: Design Methods for Algorithms Andreas Klappenecker.
Single Source Shortest-Path: The General Case (with negative edges) Bellman-Ford algorithm. Iteratively relax all edges |V|-1 times Running time? O(VE).
CS 473Lecture ?1 CS473-Algorithms I Lecture ? Network Flows Finding Max Flow.
Backtracking Opening Discussion zWhat did we talk about last class? zDo you have any questions about the assignments?
& 6.855J & ESD.78J Algorithm Visualization The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem.
The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem Thanks to Jim Orlin & MIT OCW.
CS223 Advanced Data Structures and Algorithms 1 Maximum Flow Neil Tang 3/30/2010.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
Computer Sciences Department1.  Property 1: each node can have up to two successor nodes (children)  The predecessor node of a node is called its.
Announcements Finish up Network Flow today Then Review for Final on Monday ◦ HW#5 is due on Monday, let me or the TA’s know if you have trouble starting.
Algorithm Design and Analysis (ADA)
Chapter 7 May 3 Ford-Fulkerson algorithm Step-by-step walk through of an example Worst-case number of augmentations Edmunds-Karp modification Time complexity.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
EMIS 8374 The Ford-Fulkerson Algorithm (aka the labeling algorithm) Updated 4 March 2008.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 14, 2014.
Maximum Flow Problem Definitions and notations The Ford-Fulkerson method.
CS 312: Algorithm Design & Analysis Lecture #29: Network Flow and Cuts This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6) (6,8) (3,3) (4,4) (4,10)
A greedy algorithm is an algorithm that follows the problem solving heuristic of making the locally optimal choice at each stage with the hope of finding.
The Maximum Network Flow Problem
Stack, Queues, and Priority Queues: Linked List Based
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Honors Track: Competitive Programming & Problem Solving Push-Relabel Algorithm Claire Claassen.
Lecture 5 Dynamic Programming
Lecture 5 Dynamic Programming
Unweighted Shortest Path Neil Tang 3/11/2010
Maximum Flow Solutions
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Course Contents: T1 Greedy Algorithm Divide & Conquer
Augmenting Path Algorithm
Flow Networks and Bipartite Matching
Algorithms (2IL15) – Lecture 7
Lecture 21 Network Flow, Part 1
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
MAXIMUM flow by Eric Wengert.
Augmenting Path Algorithm
Introduction to Maximum Flows
Introduction to Maximum Flows
Maximum Bipartite Matching
Richard Anderson Lecture 22 Network Flow
Presentation transcript:

Maximum Flow and Dynamic Programming

Opening Discussion zWho can describe a flow network to me. What are the properties it has and what types of systems can be modeled with it? zDo you have any questions about the assignment? You should submit assignment #5 today.

Solving Maximum Flow zWe solve this with the Ford-Fulkerson method. There are many algorithms for implementing this method. zThe idea is that we repeatedly add “augmenting paths” to the flow. That is a path from source to sink that adds something to the current flow. zGiven a network and flow the residual is the difference between capacity and flow.

Augmenting Paths zAn augmenting path in a flow network is a path from the source to the sink along edges where the current flow is less than the capacity. zGiven such a path, the flow it can sustain is the edge on the path with the lowest difference between the capacity and the current flow.

The Basic Algorithm zIn the basic algorithm we initialize all the flows to zero first. zWhile there is an augmenting path p, we find the edge with minimum additional capacity, c f (p). Then we go through all the edges, (u,v), in p and increment the flow from u to v by c f (p) while setting the reverse flow to that value. zThis runs in O(E |f * |) time.

Edmonds-Karp Algorithm zWe can enhance the basic algorithm by making it so that they choice of augmenting path is made with a breadth first search. This way we always pick the shortest augmenting path. zThis gives an algorithm that runs in O(V E 2 ) time.

Basics of Dynamic Programming zDynamic programming is a technique typically applied to optimization problems. It can be used for the same types of problems we might normally use divide-and-conquer on, but it is more optimal if the sub-problems in divide and conquer would repeat work. zThe steps in doing it are yCharacterize the structure of a solution yMake a recursive definition of solution yCompute value of optimal solution bottom-up yConstruct solution from earlier information

Requirements and Sample Problems zIn order for dynamic programming to work, the problem has to have optimal substructure. That is to say that the optimal solution is built from optimal solutions to smaller problems. zFibonacci numbers are a prime example of where dynamic programming can be efficiently used. zThe 0/1 knapsack problem is another example.

Minute Essay zExplain why dynamic programming can be much faster than normal recursive algorithms for some problems. zThe semester is quickly winding down. We will have quiz #6 on Tuesday after Thanksgiving. zHave a Happy Thanksgiving!