Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| courses:cs211:winter2018:journals:thetfordt:chapter7 [2018/04/02 14:24] – thetfordt | courses:cs211:winter2018:journals:thetfordt:chapter7 [2018/04/02 15:53] (current) – thetfordt | ||
|---|---|---|---|
| Line 31: | Line 31: | ||
| I would rate the readability of this section at 8/10. | I would rate the readability of this section at 8/10. | ||
| - | ===== Section 7.5 - Extensions to the Maximum Flow Problem ===== | + | ===== Section 7.5 - A First Application: |
| + | In this section, we address an old problem: The Bipartite Matching Problem, but we do it using the Ford Fulkerson Algorithm. We want to use the Ford Fulkerson Algorithm in order to find the largest Matching M in G, a subset of the edges such that each node appears in at most one edge in M. | ||
| + | Given the bipartite graph G, we direct all edges in G from X to Y (the two sets), add a node s, and edges (s,x) to all nodes in X, add a node t, and edges (y,t) for all nodes in Y. And after doing this, we just run the Ford Fulkerson Algorithm to obtain a maximum s-t flow in this new network we have created. And the assertion is that the value of this flow is equal to the size of the largest matching M in G. (Note all edges have capacity 1). | ||
| + | When considering the set of edges M' that connect x's to y's, the section walks through the assertions that M' contains k edges, each node in X is the tail of at most one edge in M', and each node in Y is the head of at most one edge in M'. With these facts, we can reason that the size of the maximum matching in G is equal to the value of the maximum flow of the network flow created from G, and the edges in that matching are edges that carry flow from X to Y in G'. | ||
| + | When analyzing the runtime of this algorithm, we note that the ' | ||
| + | |||
| + | The section uses the rest of the section to discuss bipartite graphs that do not have perfect matchings. If we have a perfect matching, for every subset A of X of nodes such that Gamma(A) equals the nodes which the nodes in A are mapped to, then Gamma(A) must be greater than or equal to the size of A. Again, this statement is also true vice versa. That is, if we have a bipartite graph with sides X and Y, the graph either has a perfect matching, OR, there is a subset A of X such that the size of Gamma(A) is less than the size of A. And since we are using the Ford Fulkerson Algorithm to accomplish this, this can be done in O(mn) time. | ||
| + | |||
| + | I would rate the readability of this section at 6/10. | ||
| + | |||
| + | ===== Section 7.7 - Extensions to the Maximum-Flow Problem ===== | ||
| + | |||
| + | The section begins by laying out the premise- that many different types of problems can be slightly altered to be solved in the same way we solve the maximum-flow problem. | ||
| + | |||
| + | The first problem outlined here is the problem surrounding circulations with demands. Suppose that incoming flow is demand, and outgoing flow is supply. And we are given a graph G with multiple source nodes and multiple sink nodes. We are seeking to satisfy all of the demand of the given graph. | ||
| + | |||
| + | In order to design an algorithm to see if there is a feasible circulation with demands in G, we slightly alter the original G and use the Ford Fulkerson Algorithm to figure this out. We alter it by creating a super-source s* and a super-sink t*, where the super source has edges to all other sources and each of the initial sinks have an edge to the super sink. It turns out that the circulation is feasible if and only if the maximum s*-t* flow is G' has value equal to the summations of each individual node's demand. | ||
| + | |||
| + | The problem is then slightly altered. Suppose that there are lower bounds on the edges in terms of the flow that passes through them. In order to do this, we just slightly modify the input. We let G' have the same nodes and edges, but the capacity of each edge is the original capacity minus that edge's lower bound. The section then walks through the proof that this modification plugged into the Ford Fulkerson Algorithm will produce the desired results. | ||
| + | |||
| + | I would rate the readability of this section at 6/10. I found 7.5 and 7.7 very difficult to grasp as we have not yet covered them in class. | ||
