1 / 83

GENERALIZED FLOWS

GENERALIZED FLOWS. Jonathan Kalechstain 27.5.2013 Tel Aviv University. Introduction. Until now, we made an assumption that if k units of flow leaves node u, then k units of flow arrives at node v.

Télécharger la présentation

GENERALIZED FLOWS

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. GENERALIZED FLOWS Jonathan Kalechstain 27.5.2013 Tel Aviv University

  2. Introduction • Until now, we made an assumption that if k units of flow leaves node u, then k units of flow arrives at node v. • This assumption may not be always true, like in transmission of unstable gas , or leaking pipes. u v k

  3. Using multipliers • We are given a graph • We associate a positive with every arc • Assume that if 1 unit of flow was sent from node i along the arc then units of flow arrived at node j. • Notice that the model is a generalization of the minimal cost flow problem, with every arc having the multiplier

  4. Example Assume that V received 8 units of flow! u v 10

  5. Notations and Assumptions • G=(V,E) is a directed graph • Capacity function u(v,w) > 0 for every • Cost function c(v,w) for every • An arc multiplier for every • Balance function b(v) for every we will have a number • b(v) > 0 – supply • b(v) < 0 – demand

  6. Formulation Of The Generalized Flow Problem(linear programming) • Minimize Subject to: And

  7. An Important Remark • is an upper bound on the flow that we send from i, not the flow that arrives at node j. • is the cost per unit flow we send from i, not the per unit cost that arrives at node j

  8. Example Assume that and V received 8 units of flow and we pay 40 units not 32! u v X(u,v)=10

  9. Augmented Forest structures

  10. Flows along Paths • Let P be a path from node s to node t (not directed) in the network. Let and denote the sets of forward arcs and backwards arcs in P. • Definition: the path multiplier of a path P is defined as follows: Forward arc means that if we send flow along a path, the arc is the same direction as the path. If it’s in opposite direction we call it a backward arc

  11. Example All arcs are forward arcs v u 1 0.5 4 4 5 3 2 1

  12. Example ( , ) v u 1 0.5 4 4 5 3 2 1 • Add two units of flow from 1 to 2! • 2 receives 6 units of flow

  13. Example ( , ) v u 1 (6,0.5) 4 4 5 3 2 1 • 2 send its 6 unit of flow out! • 3 receives 3 units of flow

  14. Example ( , ) v u 1 0.5 (3,4) 4 5 3 2 1 • 3 send its 3 unit of flow out! • 4 receives 12 units of flow

  15. Example ( , ) v u (12,1) 0.5 4 4 5 3 2 1 • 4 send its 12 unit of flow out! • 5 receives 12 units of flow • 2 units were first sent, and eventually 12 were received. Notice the relation is 6

  16. Example Not all arcs are forward arcs v u 6 2 4 3 2 1

  17. Example ( , ) v u 6 2 4 3 2 1 • Add one units of flow from 1 to 2! • 2 receives 2 units of flow

  18. Example ( , ) v u (-,6) 2 4 3 2 1 • In order to keep the mass balance constraint, after node 2 got 2 units of flow, 3 decreases it’s flow by one third of a unit • 2 receives -2 units of flow

  19. Example ( , ) v u 6 (2,) 4 3 2 1 • Now to keep the mass balance constraint node 3 adds of flow. • Node 4 receives extra units of flow. • So after sending 1 unit of flow from 1, 4 gets units. • Therefore the multiplier is .

  20. Conclusion • Property 1: If we send 1 unit of flow from node s to another node t along a path P, then units become available at node t.

  21. Flows along Cycles • Let W be a path from node s to itself (not directed, with some orientation) in the network. Let and denote the sets of forward arcs and backwards arcs in W. • The cycle multiplier of a circle W is :

  22. Some definitions • If , then an excess is created in node s. we call this a gainy cycle. • If , then a deficit is created in node s. we call this a lossycycle. • If , then mass balanced is conserved in all nodes. we call this a breakeven cycle.

  23. Property 2: if is the multiplier of a cycle W with a particular orientation, then is the multiplier of the same cycle with opposite direction Proof: nominator and denominator switch by definition. • Property 3: if the cycle is loosy with one orientation and gainy with the other.

  24. Property 4: By sending units along a nonbreakeven cycle starting at node s, we create an imbalance of units at node s. Proof: at first we send units, and then by property 1, units arrive back at node s, so the size of the imbalance is - Reminder: Property 1: If we send 1 unit of flow from node s to another node t along a path P, then units become available at node t.

  25. Augmented Tree • Let be a subgraph of such that and . • is considered an augmented tree if is a spanning tree of together with some extra edge which is called the extra arc • An augmented tree has a designated node called the root. Each augmented tree is hanging from it’s root

  26. Example b and c are two augmented trees of the graph a. The extra arc is represented by a dashed line

  27. An augmented tree contains exactly one circle. • The cycle is referred to as the extra cycle • An augmented tree is called a good augmented tree if for the extra cycle W

  28. Augmented Forest • We define an augmented forest when as a collection of node-disjoint augmented trees that span all the nodes in the graph. • An augmented forest is considered good if each of it’s components is a good augmented tree. • See 2 slides ago at d, to see an example of an augmented forest of the graph. • The arcs of the augmented forest are called augmented-forest arcs and the remaining arcs are called nonaugmented-forest arcs

  29. Augmented Forest Structures and Optimality Conditions • Let • Let define a partition of E, and let F be a good augmented forest. • we refer to the arcs in L as nonaugmented-forest arcs at their lower bound • we refer to the arcs in U as nonaugmented-forest arcs at their upper bound. • The triple defines an augmented forest structure.

  30. Feasibility • An augmented forest structure is feasible if we set and and the flow X on the augmented-forest arcs satisfy the generalized flow definition (mass balance constraints and flow bounds). • We say that an augmented forest structure is nondegenerate if • We will also say that a feasible augmented forest structure is an optimal augmented forest structure if its associated flow X is an optimal solution of the generalized flow problem

  31. Node Potentials and Reduced Costs • Let be the node potentials function • With respect to , we define the reduced cost of an arc as :

  32. Generalized Flow Optimality Condition • A flow x* is an optimal solution of the generalized network flow problem if it is feasible and for some potential function the following conditions are satisfied: • If then • If then • If then

  33. Proof Claim 1 : minimizing is equivalent to minimizing Similar to a proof was given in the past Back to the sentence: letx be some arbitrary flow.

  34. If then If then If then Looking at Let’s prove that each term in the summation is not negative: Lets look at the following 3 cases to prove this: • in this case it is given that • in this case =0, and because , we multiply two non negative numbers so the result is not negative. • in this case =, and because , we multiply two non positive numbers so the result is not negative.

  35. So now , which means that . We showed that with the 3 conditions, some feasible flow is minimal.

  36. Augmented Forest Structure Optimality Conditions This property’s proof is immediate from the last sentence: • A feasible augmented forest structure with the associated flow is an optimal augmented forest structure if for some function the pair satisfy the following optimality conditions: • (because ) • (because ) • (because )

  37. Determining Node Potentials for an Augmented Forest Structure • Let be an augmented forest structure. The augmented forest F contains several augmented trees. • The following algorithm is performed per tree. • Let be some augmented tree, and let node h be it’s root. • We would like to satisfy the condition that , so we use the following equation:

  38. The main idea • We start by setting which will be determined later. • We then use DFS on the not directed tree T, and because of connectivity and DFS properties, we will always know or when , so for each node we will get a single equation with one variable (and ). • We use the extra arc to determine , and update the potentials (they are linear functions of ).

  39. Algorithm pseudo code

  40. Example Special arc v u (10,1) (5,2) (6,3) (10,2) (8,3)

  41. Example Special arc Determine root (10,1) (5,2) (6,3) (10,2) (8,3)

  42. Example Special arc Running DFS(not including the special arc), going to red. root (10,1) (5,2) (6,3) (10,2) (8,3)

  43. Example Special arc Running DFS(not including the special arc), going to yellow. root (10,1) (5,2) (6,3) (10,2) (8,3)

  44. ……… Special arc root (10,1) (5,2) (6,3) (10,2) (8,3)

  45. Special Arc Special arc root (10,1) (5,2) (6,3) Time complexity: O(n) (10,2) (8,3)

  46. Determining Flow for an Augmented Forest Structure • Let be an augmented tree structure with the current assumption that the network is uncapacitated, which means . • We present an algorithm determining the flow for each augmented tree. • In this algorithm we start from the leaf nodes, and advance toward the root.

  47. Let be some augmented tree of the forest. • We define as the imbalance of a node, and begin with . • We set the flow of the extra arc and all other arcs get flow 0. • We can say we decreased the imbalance at node a by units, and increased it at node b by units. • Now we start updating the graph in the following way:

  48. Case 1: More of the tree After update, we delete the leaf node j and the relevant edge e(i)+ e(i) j j 0 e(j) j is a leaf node

  49. Case 2: More of the tree After update, we delete the leaf node j and the relevant edge e(i)+ e(i) j j 0 e(j) j is a leaf node

  50. After updating the rest of the leaves (each time we get a new tree ) each arc is a function of • we set , calculate the value of , and place it in all of the arcs flows. • Now we have a flow that satisfy the mass balance constraint (if all arcs were not capacitated)

More Related