Download presentation
Presentation is loading. Please wait.
1
Lecture 8
2
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.
3
Example Source Destination 1 1 1 1 1 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.
4
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.
5
Defects of Augmenting Path Algorithm Sending flow along a path requires O(V) complexity. 2...... 1 n 1 1 1 1 1 1 Since there are n separate paths, we need to push flow through n paths separately. Every time complexity is O(V)
6
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. 2...... 1 n 1 1 1 1 1 1
7
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.
8
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.
9
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.
10
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.
11
Sometimes water gets locally trapped as all neighboring nodes are at a greater height (no admissible arc). Then, the node label is raised (relabeling).
12
5 3 4 2 3 1 1 42 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 2-3 1 1 0 2 5 1 3 source destination 2 3 2 1 4 4 1 1 0 2 E = 4 E = 2 E = 1 1 1 3 source destination 2 3 2 1 4 4 1 1 0 2 4 E = 1 1 1 3 source destination 2 3 2 1 4 4 1 2 0 2 4 E = 1
13
24 34 2 1 1 42 1 source destination 1 1 2 0 2 E = 1 Route 1 unit through 3-4 25 34 2 1 1 42 1 source destination Now no node has any excess Total flow out of source is 6
14
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.
15
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)
16
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
17
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
18
Problem with FIFO 2 1 n -1 1 1 1 11 Source Destination
19
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 )
20
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
21
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
22
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.
23
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.
24
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.
25
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 )
26
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
27
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
28
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)
29
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
30
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:
31
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
32
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.
33
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.
34
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?
35
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
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.