Lecture 8. Why do we need residual networks? Residual networks allow one to reverse flows if necessary. If we have taken a bad path then residual networks.

Slides:



Advertisements
Similar presentations
Lecture 7. Network Flows We consider a network with directed edges. Every edge has a capacity. If there is an edge from i to j, there is an edge from.
Advertisements

Min Cost Flow: Polynomial Algorithms. Overview Recap: Min Cost Flow, Residual Network Potential and Reduced Cost Polynomial Algorithms Approach Capacity.
Lecture 5: Network Flow Algorithms Max-Flow Min-Cut Single-Source Shortest-Path (SSSP) Job Sequencing.
Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: uij is the capacity on arc (i,j). Find non-negative flow fij for.
Introduction to Algorithms
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Bioinformatics III1 We will present an algorithm that originated by Ford and Fulkerson (1962). Idea: increase the flow in a network iteratively until it.
Chapter 6 Maximum Flow Problems Flows and Cuts Augmenting Path Algorithm.
Management Science 461 Lecture 2b – Shortest Paths September 16, 2008.
Basic Feasible Solutions: Recap MS&E 211. WILL FOLLOW A CELEBRATED INTELLECTUAL TEACHING TRADITION.
Network Optimization Models: Maximum Flow Problems
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
Chapter 10: Iterative Improvement The Maximum Flow Problem The Design and Analysis of Algorithms.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 Maximum Flow Networks Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘capacity’ u ij. Goal: Determine the maximum amount.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Chapter 7 Maximum Flows: Polynomial Algorithms
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
1 Maximizing Lifetime of Sensor Surveillance Systems IEEE/ACM TRANSACTIONS ON NETWORKING Authors: Hai Liu, Xiaohua Jia, Peng-Jun Wan, Chih- Wei Yi, S.
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
A New Approach to the Maximum-Flow Problem Andrew V. Goldberg, Robert E. Tarjan Presented by Andrew Guillory.
Detecting Network Intrusions via Sampling : A Game Theoretic Approach Presented By: Matt Vidal Murali Kodialam T.V. Lakshman July 22, 2003 Bell Labs, Lucent.
Lecture 3. Preview of Markov Process A sequence of random variables X 1, X 2,….,X n,….. such that –X i+1 is independent of X 1,….X i-1 given X i –Pr(X.
Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Solving by linear programming Augmenting path algorithm.
The max flow problem
Maximum Flows Lecture 4: Jan 19. Network transmission Given a directed graph G A source node s A sink node t Goal: To send as much information from s.
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
Lecture 10. TCP flow Control Used for data transfer Every successful packet is acknowledged One can not have more than W unacknowledged packets, where.
Routing algorithms, all distinct routes, ksp, max-flow, and network flow LPs W. D. Grover TRLabs & University of Alberta © Wayne D. Grover 2002, 2003 E.
1 Maximum flow: The preflow/push method of Goldberg and Tarjan (87)
1 Shortest Path Algorithms. 2 Routing Algorithms Shortest path routing What is a shortest path? –Minimum number of hops? –Minimum distance? There is a.
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
A New Approach to the Maximum-Flow Problem Andrew V. Goldberg, Robert E. Tarjan Presented by Andrew Guillory.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2004 Lecture 5 Wednesday, 10/6/04 Graph Algorithms: Part 2.
1 The Min Cost Flow Problem. 2 The Min Cost Flow problem We want to talk about multi-source, multi-sink flows than just “flows from s to t”. We want to.
15.082J, 6.855J, and ESD.78J September 21, 2010 Eulerian Walks Flow Decomposition and Transformations.
MAX FLOW CS302, Spring 2013 David Kauchak. Admin.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
Lecture 5: Network Flow Algorithms Single-Source Shortest-Path (SSSP) (Dijkstra's Algorithm) Max Flow - Min Cut (Ford-Fulkerson) Job Sequencing.
Solution to HW1. Problem 1 Need to find shortest path from a single source s to a single destination d. Have a condition in the Dijkstra algo loop which.
15.082J and 6.855J and ESD.78J October 19, 2010 Max Flows 3 Preflow-Push Algorithms.
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
CS 4407, Algorithms University College Cork, Gregory M. Provan Network Optimization Models: Maximum Flow Problems In this handout: The problem statement.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
CS223 Advanced Data Structures and Algorithms 1 Maximum Flow Neil Tang 3/30/2010.
Chapter 7 April 28 Network Flow.
15.082J & 6.855J & ESD.78J October 7, 2010 Introduction to Maximum Flows.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
1 CS612 Algorithms for Electronic Design Automation CS 612 – Lecture 8 Lecture 8 Network Flow Based Modeling Mustafa Ozdal Computer Engineering Department,
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.
15.082J and 6.855J and ESD.78J October 21, 2010 Max Flows 4.
1 Maximum Flows CONTENTS Introduction to Maximum Flows (Section 6.1) Introduction to Minimum Cuts (Section 6.1) Applications of Maximum Flows (Section.
::Network Optimization:: Minimum Spanning Trees and Clustering Taufik Djatna, Dr.Eng. 1.
Preflow Push Algorithm M. Amber Hassaan. Preflow Push Algorithm2 Max Flow Problem Given a graph with “Source” and “Sink” nodes we want to compute:  The.
Maximum flow: The preflow/push method of Goldberg and Tarjan (87)
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
3.4 Push-Relabel(Preflow-Push) Maximum Flow Alg.
Lecture 5 Tuesday, 3/2/10 Graph Algorithms: Part 2
Primal-Dual Algorithm
Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: uij is the capacity on arc (i,j). Find non-negative flow fij for.
Algorithms (2IL15) – Lecture 7
Max Flow / Min Cut.
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Maximum Flow Neil Tang 4/8/2008
Maximum flow: The preflow/push method of Goldberg and Tarjan (87)
Max Flows 3 Preflow-Push Algorithms
Class 11 Max Flows Obtain a network, and use the same network to illustrate the shortest path problem for communication networks, the max flow.
Presentation transcript:

Lecture 8

Why do we need residual networks? Residual networks allow one to reverse flows if necessary. If we have taken a bad path then residual networks allow one to detect the condition and reverse the flow. A bad path is one which overlaps with too many other paths.

Example Source Destination a b Paths source, a, destinations and source, b destination gives a flow of 2 units. Path source, a, b, destination overlaps with both the optimal paths.

If we initially choose source, a, b, destination as our path, then no greedy strategy will be able to augment the network flow any further (unless we use residual edges which allows recovery) Verify how we recover in spite of the initial bad choice, if we use the residual network to augment flows.

Defects of Augmenting Path Algorithm Sending flow along a path requires O(V) complexity n   Since there are n separate paths, we need to push flow through n paths separately. Every time complexity is O(V)

How about if we push flow through edges separately without caring about flow conversation? If there is excess flow at a node, then the excess is sent to downstream nodes. Finally, all excess flow is routed back to the source, so that flow conservation is maintained n  

Generic Pre-flow Push Algorithm Augmenting path algorithms maintain feasibility at every stage, and gradually strive towards optimality Pre-flow push algorithm initially pushes the maximum possible amount of flow, and strives towards feasibility. Initially, flow in every edge originating from the source is set to the link capacity. Distance label of every node is initially their distance to the destination.

Set distance label of source node s, d(s)=V If a node has excess flow, send the flow along an admissible edge (end node of an admissible edge has less distance than the source node of the edge, and hence is closer to the destination). Let the excess flow at a node u be e(u). Let the capacity of admissible edge (u, v) in residual graph be r uv Then flow routed along (u, v) is min(e(u), r uv ) A node (which is not source nor destination), with excess flow is called an active node.

If a node u with excess flow does not have an admissible edge in the residual network, then it is relabeled: d(u) is upgraded to d(v) + 1, where v is the node with minimum distance label amongst all nodes which have edges from u in the residual network. The algorithm terminates when there are no active nodes.

Intuition Edges are like water pipes Nodes are joints Distance is like height from the ground. Destination is at the ground. Initially source is at the highest level and sends water to all adjacent nodes. Whenever a node has accumulated water, it sends water to nodes at lower label. So water moves towards the destination.

Sometimes water gets locally trapped as all neighboring nodes are at a greater height (no admissible arc). Then, the node label is raised (relabeling).

Original Network/Residual Network with 0 flow source destination Push 4 units along 1-3 and 2 units along 1-2 Push 4 unit along 3-4, and then 1 unit along 1-4 Relabel node 2 to 2 Route 1 unit through source destination E = 4 E = 2 E = source destination E = source destination E = 1

source destination E = 1 Route 1 unit through source destination Now no node has any excess Total flow out of source is 6

Proof for Optimality Distance labels always maintain requisite properties. Initially, d(s) = V. Any difficulty in maintaining requisite properties? At termination d(s) is V or greater. So there is no path from the source to destination in the residual network (no augmenting path). At termination, no node except the source and destination has excess flow. No node ever has any deficit flow.

So, flow allocation is feasible at termination Since the residual network does not have an augmenting path, the flow is a maxflow. Complexity is O(V 2 E)

Specific Implementations of Generic Preflow-Push algorithm (FIFO)This algorithm pushes flow out of the active nodes in first in first out order. The algorithm initially orders the active nodes in some manner. It pushes flow from the first active node in the list, till the active node is no longer active or till it needs to be relabeled Order of selection of active nodes has not been nailed down in the generic version

The algorithm terminates when the list is empty In the latter case, the node is relabeled and added to the back of the list and picks the second node from the list. Clearly, FIFO is a specific order for selecting the active nodes, and hence the proof for correctness is the same as that for generic preflow push algorithm While pushing flow from this active node, the newly created active nodes are added to the back of the list O(V 3 ) complexity

Problem with FIFO 2 1 n -1   Source Destination 

Highest Label Preflow push Pushes flow from the active node with the highest label Terminates when there are no more active nodes O(V 2 E 0.5 )

Multicommodity network flow We have several source destination pairs. Refer to each as a separate commodity. Need to maximize a weighted sum of the different flows Flow allocation must be feasible: Capacity Constraints Total flow in any link is between 0 and the link capacity Flow Conservation

Input flow for any commodity at a node equals the output flow of the commodity, for every node except the source/destination for the commodity. Solution techniques use optimization ideas However, we may not have integral flows even if link capacities are integers In fact, unlike the single commodity flow problem, multi-commodity flow problem with the constraint that flows in the links are integers is NP-hard

Example Application Wireless nodes have low battery power and hence limited lifetime. Every transmission consumes energy. Reception consumes less energy. Lifetime of a node is related to the total energy spent in transmission. Transmission energy increases with increase in distance to the receiving node.

Signal strength decreases as distance increases. So if the node needs to transmit to a distant node, it needs to use greater power. Power increases as d 4 where d is the distance between the two nodes. It would be interesting to ask the question that given a particular transmission requirement what is the maximum lifetime of a network? Lifetime of a network is the maximum time in which all nodes are active.

Energy Conserving Routing in Wireless Ad-hoc Networks J.H. Chang and L. Tassiulas, INFOCOM 2000 Clearly, routing strategy will affect the network lifetime. For example, if all traffic is routed through a single node, it will die in a short time, and according to our definition network dies as well. Routing strategy will depend on traffic requirements, and the node energies.

Problem Formulation Node i has energy E i Transmission energy from node i to j is e ij for each transmission (depends on the distance between the two nodes) Let there be C sessions Let Q i c be the rate of packet generation in node i for session c Let q ij c be the rate of information transmission in link i, j for session c under the current routing (routing determines the q ij c )

Lifetime of a node i under flow q is T i (q)= E i /  j  Si e ij  c  C q ij c Every node has a maximum power. So there is a set of neighbors S i of node i. Lifetime of a system is minimum of all its nodes T sys (q) = min i T i (q) Let D c be the set of destinations of session C Session c information must reach some node in D c

Lifetime Maximization Objective Maximize T sys (q) = min i E i /  j  Si e ij  c  C q ij c Subject to: q ij c  0  i  Sj q ji c + Q i c =  j  Si q ij c  session c, and all nodes i  D c

Reformulation Maximize T sys (q) Subject to:  j  Si e ij  c  C q ij c T sys (q)  E i  session c, and all nodes i q ij c  0  i  Sj q ji c + Q i c =  j  Si q ij c  session c, and all nodes i  D c Let q ij c = q ij c T sys (q)

Reformulation Maximize T sys (q) Subject to:  j  Si e ij  c  C q ij c  E i  session c, and all nodes i q ij c  0  i  Sj q ji c + T sys (q) Q i c =  j  Si q ij c  session c, and all nodes i  D c

Special Case Consider the special case where every session has a single source, i.e., Q i c = 0 at all nodes except the source of session i. Thus, Q c is the input rate for session c. Also, e ij = e i  neighbors j of i. Also, p ij c = q ij c T sys (q)/ Q c The problem can be reformulated as follows:

Reformulation Maximize T sys (q) Subject to:  j  Si  c  C p ij c  E i /e i  session c, and all nodes i p ij c  0  i  Sj p ji c =  j  Si p ij c  session c, and all nodes i except source and destination of session c.  i  Sj p ji c + T sys (q) =  j  Si p ij c

This is the multi-commodity flow problem with node capacities, i.e., there is an additional constraint that sum of the output flow through a node must not exceed the node capacity. –Problem with node capacity can be reduced to the problem without node capacity, replacing each node by two nodes with a link between them with capacity equal to the node capacity –Note that there is no link capacity in this problem (equivalently all link capacities are infinity). Object of this multi-commodity flow problem is to find the minimum flow supported for each session.

In general, e ij may not be the same for all neighbors of node i, since all neighbors may not be equidistant from node i. The paper suggests several heuristics for the purpose.

Minimum Cut Consider the augmenting path algorithm. The set S reachable from the source node in the residual network when the algorithm terminates and the remaining nodes V-S constitute a minimum cut. Why? Thus we know how to find a minimum cut. How about finding the edges of all minimum cuts? Why do we need the above?

Consider an edge (u, v) and the residual network corresponding to the max-flow, where Edge (u, v) is filled to capacity in the original network. Node v is not reachable from source s in the residual network. Node u can not reach destination t in the residual network. There is no path from u to v in the residual network. A non-zero capacity edge (u, v) belongs to some minimum cut if and only if it satisfies all the above properties. MIRA, JSAC 2000, Kar et. al