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

Similar documents
Reminder: Flow Networks

Graphs III - Network Flow

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

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

Network Flows: Introduction & Maximum Flow

Algorithm Design and Analysis

Algorithmic Discrete Mathematics 6. Exercise Sheet

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)

Matching. Slides designed by Kevin Wayne.

Maximum Flow and Minimum Cut

Randomized Perfect Bipartite Matching

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

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

Network Flow. Data Structures and Algorithms Andrei Bulatov

Soviet Rail Network, 1955

CS4445/9544 Analysis of Algorithms II Solution for Assignment 1

Today: Max Flow Proofs

Algorithm Design and Analysis

CSE 521: Design & Analysis of Algorithms I

1 Motivation and Basic Definitions

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

18 Extensions of Maximum Flow

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

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

Soviet Rail Network, 1955

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

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

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

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

Maximum Flow in Planar Graphs

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

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

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

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

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.

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

CSE 421 Introduction to Algorithms Winter The Network Flow Problem

Introduction to SLE Lecture Notes

Introduction to Congestion Games

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

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

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

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

Topics in Combinatorial Optimization May 11, Lecture 22

CHAPTER 7: SECOND-ORDER CIRCUITS

Network Flows UPCOPENCOURSEWARE number 34414

EECE 301 Signals & Systems Prof. Mark Fowler

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.

23 Maximum Flows and Minimum Cuts

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

Algorithms. Algorithms 6.4 MAXIMUM FLOW

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

Price of Stability and Introduction to Mechanism Design

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).

arxiv: v1 [cs.cg] 21 Mar 2013

Ford-Fulkerson Algorithm for Maximum Flow

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

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

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

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

Geometric Path Problems with Violations

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

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

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

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

, 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

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

5.2 GRAPHICAL VELOCITY ANALYSIS Polygon Method

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

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

Network Flow Applications

EXTENDED FORMULATIONS FOR PACKING AND PARTITIONING ORBITOPES

Resolving Braess s Paradox in Random Networks

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

CHAPTER 7. Definition and Properties. of Laplace Transforms

Stationary Distribution. Design and Analysis of Algorithms Andrei Bulatov

Bipartite Matching. Matching. Bipartite Matching. Maxflow Formulation

introduction Ford-Fulkerson algorithm

EXERCISES FOR SECTION 1.5

18.03SC Unit 3 Practice Exam and Solutions

6.302 Feedback Systems Recitation : Phase-locked Loops Prof. Joel L. Dawson

introduction Ford-Fulkerson algorithm

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

Average Case Lower Bounds for Monotone Switching Networks

6.8 Laplace Transform: General Formulas

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

Optimal State-Feedback Control Under Sparsity and Delay Constraints

Physics 240: Worksheet 16 Name

arxiv: v2 [cs.cg] 30 Apr 2015

Selfish Routing and the Price of Anarchy. Tim Roughgarden Cornell University

Survivable Routing Meets Diversity Coding

SMT 2014 Calculus Test Solutions February 15, 2014 = 3 5 = 15.

A propos de la difficulte du routage egal par plus courts chemins

Efficient Algorithms for Computing Disjoint QoS Paths

Transcription:

0/0/206 Ma/CS 6a Cla 4: Flow Exercie 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/206 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/206 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/206 Warm-up: Ani-Parallel Edge Two direced edge are aid o be aniparallel if hey have he ame endpoin, bu are 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 he conrain are ill aified. 4

0/0/206 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 he European ide.

0/0/206 The boleneck They alo udied he minimum cu. Problem. In hi cenario here are everal ource and 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/206 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 Correcne There i a bijecion beween he flow of he original nework and he flow of he new nework (and he original edge have he ame flow in boh cae). A flow in he new nework yield a flow in he original one by removing he ource and he ink, and vice vera. Two correponding flow have he ame ize. A max flow in he new nework correpond o a max flow in he original one. 7

0/0/206 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. The capaciie are even. Every cu ha an even ize. The minimum cu ha an even ize. Max flow min cu The maximum flow ha an even ize. 8

0/0/206 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. 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\ \ \ \ \ \ \ 9

0/0/206 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. 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 m. By he inducion hypohei, here are m edge-dijoin pah in hi nework. Bring back he removed pah, o obain a lea m edge-dijoin pah. 0

0/0/206 Perhap RAND were alo udying he minimum number of rain rack needed o be deroyed o preven any ranporaion from he Aian ide o he European ide? 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 o ha no pah from o remain.

0/0/206 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. 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: The min cu i a e of diconnecing edge. By he max flow min cu heorem, here are k edge in he min cu. 2

0/0/206 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 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.

0/0/206 Soluion: Verex-dijoin Pah We pli every verex of V, a follow: v v in vou In he reuling graph, pah are edge dijoin if and only if hey are verex dijoin. A before, we add capaciie of, o obain a 0- nework. Soluion: Verex-dijoin Pah (2) Algorihm: We build a 0- nework a decribed in he previou lide. Find max flow in he reuling nework. I remain o prove: There i a bijecion beween e of verexdijoin pah in he original graph and e of edge-dijoin pah in he new nework. 4

0/0/206 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 e of verex-dijoin pah in he new nework, and hee are edgedijoin. In he new nework, a e of edge-dijoin pah are alo verex-dijoin, and hu alo he correponding pah in he original graph. The End