Reminder: Flow Networks

Similar documents
Flow Networks. Ma/CS 6a. Class 14: Flow Exercises

4/12/12. Applications of the Maxflow Problem 7.5 Bipartite Matching. Bipartite Matching. Bipartite Matching. Bipartite matching: the flow network

Graphs III - Network Flow

Algorithmic Discrete Mathematics 6. Exercise Sheet

Problem Set If all directed edges in a network have distinct capacities, then there is a unique maximum flow.

Network Flows: Introduction & Maximum Flow

Matching. Slides designed by Kevin Wayne.

Algorithm Design and Analysis

Admin MAX FLOW APPLICATIONS. Flow graph/networks. Flow constraints 4/30/13. CS lunch today Grading. in-flow = out-flow for every vertex (except s, t)

Maximum Flow and Minimum Cut

Randomized Perfect Bipartite Matching

MAXIMUM FLOW. introduction Ford-Fulkerson algorithm maxflow-mincut theorem

Flow networks. Flow Networks. A flow on a network. Flow networks. The maximum-flow problem. Introduction to Algorithms, Lecture 22 December 5, 2001

Soviet Rail Network, 1955

Network Flow. Data Structures and Algorithms Andrei Bulatov

Algorithm Design and Analysis

CS4445/9544 Analysis of Algorithms II Solution for Assignment 1

Today s topics. CSE 421 Algorithms. Problem Reduction Examples. Problem Reduction. Undirected Network Flow. Bipartite Matching. Problem Reductions

Soviet Rail Network, 1955

1 Motivation and Basic Definitions

Today: Max Flow Proofs

CSE 521: Design & Analysis of Algorithms I

Maximum Flow in Planar Graphs

Max Flow, Min Cut COS 521. Kevin Wayne Fall Soviet Rail Network, Cuts. Minimum Cut Problem. Flow network.

18 Extensions of Maximum Flow

! Abstraction for material flowing through the edges. ! G = (V, E) = directed graph, no parallel edges.

The Residual Graph. 12 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm

The Residual Graph. 11 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm

CSC 364S Notes University of Toronto, Spring, The networks we will consider are directed graphs, where each edge has associated with it

Ma/CS 6a Class 15: Flows and Bipartite Graphs

Flow networks, flow, maximum flow. Some definitions. Edmonton. Saskatoon Winnipeg. Vancouver Regina. Calgary. 12/12 a.

Greedy. I Divide and Conquer. I Dynamic Programming. I Network Flows. Network Flow. I Previous topics: design techniques

CS 473G Lecture 15: Max-Flow Algorithms and Applications Fall 2005

Algorithms and Data Structures 2011/12 Week 9 Solutions (Tues 15th - Fri 18th Nov)

6/3/2009. CS 244 Algorithm Design Instructor: t Artur Czumaj. Lecture 8 Network flows. Maximum Flow and Minimum Cut. Minimum Cut Problem.

Main Reference: Sections in CLRS.

7.5 Bipartite Matching. Chapter 7. Network Flow. Matching. Bipartite Matching

16 Max-Flow Algorithms and Applications

7.5 Bipartite Matching. Chapter 7. Network Flow. Matching. Bipartite Matching

CSE 421 Introduction to Algorithms Winter The Network Flow Problem

They were originally developed for network problem [Dantzig, Ford, Fulkerson 1956]

Introduction to SLE Lecture Notes

CHAPTER 7: SECOND-ORDER CIRCUITS

3/3/2015. Chapter 7. Network Flow. Maximum Flow and Minimum Cut. Minimum Cut Problem

CS Lunch This Week. Special Talk This Week. Soviet Rail Network, Flow Networks. Slides20 - Network Flow Intro.key - December 5, 2016

Maximum Flow. Contents. Max Flow Network. Maximum Flow and Minimum Cut

Maximum Flow. How do we transport the maximum amount data from source to sink? Some of these slides are adapted from Lecture Notes of Kevin Wayne.

EECE 301 Signals & Systems Prof. Mark Fowler

Introduction to Congestion Games

Algorithms. Algorithms 6.4 MAXIMUM FLOW

Topics in Combinatorial Optimization May 11, Lecture 22

26.1 Flow networks. f (u,v) = 0.

Selfish Routing. Tim Roughgarden Cornell University. Includes joint work with Éva Tardos

7. NETWORK FLOW II. Soviet rail network (1950s) Max-flow and min-cut applications. "Free world" goal. Cut supplies (if cold war turns into real war).

Price of Stability and Introduction to Mechanism Design

April 3, The maximum flow problem. See class notes on website.

Laplace Transform. Inverse Laplace Transform. e st f(t)dt. (2)

Stationary Distribution. Design and Analysis of Algorithms Andrei Bulatov

Network Flow Applications

Ford-Fulkerson Algorithm for Maximum Flow

