Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
courses:cs211:winter2012:journals:ian:chapter7 [2012/04/04 03:54] – 7.2 sturdyi | courses:cs211:winter2012:journals:ian:chapter7 [2012/04/04 04:06] (current) – 7.7 sturdyi | ||
---|---|---|---|
Line 12: | Line 12: | ||
* No insights. | * No insights. | ||
* I would have liked to see an explanation of why rational numbers are permissible (which is, I believe, because in any finite graph with rational capacities there is a lcm of the capacities, and if all capacities are multiplied by that we get an integer graph). In any event, unless I miss something they say that the requirement that the flows be integers is necessary, state the problems with irrational capacities, and then state that real problems might have rational capacities, without showing that the rational capacities are workable. | * I would have liked to see an explanation of why rational numbers are permissible (which is, I believe, because in any finite graph with rational capacities there is a lcm of the capacities, and if all capacities are multiplied by that we get an integer graph). In any event, unless I miss something they say that the requirement that the flows be integers is necessary, state the problems with irrational capacities, and then state that real problems might have rational capacities, without showing that the rational capacities are workable. | ||
+ | |||
+ | ====== 7.5 Bipartite Matching ====== | ||
+ | |||
+ | * The FFA can be used to solve bipartite matching, finding the greatest subset of a bipartite graph such that each node has at most one incident edge. Make all edges directed with unit capacity (in uniform direction) and add a source and sink, with unit capacity edges into the nodes chosen as the origin of the edges between the original nodes, and unit capacity edges from the destination nodes to the sink. The subset of the original edges with positive flow in a valid flow through this graph are a valid matching of the original graph, since each origin node only has one unit of incoming flow to distribute and each destination node can only handle one unit of flow. Thus, an optimal flow is a greatest matching. The creation of the new graph is O(m+n), and the capacity out of the source is O(n). Thus, it takes O(mn) (referring back to the FFA running time). | ||
+ | * No questions. | ||
+ | * No insights. | ||
+ | * No complaints. | ||
+ | |||
+ | ====== 7.7 Extensions ====== | ||
+ | |||
+ | * The algorithm can also handle distributed sources and sinks (each node has a supply or demand associated with it). Add a source with edges to each supply node with capacity equal to the supply of the incident node, and likewise add a sink connected to demand nodes. A circulation exists iff the maximum flow through this graph equals the sum of supplies and the sum of demands. One can further generalize to have lower bounds for nodes; before modeling the supply and demand, increase the demand of origin nodes of edges with lower bounds by that bound, and likewise decrease the demand of the destination nodes, and then solve as above for a maximum flow. | ||
+ | * No questions. | ||
+ | * No insights. | ||
+ | * No complaints. | ||
+ | |||
+ |