Algorithms Demands and Bounds. Demands and Bounds. Design and Analysis of Algorithms Andrei Bulatov

Similar documents
Lecture 1. 1 Overview. 2 Maximum Flow. COMPSCI 532: Design and Analysis of Algorithms August 26, 2015

NP and NP-Completeness

Algorithms and Data Structures 2014 Exercises and Solutions Week 14

Connectivity and Menger s theorems

Theory of Network Communication

Network Flow Problems Luis Goddyn, Math 408

Final. Formulate the optimization problem of assigning the crews. You are not to solve this problem.

7.5 Bipartite Matching

Chapter 7. Network Flow. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Algorithm Design and Analysis

Two Applications of Maximum Flow

CMSC 451: Max-Flow Extensions

5. Biconnected Components of A Graph

Chapter 7. Network Flow. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Recitation 13 10/31/2008. Markov Chains

The maximum flow problem

Stable Network Flow with Piece-wise Linear Constraints

Flows. Chapter Circulations

The Budgeted Minimum Cost Flow Problem with Unit Upgrading Cost

Polynomial-Solvability of N P-class Problems

Minimum cost transportation problem

Dynamic Programming. Data Structures and Algorithms Andrei Bulatov

7. NETWORK FLOW II. bipartite matching disjoint paths extensions to max flow 3D Memory Reliability survey design airline scheduling image segmentation

Discrete Optimization 23

Soviet Rail Network, 1955

On (a, d)-vertex-antimagic total labeling of Harary graphs

Maximum flow problem CE 377K. February 26, 2015

EXERCISES SHORTEST PATHS: APPLICATIONS, OPTIMIZATION, VARIATIONS, AND SOLVING THE CONSTRAINED SHORTEST PATH PROBLEM. 1 Applications and Modelling

Chapter 7. Network Flow. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

On resilience of distributed routing in networks under cascade dynamics

Agenda. Soviet Rail Network, We ve done Greedy Method Divide and Conquer Dynamic Programming

Exercises - Linear Programming

arxiv: v1 [math.co] 25 Apr 2016

Algorithms and Theory of Computation. Lecture 11: Network Flow

Graphs and Network Flows IE411. Lecture 12. Dr. Ted Ralphs

Lecture J. 10 Counting subgraphs Kirchhoff s Matrix-Tree Theorem.

Lecture 8 Network Optimization Algorithms

Lesson 1. Investigation. Name:

The network maintenance problem

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

2.13 Maximum flow with a strictly positive initial feasible flow

On Some Distance-Based Indices of Trees With a Given Matching Number

arxiv: v2 [math.co] 12 Jul 2009

C&O 355 Mathematical Programming Fall 2010 Lecture 18. N. Harvey

Math Mathematical Notation

Proposed Performance Metrics Block Time & Predictability

Worksheet 9. Math 1B, GSI: Andrew Hanlon. 1 Ce 3t 1/3 1 = Ce 3t. 4 Ce 3t 1/ =

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502)

A spectral Turán theorem

Optimization - Examples Sheet 1

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

Chapter 4: Techniques of Circuit Analysis

Integer Parameter Synthesis for Real-time Systems

Max Flow: Algorithms and Applications

Theory of Computation

6.854 Advanced Algorithms

DEPARTMENT OF STATISTICS AND OPERATIONS RESEARCH OPERATIONS RESEARCH DETERMINISTIC QUALIFYING EXAMINATION. Part I: Short Questions

We say that a flow is feasible for G (or just feasible if the graph and capacity function in question are obvious) if

On diamond-free subposets of the Boolean lattice

Running Time. Assumption. All capacities are integers between 1 and C.

MAS210 Graph Theory Exercises 5 Solutions (1) v 5 (1)

Optimization Problems in Multiple Subtree Graphs

Computing Laboratory A GAME-BASED ABSTRACTION-REFINEMENT FRAMEWORK FOR MARKOV DECISION PROCESSES

Maximum flow problem (part I)

Isoperimetric problems

Discrete Optimization 2010 Lecture 3 Maximum Flows

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs

Generalization of the Minimum Branch Vertices Spanning Tree Problem

Network Flow. Data Structures and Algorithms Andrei Bulatov

Outline. Bayesian Networks: Belief Propagation in Singly Connected Networks. Form of Evidence and Notation. Motivation

6.046 Recitation 11 Handout

Chapter 4: Methods of Analysis

ESCI 485 Air/sea Interaction Lesson 3 The Surface Layer

Chapter 7 Network Flow Problems, I

The partial inverse minimum cut problem with L 1 -norm is strongly NP-hard. Elisabeth Gassner

A Regularization Framework for Learning from Graph Data

