Applied Combinatorics, 4rth Ed. Alan Tucker

  • Published on
    13-Feb-2016

  • View
    48

  • Download
    0

DESCRIPTION

Applied Combinatorics, 4rth Ed. Alan Tucker. Section 4.3 Graph Models Prepared by Jo Ellis-Monaghan. Real World Applications Of Network Flows Maximizing the flow of oil between two cities using a large pipeline network. Maximizing the number of telephone calls possible between two places. - PowerPoint PPT Presentation

Transcript

<ul><li><p>Applied Combinatorics, 4rth Ed.Alan Tucker</p><p>Section 4.3Graph Models</p><p>Prepared by Jo Ellis-Monaghan</p><p>Tucker, Sec. 4.3</p></li><li><p>Real World Applications Of Network Flows</p><p>Maximizing the flow of oil between two cities using a large pipeline network.Maximizing the number of telephone calls possible between two places.Calculating the maximum bandwidth of a computer network.</p><p>Tucker, Sec. 4.3</p></li><li><p>k(e) represents the capacity of an edge e in the network.f(e) is how much is actually going along the edge (the flow).s(e) = k(e) f(e) is the slack on the edge. If s(e) = 0, say e is saturated. In(x) = Set of edges directed into x.Out(x) = Set of edges directed out from x.Source, a = Initial starting vertex.Sink, z = Ending vertex.</p><p>Note: The edge labels are (k(e), f(e)), the capacity and flow on each edge.</p><p>Tucker, Sec. 4.3</p></li><li><p>a-z Flow: an integer-valued function f defined on each edge e that satisfies the following conditions:a)b)c)</p><p>Tucker, Sec. 4.3</p></li><li><p>Cut:Let denote the set of all edges with vertex This set is known as a cut. Note: denotes the complement of P.Bold edges are in the cut.The grey edge is not in the cut since it goes from to P.The dashed line represents the cut.Say is an a-z cut if _________________________________________________</p><p>Tucker, Sec. 4.3</p></li><li><p>_________________________________________________The Capacity of a Cut:Just add up the capacities on the edges going from P to .</p><p>Here, </p><p>Tucker, Sec. 4.3</p></li><li><p>An observation: Let P not contain a or z. Since then</p><p>Note that if x and y are both in P, and there is an edge e from x to y, then f(e) appears on both sides of the equation, so we can cancel it.</p><p>P = {b,d,e}</p><p>Tucker, Sec. 4.3</p></li><li><p>This leaves only flows on edges from a vertex in to a vertex in P on the left side of the equation, and only flows out of a vertex in P to a vertex in on the right side. Thus,( ) For each vertex subset P not containing a or z, </p><p>The flow into P equals the flow out of P.(sum of green-to-blue flows = sum of blue-to-green flows)</p><p>Tucker, Sec. 4.3</p></li><li><p>Theorem 1:For any a-z flow f , the flow out of a equals the flow into z.Proof:Let P be all vertices in N except a and z, so . The only flow into P from {a,z} must be from a, since condition (c) forbids flow from z. Similarly by condition (c), all flow out of P must go to z.Thus:</p><p>__________________________________________________________________________________________________</p><p>Tucker, Sec. 4.3</p></li><li><p>_________________________________________________The Value of an a-z Flow:Just add up the flows on the edges going out of a, or equivalently, going into z.</p><p>Here, Note,</p><p>Tucker, Sec. 4.3</p></li><li><p>Theorem 2:</p><p>Intuitively, should equal the total flow from which is bounded by . For any a-z flow f and any a-z cut in a network N, </p><p> __________________________________________________________________________________________________</p><p>Tucker, Sec. 4.3</p></li><li><p>Expand the network N by adding a new vertex with an edge of immense capacity, and flow . Note that and z will be in for the resulting cut. Proof: zaeaPoriginalEdges between P and</p><p>Tucker, Sec. 4.3</p></li><li><p>Proof: ContinuedNow apply condition ( ) from slide 8 to P in the new network. It says that the flow into P, which is at least equals the flow out of P. Thus:</p><p>Tucker, Sec. 4.3</p></li><li><p>Corollary 2a:For any a-z flow f and any a-z cut in a network N, if and only if:</p><p>For each edge For each edge</p><p>Further, when , f is a maximal flow and is an a-z cut of minimal capacity._________________________________________________</p><p>Tucker, Sec. 4.3</p></li><li><p>Proof: Corollary 2aRecall:</p><p>The first inequality is an equalitythe flow from into P (in the expanded network) equals if condition (i) holds; </p><p>so that e is the only edge feeding into P,otherwise the flow into P is greater than . _________________________________________________</p><p>Tucker, Sec. 4.3</p></li><li><p>The second inequality is an equalitythe flow out of P equals if condition (ii) holds; </p><p>otherwise it is less. </p><p>Thus if and only if conditions (i) and (ii) are both true. The last sentence in the corollary follows directly from Theorem 2Proof: Corollary 2a, continued_________________________________________________</p><p>Tucker, Sec. 4.3</p></li><li><p>By Theorem 2, </p><p>Thus if</p><p>Then is as big as possible (say f is a maximum flow), and is as small as possible(say is an a-z cut of minimal capacity).Proof: Corollary 2a, continued_________________________________________________</p><p>Tucker, Sec. 4.3</p></li><li><p>Goal-- Find maximum flows in networks.Method I: Flow paths(Fast and easy, but not necessarily the best)A flow path is just a path from a to z.</p><p>Tucker, Sec. 4.3</p></li><li><p>Basic ideaFind a flow path and push as much as possible along it.Find another flow path, using only unsaturated edges, and push as much as possible along it.And so on, until you cant find any more flow paths along unsaturated edges. </p><p>Tucker, Sec. 4.3</p></li><li><p>Start with 0 flow on all edges.Find a flow path, L1. Can push 3 units along it.Find another flow path, L3. Can push 3 units along it.Find another flow path, L2. Can push 2 units along it.Find another flow path, L4. Can push 1 unit along it.Cant do any more, so the flow is f = 3 L1 + 2 L2 + 3 L3 + 1 L4</p><p>Tucker, Sec. 4.3</p></li><li><p>Note--all of the edges have been saturated in the cut ,where , and , so</p><p>And hence by corollary 2a on slide 14, this flow is maximal.</p><p>How do we know.That we are done?That this is the best possible flow?</p><p>= the sum of the flow out of a.</p><p>Tucker, Sec. 4.3</p></li><li><p>Yes, but how would we find the cut in a large messy network?</p><p>And what if we hadnt noticed the last flow path and stopped too soon?</p><p>Also note that we were essentially trying all possible paths from a to z, which isnt feasible in a large network.</p><p>Tucker, Sec. 4.3</p></li><li><p>Augmenting Flow Algorithm</p><p>Label vertex a: [__, ].Pick a labeled vertex p with label [v*, n], and consider the unlabeled vertices adjacent to it.a. Label a vertex on a incoming edge e by [p-, m], where m = min{n, f(e)}provided that f(e) &gt; 0 b. Label a vertex on an outgoing edge e by [p+, m], where m = min{n, s(e)},provided that s(e) &gt; 0 </p><p>If you cant label any more vertices following the procedure in step 2, (if the edge flows and slacks are all zero), and z is unlabeled, then. </p><p>Let P be the set of labeled vertices, and is a saturated a-z cut, so </p><p> is a minimal cut and f is a maximal flow with by Cor. 2a </p><p>Tucker, Sec. 4.3</p></li><li><p>Augmenting Flow Algorithm, cont</p><p>If z has been labeled, go to step 4. Otherwise, go to step 2.Find an a-z chain* backtracking the labels. Increase the flow in the forward edges from a to z (decrease the flow in the backward edges) m units, where m is the second label on z.Remove all the vertex labels (but not the new edge labels!) and return to step 1. Continue doing this until you get stuck on step 2, which is when you are finished, having found a min cut/max flow.</p><p>* A chain is just a path along the edges of the graph that doesnt have to follow the directions of the arrows.</p><p>Tucker, Sec. 4.3</p></li><li><p>TipThis algorithm assumes that the original flow is 0 on all the edges, and for a computer program this works just fine.</p><p>However, if you are finding a max flow by hand, you can reduce the amount of work by starting with a pretty good flow constructed from flow paths before implementing the algorithm.</p><p>In fact, if your pretty good flow is actually maximal, the algorithm will confirm this in the first run through (you will get stuck on step 2 before reaching z).</p><p>Tucker, Sec. 4.3</p></li><li><p>ExampleadcfbezK1K2K34K1+ 5K2+ 4K3Use flow paths to get a pretty good flow.</p><p>Tucker, Sec. 4.3</p></li><li><p>Apply algorithm</p><p>Tucker, Sec. 4.3</p></li><li><p>Getting(_, )(a+, 2)(c+ ,2)(f+ ,2)(b+, 2)(d-, 2)(a+, 2)Now backtrack from z to get an a-z chain</p><p>Tucker, Sec. 4.3</p></li><li><p>Now augment along the chain from a to z by the amount of the label on z</p><p>Tucker, Sec. 4.3</p></li><li><p>Now run the algorithm again on this new flow.</p><p>Tucker, Sec. 4.3</p></li><li><p>Getting(_, )(c+, 2)(c+ ,1)(f+ ,1)(b+, 2)(e+, 2)(a+, 2)Now backtrack from z to get an a-z chain</p><p>Tucker, Sec. 4.3</p></li><li><p>Now augment along the chain from a to z by the amount of the label on z</p><p>Tucker, Sec. 4.3</p></li><li><p>Now run the algorithm again on this new flow.</p><p>Tucker, Sec. 4.3</p></li><li><p>Cant label any more, so let P be the labeled vertices. </p><p>acfezdb(_, )(c+, 1)(b+, 1)(e+, 1)(a+, 1)The capacity of the cut is the size of the flow, here 9 + 3 + 4 =16.</p><p>Tucker, Sec. 4.3</p></li><li><p>Theorem 3For any given a-z flow f, a finite number of applications of the augmenting flow algorithm yields a maximum flow. If P is the set of vertices labeled during the final application of the algorithm, then is a minimal a-z cut set.</p><p>Tucker, Sec. 4.3</p></li><li><p>Proof of Theorem 3If f is the current flow and K is the augmenting a-z flow chain, we must show the new flow f + m K is a legal flow, where m is the label on z.</p><p>Check that f + m K satisfies the flow conditions:</p><p>So yes, it is a valid flow.</p><p>Tucker, Sec. 4.3</p></li><li><p>Proof of Theorem 3 (cont.)Each time we reach z in the algorithm, we augment the flow by a positive integer m, increasing the flow along some edges. But the capacities on the edges (and the number of edges) is finite, so eventually the algorithm must get stuck on step 2, failing to label z.</p><p>Tucker, Sec. 4.3</p></li><li><p>Proof of Theorem 3 (cont.)Let P be the set of labeled vertices when z is not labeled.Clearly is an a-z cut since a is labeled and z is not.</p><p>Tucker, Sec. 4.3</p></li><li><p>Proof of Theorem 3 (cont.)There is no edge with non-zero slack (i.e. where the flow on the edge doesnt equal the capacity) from any labeled vertex p to any unlabeled vertex q or else q would have been labeled.</p><p>Thus, by Cor. 2a, is minimal and the flow is maximal. </p><p>Tucker, Sec. 4.3</p></li><li><p>Class exerciseapply augmenting flow algorithm.</p><p>Tucker, Sec. 4.3</p></li></ul>

Recommended

View more >