1 / 35

Lecture 8

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. Source. Destination.

virginia
Télécharger la présentation

Lecture 8

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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. Source Destination Example a 1 1 1 1 1 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. 1 1 1 2 1    1  . . . 1 1 n Defects of Augmenting Path Algorithm Sending flow along a path requires O(V) complexity. Since there are n separate paths, we need to push flow through n paths separately. Every time complexity is O(V)

  6. 1 1 1 2 1    1  . . . 1 1 n 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.

  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 A node (which is not source nor destination), with excess flow is called an active node. 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 ruv Then flow routed along (u, v) is min(e(u), ruv )

  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. 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 source E = 4 1 1 3 4 3 2 2 2 2 1 1 1 1 4 4 4 3 3 3 5 3 5 2 2 2 2 E = 2 0 0 0 0 2 1 1 1 1 1 1 1 2 2 2 4 4 4 2 4 destination source source 1 1 3 3 1 1 4 4 E = 1 E = 1 destination destination source E = 1 destination Original Network/Residual Network with 0 flow Relabel node 2 to 2 Route 1 unit through 2-3

  13. 1 1 2 4 4 3 3 1 2 2 4 5 2 2 1 1 0 2 1 1 2 2 4 4 source source destination destination E = 1 Route 1 unit through 3-4 1 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(V2E)

  16. Specific Implementations of Generic Preflow-Push algorithm Order of selection of active nodes has not been nailed down in the generic version (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

  17. While pushing flow from this active node, the newly created active nodes are added to the back of the list In the latter case, the node is relabeled and added to the back of the list and picks the second node from the list. The algorithm terminates when the list is empty 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 O(V3) complexity

  18. Problem with FIFO Source 1 1 1 1 1      2 n -1 1 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(V2E0.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 d4 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 Ei Transmission energy from node i to j is eij for each transmission (depends on the distance between the two nodes) Let there be C sessions Let Qic be the rate of packet generation in node i for session c Let qijc be the rate of information transmission in link i, j for session c under the current routing (routing determines the qijc )

  26. Every node has a maximum power. So there is a set of neighbors Si of node i. Lifetime of a node i under flow q is Ti(q)= Ei/j  Si eijc  Cqijc Lifetime of a system is minimum of all its nodes Tsys (q)= mini Ti (q) Let Dc be the set of destinations of session C Session c information must reach some node in Dc

  27. Lifetime Maximization Objective Maximize Tsys (q)= mini Ei/j  Si eijc  Cqijc Subject to: qijc0 i  Sj qjic + Qic= j  Si qijc  session c, and all nodes i Dc

  28. Reformulation Maximize Tsys (q) Subject to: j  Si eijc  CqijcTsys (q)Ei  session c, and all nodes i qijc0 i  Sj qjic + Qic= j  Si qijc  session c, and all nodes i Dc Let qijc = qijcTsys (q)

  29. Reformulation Maximize Tsys (q) Subject to: j  Si eijc  CqijcEi  session c, and all nodes i qijc0 i  Sjqjic + Tsys (q)Qic= j  Siqijc  session c, and all nodes i Dc

  30. Special Case Consider the special case where every session has a single source, i.e., Qic = 0 at all nodes except the source of session i. Thus, Qc is the input rate for session c. Also, eij = ei  neighbors j of i. Also, pijc = qijcTsys (q)/ Qc The problem can be reformulated as follows:

  31. Reformulation Maximize Tsys (q) Subject to: j  Si c  CpijcEi /ei session c, and all nodes i pijc0 i  Sj pjic= j  Si pijc session c, and all nodes i except source and destination of session c. i  Sj pjic + Tsys (q)= j  Si pijc

  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, eij 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. MIRA, JSAC 2000, Kar et. al A non-zero capacity edge (u, v) belongs to some minimum cut if and only if it satisfies all the above properties.

More Related