. CS711008Z Algorithm Design and Analysis. Lecture 10. Algorithm design technique: Network flow and its applications 1. Dongbo Bu

arxiv: v1 [math.gt] 2 Nov 2010

A possible mechanism to explain wave-particle duality L D HOWE No current affiliation PACS Numbers: r, w, k

6-1 Slope. Objectives 1. find the slope of a line 2. use rate of change to solve problems

Graphs and Network Flows IE411. Lecture 15. Dr. Ted Ralphs

The optimal pebbling number of the complete m-ary tree

Chapter 7: The Second Law of Thermodynamics

Mathematics for Decision Making: An Introduction. Lecture 13

Flows and Cuts. 1 Concepts. CS 787: Advanced Algorithms. Instructor: Dieter van Melkebeek

FREEWAY WEAVING. Highway Capacity Manual 2000 CHAPTER 24 CONTENTS EXHIBITS

OPERA TIONS RESEARCH CENTER

Network Flows. CTU FEE Department of control engineering. March 28, 2017

Maximum Integer Flows in Directed Planar Graphs with Multiple Sources and Sinks and Vertex Capacities

Chromatic characterization of biclique cover. Denis Cornaz. Jean Fonlupt. Equipe Combinatoire, UFR 921, Universite Pierre et Marie Curie, 4 place

directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time

different formulas, depending on whether or not the vector is in two dimensions or three dimensions.

Example: Fib(N) = Fib(N-1) + Fib(N-2), Fib(1) = 0, Fib(2) = 1

Lecture 5 January 16, 2013

Introduction to Integer Linear Programming

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)}

VISUAL PHYSICS ONLINE RECTLINEAR MOTION: UNIFORM ACCELERATION

(1,3) (3,4) (2,2) (1,2) (2,4) t

22 cities with at least 10 million people See map for cities with red dots

Maximum flow problem

Transcription:

Algorithms Demands and Bounds Demands and Bounds Design and Analysis of Algorithms Andrei Bulato

Algorithms Demands and Bounds 1- Demands In our flow network model there is only 1 source and sink Can we do something for seeral sources and sinks? More general: Eery ertex has a demand If demand is positie, the ertex requires that the amount of flow entering the ertex is greater than the outgoing flow If demand is negatie, it requires that the amount of outgoing flow is greater. It proides supply. d -3 3 3-3 4

Algorithms Demands and Bounds 1-3 Circulation with Demands Let S be the set of nodes with negatie demand (sources) Let T be the set of nodes with positie demand (sinks) A circulation with demands { d } is a function f that assigns a nonnegatie real numbers to each arc: (Capacity condition) For each e E we hae 0 f ( e) c e in out (Demand condition) For each V, we hae, f ( ) f ( ) = d -3-3 3 3 1 4 The Circulation with Demands Problem Instance: A digraph G, capacities and demands Objectie: Does there exist a circulation satisfying the Capacity and Demand conditions

Algorithms Demands and Bounds 1-4 Sum of Demands Lemma If there exists a feasible circulation with demands { d } then d = 0 V Proof Suppose f is a feasible circulation Then V d = f ( ) f ( ) V in In this expression the alue f(e) for each e E counted exactly twice, once positiely, and once negatiely. Thus the sum equals 0 out

Algorithms Demands and Bounds 1-5 Flow from Circulation and Back The idea is to add new source and sink Let D = T d = d S G s d u u S G T d t Lemma There is a feasible circulation with demands { d } in G if and only if the maximum flow in G has alue D. If all capacities and demands are integers and there is a feasible circulation then there is an integer feasible circulation

Algorithms Demands and Bounds 1-6 Flow s. Circulation Proof Obsere that the alue of any flow in G does no exceed D, for D is the capacity of the cut that isolates the source s If a feasible circulation in G exists we extend it by assigning the alue d u to eery edge (s,u), u S, and the alue du to eery edge (u,t), u T. The obtained function is a flow, and its alue is D. Suppose there is a flow of alue D in G. Eery edge out of s, and eery edge into t must be completely saturated with this flow. If we remoe these edges we obtain a circulation f in G with in out f ( ) f ( ) = d QED

Algorithms Demands and Bounds 1-7 Lower Bounds The problem can be generalized further Sometimes we need to hae some flow through certain arcs We consider a flow network with (i) capacities (ii) demands c e d (iii) lower bounds -3-3 3 3 4 l e, 0 l e c e A circulation f is feasible if (Capacity condition) For each e E we hae l f ( e) (Demand condition) For eery V we hae e c e in out f ( ) f ( ) = d