Network Flows UPCOPENCOURSEWARE number 34414

23 Maximum Flows and Minimum Cuts

arxiv: v1 [cs.cg] 21 Mar 2013

u(t) Figure 1. Open loop control system

20/20 20/20 0/5 0/5 20/20 20/20 5/5 0/5 0/5 5/5 0/20 25/30 20/20 30/30 20/20 0/5 5/5 20/20 0/5 0/5 15/20 15/25 20/20 10/10

2. VECTORS. R Vectors are denoted by bold-face characters such as R, V, etc. The magnitude of a vector, such as R, is denoted as R, R, V

Bipartite Matching. Matching. Bipartite Matching. Maxflow Formulation

Sample Final Exam (finals03) Covering Chapters 1-9 of Fundamentals of Signals & Systems

Maximum Flow 3/3 4/6 1/1 4/7 3/3. s 3/5 1/9 1/1 3/5 2/2. 1/18/2005 4:03 AM Maximum Flow 1

Network flows. The problem. c : V V! R + 0 [ f+1g. flow network G = (V, E, c), a source s and a sink t uv not in E implies c(u, v) = 0

7. NETWORK FLOW II. Minimum cut application (RAND 1950s) Maximum flow application (Tolstoǐ 1930s) Max-flow and min-cut applications

Please Complete Course Survey. CMPSCI 311: Introduction to Algorithms. Approximation Algorithms. Coping With NP-Completeness. Greedy Vertex Cover

6.8 Laplace Transform: General Formulas

Geometric Path Problems with Violations

Resolving Braess s Paradox in Random Networks

, the. L and the L. x x. max. i n. It is easy to show that these two norms satisfy the following relation: x x n x = (17.3) max

Basic Tools CMSC 641. Running Time. Problem. Problem. Algorithmic Design Paradigms. lg (n!) (lg n)! (lg n) lgn n.2

18.03SC Unit 3 Practice Exam and Solutions

introduction Ford-Fulkerson algorithm

To become more mathematically correct, Circuit equations are Algebraic Differential equations. from KVL, KCL from the constitutive relationship

CMPS 6610/4610 Fall Flow Networks. Carola Wenk Slides adapted from slides by Charles Leiserson

Average Case Lower Bounds for Monotone Switching Networks

EXTENDED FORMULATIONS FOR PACKING AND PARTITIONING ORBITOPES

5.2 GRAPHICAL VELOCITY ANALYSIS Polygon Method

Research Article An Upper Bound on the Critical Value β Involved in the Blasius Problem

CHAPTER 7. Definition and Properties. of Laplace Transforms

EXERCISES FOR SECTION 1.5

7. NETWORK FLOW I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 11/22/17 6:11 AM

Physics 240: Worksheet 16 Name

introduction Ford-Fulkerson algorithm

Maximum Flow 5/6/17 21:08. Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015

Research Article On Double Summability of Double Conjugate Fourier Series

Max-flow and min-cut

Discussion Session 2 Constant Acceleration/Relative Motion Week 03

2015 Practice Test #1

How to Solve System Dynamic s Problems

7. NETWORK FLOW I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 11/22/17 6:11 AM

Rough Paths and its Applications in Machine Learning

Chapter 6. Laplace Transforms

Transcription:

0/0/204 Ma/CS 6a Cla 4: Variou (Flow) Execie Reminder: Flow Nework A flow nework i a digraph G = V, E, ogeher wih a ource verex V, a ink verex V, and a capaciy funcion c: E N. Capaciy Source 7 a b c d e Sink

0/0/204 Reminder: Flow in a Nework Given a flow nework G = (V, E,,, c), a flow in G i a funcion f: E N ha aifie Every e E aifie f e c e. Every v V, aifie u,v E Toal flow enering v. f u, v = v,w E f v, w Toal flow exiing v. Example: Flow The capaciie are in red. The flow i in blue. 2/7 2/ 0/ a 2/ c 0/ b 2/ d / / e / / 2

0/0/204 Reminder: Cu A cu i a pariioning of he verice of he flow nework ino wo e S, T uch ha S and T. The ize of a cu i he um of he capaciie of he edge from S o T. 7 a b c d e Reminder: Max Flow Min Cu Max flow min cu heorem. In every flow nework, he ize of he minimum cu i equal o he ize of he maximum flow. 7 a b c d e

0/0/204 Warm-up: Ani-Parallel Edge Two direced edge are aid o be aniparallel if hey are beween he ame pair of verice, bu in oppoie direcion. Problem. Conider a flow nework (V, E,,, c), and le e, e E be ani-parallel edge. Prove ha here exi a maximum flow in which a lea one of e, e ha no flow hrough i. a b Soluion Conider a maximum flow f. If eiher e or e ha no flow hrough i in f, we are done. Aume, WLOG, ha f e f(e ). By decreaing f(e ) by f e and hen eing f e = 0, we obain a valid flow of he ame ize. Le e = v, u. Boh he incoming and he ougoing flow of v and u were decreaed by he ame amoun, o hey remain equivalen. 4

0/0/204 An Illuraion u v u v Recall: The Rand corporaion udied he Sovie rain yem. They udied he Sovie abiliy o ranpor hing from he Aian ide o European ide.

0/0/204 The boleneck They alo udied he minimum cu. Problem. In hi cenario here are everal ource and everal ink! Problem 2: Several Source and Sink Problem. We are given a flow nework wih everal ource and everal ink. Explain how o ue an algorihm for finding a maximum flow (in a andard flow nework) for hi cae. 2 a b c 2 6

0/0/204 Soluion We add a uper ource S, and add an edge from i o each of he ource. Each of hee edge ha an infinie capaciy. We ymmerically add a uper ink T. Run he original algorihm from S o T. 2 a b c 2 Problem : Even Flow Problem. Given a flow nework V, E,,, c uch ha all of he capaciie are even, prove ha he ize of he maximum flow i even. 7

0/0/204 The capaciie are even. Every cu ha an even ize. The minimum cu ha an even ize. Max flow min cu The maximum cu ha an even ize. Problem 4: Edge-dijoin Pah Problem. Given a digraph G = V, E and verice, V, decribe an algorihm ha find he maximum number of edge-dijoin pah from o. 8

0/0/204 Soluion: Edge-dijoin Pah We give every edge a capaciy of. A nework wih only -capaciie i called a 0- nework (max flow can be compued more efficienly in uch nework). Find a max flow in he reuling 0- nework. \ \ \ \ \ \ 0 \ 0 \ \ \ \ \ \ \ Correcne of Soluion Given a 0- flow nework wih a max flow f and maximum number of edge-dijoin pah k, we need o prove f = k. f k: By having a flow of hrough every dijoin pah, we obain a flow of ize k. f k: Proof by inducion on f. Inducion bai: obviou when f = 0. 9

0/0/204 Correcne of Soluion (2) Inducion ep (how ha m = f k). Conider a maximum flow (of ize m). Remove every edge wih 0 flow hrough i. Find a pah from o (i exi ince f > 0). Remove he edge of he pah, o obain a nework wih a flow of ize a lea m. By inducion hypohei, here are a lea m edge-dijoin pah in hi nework. Bring back he pah ha wa removed, obaining a lea m edge-dijoin pah. Perhap RAND were alo udying he minimum number of rain rack ha are needed o be deroyed o preven any ranporaion from he Aian ide o he European ide? 0

0/0/204 Problem : Diconnecing Edge Problem. Given a digraph G = V, E and verice, V, decribe an algorihm ha find he minimum number of edge needed o be removed from G o ha here would be no pah from o. Soluion: Diconnecing Edge A before, we give every edge a capaciy of, o obain a 0- nework. Find a max flow in he nework. We already proved ha he max flow equal he maximum number of edgedijoin pah. I remain o prove ha he max number of edge-dijoin pah equal he min number of edge needed o diconnec from.

0/0/204 Proof k maximum number of edge dijoin pah. l minimum number of diconnecing edge. l k: There are k edge-dijoin pah, and we need o remove a lea one edge from each. l k: If we remove he min cu i a e of diconnecing edge. By he max flow min cu heorem, here are k edge in he min cu. Menger Theorem The idea ha he min number of diconnecing edge i equal o he max number of edge-dijoin pah i called Menger Theorem, and i from 927. Ich heie Karl und ich mag Flüe in Nezwerken 2

0/0/204 Problem 6: Verex-dijoin Pah Problem. Given a digraph G = V, E and verice, V, decribe an algorihm ha find he maximum number of verex-dijoin pah from o. Soluion: Verex-dijoin Pah We pli every verex of V, a follow: v v in vou In he reuling graph, wo pah are edge dijoin if and only if hey are verex dijoin. A before, we add capaciie of, o obain a 0- nework.

0/0/204 Soluion: Verex-dijoin Pah (2) Algorihm: We build a flow nework a decribed in he previou lide. Find max flow in he reuling nework. I remain o prove: There i a one-o-one correpondence beween he e of verex-dijoin pah in he original graph and he edge-dijoin one in he new nework. Proof Every pah in he new nework i of he form v in v ou u in w in w ou. I correpond o he pah in he original graph: v u w. A e of verex-dijoin pah in he original graph correpond o a verex-dijoin e of pah in he new nework, and hee are edgedijoin. In he new nework, a e of edge-dijoin pah are alo verex-dijoin, and o alo he correponding pah in he original graph. 4

0/0/204 Problem 7, If Time Permi Problem. Given an undireced graph G = V, E and verice, V, decribe an algorihm ha find he maximum number of edge-dijoin pah from o. The End How deailed hould my homework oluion be?