CSC 373: Algorithm Design and Analysis Lecture 9

Similar documents
Graduate Algorithms CS F-18 Flow Networks

1 The Network Flow Problem

Maximum Flow. Flow Graph

Chapter Introduction. 2. Linear Combinations [4.1]

Solutions to assignment 3

CS3510 Design & Analysis of Algorithms Fall 2017 Section A. Test 3 Solutions. Instructor: Richard Peng In class, Wednesday, Nov 15, 2017

Lecture 2: Network Flow. c 14

Bipartite Matching. Matching. Bipartite Matching. Maxflow Formulation

Fall 2014 David Wagner 10/31 Notes. The min-cut problem. Examples

Network Flows: Introduction & Maximum Flow

Jonathan Turner Exam 2-10/28/03

A LOG IS AN EXPONENT.

Flow Networks Alon Efrat Slides courtesy of Charles Leiserson with small changes by Carola Wenk. Flow networks. Flow networks CS 445

Positive and negative solutions of a boundary value problem for a

4.8 Improper Integrals

5. Network flow. Network flow. Maximum flow problem. Ford-Fulkerson algorithm. Min-cost flow. Network flow 5-1

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

can be viewed as a generalized product, and one for which the product of f and g. That is, does

LAPLACE TRANSFORMS. 1. Basic transforms

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

Max-flow and min-cut

ALG 5.3 Flow Algorithms:

Max-flow and min-cut

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

Algorithm Design and Analysis

e t dt e t dt = lim e t dt T (1 e T ) = 1

Maximum Flow and Minimum Cut

Soviet Rail Network, 1955

graph of unit step function t

1 Motivation and Basic Definitions

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)

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

Section P.1 Notes Page 1 Section P.1 Precalculus and Trigonometry Review

( ) ( ) ( ) ( ) ( ) ( y )

Sph3u Practice Unit Test: Kinematics (Solutions) LoRusso

EECE 301 Signals & Systems Prof. Mark Fowler

18.06 Problem Set 4 Due Wednesday, Oct. 11, 2006 at 4:00 p.m. in 2-106

Main Reference: Sections in CLRS.

Robust Network Coding for Bidirected Networks

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

DC Miniature Solenoids KLM Varioline

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

IX.1.1 The Laplace Transform Definition 700. IX.1.2 Properties 701. IX.1.3 Examples 702. IX.1.4 Solution of IVP for ODEs 704

1. Find a basis for the row space of each of the following matrices. Your basis should consist of rows of the original matrix.

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

More on Magnetically C Coupled Coils and Ideal Transformers

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

Minimum Squared Error

Matching. Slides designed by Kevin Wayne.

SOME USEFUL MATHEMATICS

Minimum Squared Error

CS4445/9544 Analysis of Algorithms II Solution for Assignment 1

The Shortest Path Problem Graph Algorithms - 3

Chapter 9 - The Laplace Transform

The solution is often represented as a vector: 2xI + 4X2 + 2X3 + 4X4 + 2X5 = 4 2xI + 4X2 + 3X3 + 3X4 + 3X5 = 4. 3xI + 6X2 + 6X3 + 3X4 + 6X5 = 6.

Lecture 6: Coding theory

IX.1.1 The Laplace Transform Definition 700. IX.1.2 Properties 701. IX.1.3 Examples 702. IX.1.4 Solution of IVP for ODEs 704

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Bisimulation, Games & Hennessy Milner logic p.1/32

Global alignment in linear space

y = c 2 MULTIPLE CHOICE QUESTIONS (MCQ's) (Each question carries one mark) is...

3. Renewal Limit Theorems

Some Inequalities variations on a common theme Lecture I, UL 2007

5.1-The Initial-Value Problems For Ordinary Differential Equations

1.0 Electrical Systems

CS 491G Combinatorial Optimization Lecture Notes

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

5.4, 6.1, 6.2 Handout. As we ve discussed, the integral is in some way the opposite of taking a derivative. The exact relationship

Algorithm Design and Analysis

Homework 5 for BST 631: Statistical Theory I Solutions, 09/21/2006

Motion. Part 2: Constant Acceleration. Acceleration. October Lab Physics. Ms. Levine 1. Acceleration. Acceleration. Units for Acceleration.

MATH4455 Module 10 Evens, Odds and Ends

And I Saw a New Heaven

Now we must transform the original model so we can use the new parameters. = S max. Recruits

More on ODEs by Laplace Transforms October 30, 2017

MORE FUNCTION GRAPHING; OPTIMIZATION. (Last edited October 28, 2013 at 11:09pm.)

APPENDIX 2 LAPLACE TRANSFORMS

Algorithmic Discrete Mathematics 6. Exercise Sheet

Math Week 12 continue ; also cover parts of , EP 7.6 Mon Nov 14

Laplace Examples, Inverse, Rational Form

The Covenant Renewed. Family Journal Page. creation; He tells us in the Bible.)

