Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
courses:cs211:winter2014:journals:gabi:home [2014/04/01 21:47] – [Chapter 7.1] tremogcourses:cs211:winter2014:journals:gabi:home [2014/04/02 01:21] (current) – [Chapter 7.7] tremog
Line 1779: Line 1779:
 -> for each edge e == (u,v) of G on which F(e) < ce there are ce - f(e) "leftover units" of capacity on whih we can place flow.  -> for each edge e == (u,v) of G on which F(e) < ce there are ce - f(e) "leftover units" of capacity on whih we can place flow. 
  
-The algorithm we are using is called th Ford-Fulkerson algorithm. And it terminates in at most C iterations of the While loop.+The algorithm we are using is called the Ford-Fulkerson algorithm. And it terminates in at most C iterations of the While loop.
  
 Thus, the F-F algorithm can be implemented in O(mC) time!!! Thus, the F-F algorithm can be implemented in O(mC) time!!!
Line 1793: Line 1793:
   * -> For each edge 9u,v) in P   * -> For each edge 9u,v) in P
   * -> -> If e == (u,v) is a forward edge then increase f(e) in G by b   * -> -> If e == (u,v) is a forward edge then increase f(e) in G by b
-  * -> -> Else ((u,v) is a backyard edge, and let e = (v,u)+  * -> -> Else (u,v) is a backward edge, and let e = (v,u) 
-  * ->->-> Decerase f(e) in G by b+  * ->->-> Decrease f(e) in G by b
   * ->-> Endif   * ->-> Endif
   * -> Endfor   * -> Endfor
Line 1804: Line 1804:
  
 MaxFlow() MaxFlow()
-  * -> Initally f(e) = 0 for all e in G+  * -> Initially f(e) = 0 for all e in G
   * -> While there is an s-t path in the residual graph G   * -> While there is an s-t path in the residual graph G
   * ->-> Let P be a simple s-t path in Gf   * ->-> Let P be a simple s-t path in Gf
   * ->-> f' = augment(f,p)   * ->-> f' = augment(f,p)
-  * ->-> Updatef to be f'+  * ->-> Update f to be f'
   * ->-> Update the residual graph Gf to be Gf'   * ->-> Update the residual graph Gf to be Gf'
   * -> Endwhile   * -> Endwhile
Line 1827: Line 1827:
 **Readability (scale: 1-10):**  **Readability (scale: 1-10):** 
  
-7. Pretty cklear in some parts. Could be cloudy in others  (namely page 345 and 343, I had to re-read those a few times to get them straight).+7. Pretty clear in some parts. Could be cloudy in others  (namely page 345 and 343, I had to re-read those a few times to get them straight).
 ==== Chapter 7.2 ==== ==== Chapter 7.2 ====
 +
 +//**7.2: Maximum Flows and Minimum Cuts in a Network**//
 +
 +**Summary:**
 +
 +Our goal is to go ahead and show that the flow that is returned by the F-F algorithm has the maximum flow possible of any other flow in G. How do we check this??? We want to look at the way in which the structure of the flow network places upper bounds on the max value of s-t flow. 
 +
 +We already have one bound: the value of v(f) of any s-t flow. That, at most, is C = SUM (e out of s Ce) 
 +
 +(7.6) Let f be any s-t flow and (A,B) any s-t cut. Then v(f) = f(out(A)) - F(in(A)) 
 +
 +(7.8) Let f be any s-t flow, and (A,b) any s-t cut. Then v(f) < = c(A,B)
 +
 +In a sense, (7.8) looks weaker than (7.6) does since it is only an inequality rather can than equality. However, this becomes extremely useful for us, since the right-hand side is independent of any particular flow f.
 +
 +Basically, what (7.8) is saying is that //the value of every flow is upper-bounded by the capacity of every cut//
 +
 +(7.13) In Every flow network the max value of an s-t flow is equal to the minimum capacity of an s-t cut. 
 +
 +**Algorithms:**
 +
 +none
 +
 +**Questions:**
 +
 +What did I just read? That seems like a weird question but I'm slightly confused because I feel like I just read myself in circles.
 +
 +**What made sense?:**
 +
 +Very very little.
 +
 +**Key Points:**
 +
 +In a sense, (7.8) looks weaker than (7.6) does since it is only an inequality rather can than equality. However, this becomes extremely useful for us, since the right-hand side is independent of any particular flow f.
 +
 +Readability (scale: 1-10):
 +
 +5-6. I don't know. This section was very circuitous for me. It could be just that the entire chapter seemed to make very similar points the entire way around it or it could be that I have a hard time reading sums? I don't know. I just got lost and am still very confused as to what I just read.
 ==== Chapter 7.5 ==== ==== Chapter 7.5 ====
 +
 +//**7.5: A First Application: The Bipartite Matching**//
 +
 +**Summary:**
 +
 +One of our original goals in developing the Max-Flow problem was to be able to solve the Bipartite Matching problem. 
 +
 +The graph defining a matching problem is undirected, while flow networks are direction. However this is not difficult to implement to find a max matching solution. 
 +
 +We start by computing a max s-t flow in the network G'. We discover that the value of this maximum is equal to the size of the maximum matching in G. Also, our analysis shows that we can actually use the flow itself to recover the matching. 
 +
 +We do this by looking at three facts about M', which is the set of edges of the form (x,y) on which the flow value is one.
 +
 +1) M' contains k edges
 +2) Each node in X is the nail of at most one edge in M'
 +3) Each node in Y is the head of at most one edge in M' 
 +
 +Combining these facts we can see that if we view M' as a set of edges in the original bipartite graph G, we get a matching of size k. In short:
 +
 +(7.37) The size of the maximum matching in G is equal to the value of the max flow in G' and the edges in such matching in G are the edges that carry flow from X to Y in G' 
 +
 +
 +Moreover, we can do all of this in O(Mc) time since we are using the F-F algorithm!!! 
 +
 +**Algorithms:**
 +
 +the Ford-Fulkerson algorithm, which is actually discussed in section 1. 
 +
 +**Questions:**
 +
 +Why couldn't they have included the pseudo-code for this? I feel like there are some extra steps in this that need to be sorted out in order to figure out the answer to the problem. 
 +
 +**What made sense?:**
 +
 +The runtime!! (It's the same as section one ;) ) 
 +
 +**Key Points:**
 +
 +The graph defining a matching problem is undirected, while flow networks are direction. However this is not difficult to implement to find a max matching solution. 
 +
 +**Readability (1-10):**
 +
 +7. Would have been an 8 if there was some psudeo-code to go along with it. The psudeo-code always helps me sort through the text (since the texbook can be a little bit dense sometimes. The code is a nice outline)
 ==== Chapter 7.7 ==== ==== Chapter 7.7 ====
 +
 +//**7.7: Extensions to the Max-Flow Problem**//
 +
 +**Summary:**
 +
 +Many issues that can be solved with the Max-Flow problem have essentially nothing to do with the fact that it models traffic in a network. Who knew? It also helps with problems that have nontrivial combinatorial search components. It is very useful because it can be solved in poly-time with O(Mc) time because of the F-F algorithm.
 +
 +One of these problems is the :Circulations with demands: algorithm. For example, what if you had multiple sources and multiple sinks. In this problem, instead of maxing the flow value, we have to consider a problem in which the sources have fixed supply values and the sinks have fixed demands values and our job is to meet these demands. 
 +
 +(7:51) The Graph G has a feasible circulation with demands (dv) if and only if for all cuts (A,B)
 +
 +
 +If all of the capacities and demands in G are integers and there is a feasible circulation, then there is a feasible circulation that is integer-valued.  
 +
 +
 +**Algorithms:**
 +
 + Once again, the F-F algorithm from section one.
 +
 +
 +**Questions:**
 +
 +Where is the psudo-code? :(
 +
 +**What made sense?:**
 +
 +The real world application. I don't know why but I can visualize this problem well. Maybe not real world, but this is much less of an abstraction than the ones in 7.5 and 7.2
 +
 +**Key Points:**
 +
 +Many issues that can be solved with the Max-Flow problem have essentially nothing to do with the fact that it models traffic in a network. Who knew?
 +
 +**Readability (1-10):**
 +
 +7. No psudeo-code :(
 +
 +
 +
courses/cs211/winter2014/journals/gabi/home.1396388821.txt.gz · Last modified: 2014/04/01 21:47 by tremog
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0