Algorithms Demands and Bounds 1-8 Eliminating Lower Bounds We reduce the problem to one without lower bounds Start with a flow that just satisfies the lower bound, i.e. We hae L = f 0 in out 0 ( ) f0 ( ) If L = then we are done f le Otherwise we need to add another flow such that f d in out 1 ( ) f1 ( ) = d L = e e into e out of f 1 l f e) = 0 ( l e This should be done in a network with capacities ce l e and demands d L

Algorithms Demands and Bounds 1-9 Eliminating Lower Bounds Let G be a flow network with capacities { c e }, demands { d }, and lower bounds { l e } Construct G by replacing capacities with ce l e replacing demands with d and remoing lower bounds L -3-1 3 3 1 3-3 -5 4 4

Algorithms Demands and Bounds 1-10 Satisfying Lower Bounds Theorem There is a feasible circulation in G if and only if there is a feasible circulation in G. If all demands, capacities, and lower bounds in G are integers, and there is a feasible circulation, then there is a feasible circulation that is integer alued. in Proof Suppose there is a circulation f in G. Define circulation in G by f ( e) = f '( e) + l e Then f satisfies the capacity condition in G, and out f ( ) f ( ) = ( l + f '( e)) ( l + f '( e)) = L + ( d L ) = e into e e e out of so it satisfies the demand condition as well. d

Algorithms Demands and Bounds 1-11 Satisfying Lower Bounds Proof (cntd) Suppose there is a circulation f in G. Define circulation in G by f '( e) = f ( e) Then f satisfies the capacity condition in G, and l e ( f ') in ( ) ( f ') out ( ) = ( f ( e) l ) e e into e out of so it satisfies the demand condition as well. ( f ( e) l e ) = d L QED

Algorithms Airline Scheduling Airline Scheduling Design and Analysis of Algorithms Andrei Bulato

Algorithms Airline Scheduling 11-13 The Problem An airline carrier wants to sere certain set of flights Example: Boston (6 am) - Washington DC (7 am), San Francisco (:15pm) - Seattle (3:15pm) Philadelphia (7 am) - Pittsburg (8 am), Las Vegas (5 pm) - Seattle (6 pm) Washington DC (8 am) Los Angeles (11 am) Philadelphia (11 am) - San Francisco ( pm) The same plane can be used for flight i and for flight j if - the destination of i is the same as origin of j and there is enough time for maintenance (say, 1 hour) - a flight can be added in between that gets the plane from the destination of i to the origin of j with adequate time in between

Algorithms Airline Scheduling 11-14 Formalism Boston (6 am) - Washington DC (7 am), Philadelphia (11 am) - San Francisco ( pm) Philadelphia (7 am) - Pittsburg (8 am), San Francisco (:15pm) - Seattle (3:15pm) Washington DC (8 am) Los Angeles (11 am), Las Vegas (5 pm) - Seattle (6 pm) BOS 6 DC 7 DC 8 LAX 11 LAS 5 SEA 6 PHL 7 PIT 8 PHL 11 SFO SFO :15 SEA 3:15 Flight j is reachable from flight i if it is possible to use the same plane for flight i, and then later for flight j as well. (or we can use a different set of rules, it does not matter)

Algorithms Airline Scheduling 11-15 The Problem The Airline Scheduling Problem Instance: A set of flights to sere, and a set of pairs of reachable flights, the allowed number k of planes Objectie: Is it possible to sere the required flights with k planes

Algorithms Airline Scheduling 11-16 The Idea Each airplane is represented by a unit of flow The required flights (arcs) hae lower bound 1, and capacity 1 If ( u i, i ) and ( u j, j ) are arcs representing required flights i and j, and j is reachable from i, then there is an arc connecting i to u j ; we assign this arc capacity 1 Extend the network by adding an external source and sink BOS 6 DC 7 DC 8 LAX 11 LAS 5 SEA 6 PHL 7 PIT 8 PHL 11 SFO SFO :15 SEA 3:15

Algorithms Airline Scheduling 11-17 Construction - For each required flight i, the graph G has two nodes and - G also has a distinct source s and a sink t - For each i, there is an arc ( u i, i ) with a lower bound 1 and capacity 1 - For each i and j such that flight j is reachable from flight i, there is an arc ( i, u j ) with a lower bound 0 and a capacity 1 - For each i there is an arc ( s, ui ) with a lower bound 0 and a capacity 1 - For each i there is an arc ( i, t) with a lower bound 0 and a capacity 1 - There is an arc (s,t) with lower bound 0 and capacity k - The node s has demand -k, and node t has demand k u i i

Algorithms Airline Scheduling 11-18 The Problem Theorem There is a way to perform all flights using at most k planes if and only if there is a feasible circulation in the network G. Proof DIY