Introduction to Congestion Games

0 for t < 0 1 for t > 0

International ejournals

ECE Microwave Engineering. Fall Prof. David R. Jackson Dept. of ECE. Notes 10. Waveguides Part 7: Transverse Equivalent Network (TEN)

Released Assessment Questions, 2017 QUESTIONS

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

Reinforcement Learning

Discussion Session 2 Constant Acceleration/Relative Motion Week 03

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Classification of Equations Characteristics

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

Properties of Logarithms. Solving Exponential and Logarithmic Equations. Properties of Logarithms. Properties of Logarithms. ( x)

Transformations. Ordered set of numbers: (1,2,3,4) Example: (x,y,z) coordinates of pt in space. Vectors

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Today: Max Flow Proofs

Some basic notation and terminology. Deterministic Finite Automata. COMP218: Decision, Computation and Language Note 1

Calculus 241, section 12.2 Limits/Continuity & 12.3 Derivatives/Integrals notes by Tim Pilachowski r r r =, with a domain of real ( )

Factorising FACTORISING.

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

Transcription:

CSC 373: Algorihm Deign n Anlyi Leure 9 Alln Boroin Jnury 28, 2013 1 / 16

Leure 9: Announemen n Ouline Announemen Prolem e 1 ue hi Friy. Term Te 1 will e hel nex Mony, Fe in he uoril. Two nnounemen o follow ou hooing CS Fou n pplying o Grue Shool. Toy ouline Sr flow nework For Fulkeron n ugmening ph For Fulkeron lol erh lgorihm 2 / 16

Chooing fou in CS CHOOSE YOUR OWN ADVENTURE: UNDERSTANDING THE CONCENTRATIONS FOCUSES THURSDAY, FEBRUARY 7, 2013 11:00 m 1:00pm ROOM: BA1180 HUMAN-COMPUTER INTERACTION, COMPUTER SYSTEMS, GAME DESIGN... So mny hoie! Fin ou wh eh Fou i ou n where i migh ke you. Ge your queion nwere y fuly exper in eh Fou re. For queion, on ugliion@.orono.eu. 3 / 16

Thinking ou Grue Shool? GRAD SCHOOL INFO SESSION TUESDAY, FEBRUARY 12, 2013 11:00 m 1:00pm ROOM: BA2135 THINKING ABOUT GRAD SCHOOL? Ge ome nwer! Wh i gr hool i like? How o I pply? How n I prepre n unergrue uen? How n I give myelf he e ege n ge ino he hool of my rem! For queion, on ugliion@.orono.eu. / 16

Flow nework I will e following our ol CSC36 leure noe for he i efiniion n reul onerning he ompuion of mx flow. We follow he onvenion of llowing negive flow. While inuiively hi my no eem o nurl, i oe implify he evelopmen. The DPV n KT ex ue he perhp more nr onvenion of ju hving non-negive flow. Definiion A flow nework (more uggeive o y piy nework) i uple F = (G,,, ) where G = (V, E) i iireionl grph he oure n he erminl re noe in V he piy : E R 0 5 / 16

Wh i flow? A flow i funion f : E R ifying he following properie: 1 Cpiy onrin: for ll (u, v) E, 2 Skew ymmery: for ll (u, v) E, f (u, v) (u, v) f (u, v) = f (v, u) 3 Flow onervion: for ll noe u (exep for n ), Noe v N(u) f (u, v) = 0 Coniion 3 i he flow in = flow ou onrin if we were uing he onvenion of only hving non-negive flow. 6 / 16

An exmple 1/1 13/20 17/22 1/10 1/ /8 7/7 8/13 / 11/15 The noion x/y on n ege (u, v) men x i he flow, i.e. x = f (u, v) y i he piy, i.e. x = (u, v) 7 / 16

An exmple of flow onervion 1/1 13/20 17/22 1/10 1/ /8 7/7 8/13 / 11/15 For noe : f (, ) + f (, ) + f (, ) = 13 + ( 1) + 1 = 0 8 / 16

An exmple of flow onervion 1/1 13/20 17/22 1/10 1/ /8 7/7 8/13 / 11/15 For noe : f (, ) + f (, ) + f (, ) = 13 + ( 1) + 1 = 0 For noe : f (, ) + f (, ) + f (, ) + f (, ) = 1 + + ( 7) + 17 = 0 8 / 16

The mx flow prolem The mx flow prolem Given nework flow, he gol i o fin vli flow h mximize he flow ou of he oure noe. A we will ee hi i lo equivlen o mximizing he flow in o he erminl noe. (Thi houl no e urpriing flow onervion ie h no flow i eing ore in he oher noe.) We le vl(f ) enoe he flow ou of he oure for given flow f. We will uy he For-Fulkeron ugmening ph heme for ompuing n opiml flow. I m lling i heme here re mny wy o innie hi heme lhough I on view i generl prigm in he wy I view (y) greey n DP lgorihm. 9 / 16

So why uy For-Fulkeron? Why o we uy he For-Fulkeron heme if i i no very generi lgorihmi pproh? A in DPV ex, mx flow prolem n lo e repreene liner progrm (LP) n ll LP n e olve in polynomil ime. I view For-Fulkeron n ugmening ph n imporn exmple of lol erh lgorihm lhough unlike mo lol erh lgorihm we oin n opiml oluion. The opi of mx flow (n vriou generlizion) i imporn eue of i immeie ppliion n mny ppliion of mx flow ype prolem o oher prolem (e.g. mx iprie mhing). Th i mny prolem n e polynomil ime rnforme/reue o mx flow (or one of i generlizion). One migh refer o ll hee ppliion flow e meho. 10 / 16

A flow f n i reiul grph Noe Given ny flow f for flow nework F = (G,,, ), we efine he reiul grph G f = (V, E f ), where V i he e of verie of he originl flow nework F E f i he e of ll ege e hving poiive reiul piy f (e) = (e) f (e) > 0. Noe h (e) f (e) 0 for ll ege y he piy onrin. Wih our onvenion of negive flow, even zero piy ege (in G) n hve reiul piy. The i onep unerlying he For-Fulkeron lgorihm i n ugmening ph whih i n - ph in G f. Suh ph n e ue o ugmen he urren flow f o erive eer flow f. 11 / 16

An exmple of reiul grph 1/1 13/20 17/22 1/10 1/ /8 7/7 8/13 / 11/15 The previou nework flow 7 11 3 1 7 5 5 11 The reiul grph 12 / 16

The reiul piy of n ugmening ph Given n ugmening ph π in G f, we efine i reiul piy f (π) o e he min{(e) f (e) e π} Noe: he reiul piy of n ugmening ph i ielf i greer hn 0 ine every ege in he ph h poiive reiul piy. Queion: How woul we ompue n ugmening ph of mximum reiul piy? 13 / 16

Uing n ugmening ph o improve he flow We n hink of n ugmening ph efining flow f π (in he reiul nework ): f (π) if (u, v) π f π (u, v) = f (π) if (v, u) π 0 oherwie Clim f = f + f π i flow in F n vl(f ) > vl(f ) 1 / 16

Deriving eer flow uing n ugmening ph 13/20 1/1 17/22 7 1 5 1/10 1/ /8 7/7 11 3 7 8/13 / 11/15 The originl nework flow 5 11 An ugmening ph π wih f (π) = 15 / 16

Deriving eer flow uing n ugmening ph 13/20 1/1 17/22 7 1 5 1/10 1/ /8 7/7 11 3 7 8/13 / 11/15 The originl nework flow 1/1 5 11 An ugmening ph π wih f (π) = 17/20 21/22 3/10 3/ 0/8 7/7 8/13 / 11/15 The upe flow whoe vlue = 25 15 / 16

Deriving eer flow uing n ugmening ph 13/20 1/1 17/22 7 1 5 1/10 1/ /8 7/7 11 3 7 8/13 / 11/15 The originl nework flow 1/1 17/20 21/22 3/10 3/ 0/8 7/7 8/13 / 11/15 The upe flow whoe vlue = 25 5 11 An ugmening ph π wih f (π) = 3 5 7 7 8 1 11 Upe re. grph wih no ug. ph 15 / 16 7 1

The For-Fulkeron heme The For-Fulkeron heme 1: /* Iniilize */ 2: f := 0 3: G f := G : while here i n ugmening ph π in G f o 5: f := f + f π /* Noe hi lo hnge G f */ 6: en while Noe I ll hi heme rher hn n lgorihm ine we hven i how one hooe n ugmening ph ( here n e mny uh ph) 16 / 16