Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching

Size: px
Start display at page:

Download "Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching"

Transcription

1 Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching Henry Lin Division of Computer Science University of California, Berkeley Berkeley, CA Abstract In this paper, we prove two new results related to finding maximum flows in directed graphs and finding maximum matchings in bipartite graphs. In our first result, we derive a new algorithm for finding maximum flows in directed graphs. Our algorithm works by reducing a maximum flow problem on a directed graph to a maximum flow problem on an undirected graph, and running the Karger-Levine algorithm to find a maximum flow in the undirected graph. Given a directed graph G = (V, E) with n nodes, m edges, maximum flow value v, and capacities c e, our reduction yields a Õ(m + n(v + i)) algorithm for finding a maximum flow in G, where i is the imbalance of the graph and defined to be i = P u V {s,t} P (w,u) E c (w,u) P (u,w) E c (u,w). For directed graphs with small imbalance, this yields a faster algorithm for computing maximum flows. In our second result, we show that the maximum flow problem on directed graphs with unit capacity edges can be reduced to the bipartite matching problem. Although our second result does not yield a faster algorithm for finding maximum flows in unit capacity directed graphs, it does show that if one can find a maximum matching in faster than o(mn 1/2 / log 3/2 n) time on bipartite graphs with n nodes and m = O(n) edges, then it would yield a faster algorithm for finding maximum flows in directed graphs, running in time o(m 3/2 ). In some sense, our second result may be viewed as a hardness result for finding faster bipartite matching algorithms. I. INTRODUCTION The maximum flow problem is one of the oldest and most well-studied problems in computer science. In the maximum flow problem, we are given a graph G = (V, E) with a source s V, a destination t V, and a capacity c e along each edge e E, and we seek to find a maximum flow from s to t such that the flow along each edge e is at most c e. This maximum flow problem was first defined over 50 years ago, and has a long history. Many algorithms have been derived for the problem and different running time bounds have been proved for the algorithms under various conditions. The maximum flow problem has four main variants, depending on whether or not the graph G is directed or undirected, and depending on whether or not the capacities c e are allowed to be arbitrary integers or are restricted to be unit capacity (c e = 1 for all e E). For conciseness, in this paper we will refer to these four main variants of the max flow problem as the general directed max flow problem, the general undirected max flow problem, the unit capacity directed max flow problem, and the unit capacity undirected max flow problem. (There are also results known for the max flow problem when the c e are only required to be real numbers, but we refer the reader to [4] for more details). Although it would be difficult to mention all the known maximum flow results, we mention some highlights in the history of maximum flow algorithms, and refer the reader to [4] for a more complete history. In the following results on finding a maximum flow in a graph G = (V, E), we let n = V be the number of nodes, m = E be the number of edges, and v the value of the maximum flow of G. One of the first algorithms for finding maximum flows in graphs was due to Ford and Fulkerson in 1956 [7]. Their algorithm solved the general directed max flow problem in O(mv) time, and for sparse graphs with small flow values, the original Ford- Fulkerson algorithm is still the best known algorithm. In the 1970 s, Dinic [1] and Edmonds and Karp [2] independently derived the first strongly polynomial time algorithms for the general directed max flow problem. Edmonds and Karp proved an O(nm 2 ) running time bound for the shortest augmenting path algorithm, while Dinic utilized the concept of blocking flows to obtain an O(mn 2 ) time algorithm [1]. Later developments were able to improve the best running time for the general directed max flow problem to Õ(mn) (see [4] exact details and a more complete history), and most recently in 1997, Goldberg and Rao were able to beat the Õ(mn) barrier by developing a O(min(m 3/2, mn 2/3 ) log(n 2 /m) log v) time algorithm for the general directed max flow problem [5]. In terms of the unit capacity directed max flow problem, Even and Tarjan [3] and Karzanov [10] independently proved that Dinic s algorithm runs in O(min(m 3/2, mn 2/3 )) time, and this is the best known bound for unit capacity directed graphs, besides the Ford-Fulkerson bound of O(mv). Of course, all of the above results for finding max flows in directed graphs also extend to finding max flows on undirected graphs, as there is a simple well-known reduction from the undirected max flow problem to the directed max flow problem: simply replace each undirected edge {u, v} with two directed edges (u, v) and (v, u) and set them to have the same capacity as the original undirected edge {u, v}. Even though, it was well-known that the undirected max flow problem was easier than the directed max flow problem, Karger was the first to show a result that indicated the undirected max flow problem might be strictly easier than the directed max flow problem.

2 More specifically, in 1994, Karger showed that a maximum flow could be found in Õ(mv/ c) time for undirected graphs with connectivity c [8]. Karger s seminal work in 1994 eventually culminated in the Karger-Levine randomized algorithm for the general undirected max flow problem, which ran in Õ(m + nv) expected time [9], and this is still the best known algorithm for finding maximum flows in undirected graphs with small v values. (See [9] for the best deterministic algorithms). It has been a long standing open question whether or not the Karger-Levine algorithm [9] could also be extended to yield a Õ(m + nv) algorithm for the directed max flow problem as well. In this paper, we show that the Karger-Levine undirected max flow algorithm does indeed have implications for the directed max flow problem. In particular, we show that there is a reduction from the directed max flow problem to the undirected max flow problem. By reducing the general directed max flow problem to the general undirected max flow problem, and running the Karger-Levine algorithm, we show that there is an Õ(m+n(v+i)) algorithm for computing maximum flows in general directed graphs, where i is the imbalance of the graph and defined to be i = u V {s,t} (w,u) E c (w,u) (u,w) E c (u,w). In other words, the imbalance of the graph is simply the sum over all nodes u s or t, the absolute value of the difference between the capacity of edges into u and the capacity of edges out of u. For the special case of unit capacity graphs, the imbalance of a graph is simply the sum over all nodes u s or t, indegree(u) - outdegree(u). Our reduction is surprisingly simple, yet appears not to be known. In our second result, we show that a unit capacity directed max flow problem can be reduced to a bipartite matching problem on n = O(m log n) nodes and m = O(m log n) edges. Given a bipartite graph on n nodes and m edges, the fastest known bipartite matching algorithms run in O(m n ) time [6], or O(n ω ) time [12], where ω is the matrix multiply constant. Thus, our reduction does not yield a faster maximum flow algorithm. However, it does show that if one can find a maximum matching in faster than o(m n / log 3/2 n ) time on a bipartite graph with n nodes and m = O(n ) edges, then it would yield an o(m 3/2 ) algorithm for the unit capacity directed max flow problem. This second result may be viewed as a hardness result for improving on the best known bipartite matching algorithms. In the next section, we prove the reduction from the directed max flow problem to the undirected max flow problem, and in Section 3, we prove the reduction from the unit capacity directed max flow problem to the bipartite matching problem. Lastly, we conclude with some open problems and acknowledgements. In this paper, we will assume readers are familiar basic concepts related to finding maximum flows and maximum matchings in graphs for example, the concept of residual graphs, flow decomposition, and the basic reduction from bipartite matching to directed max flow. For more background, see [11] for example. II. REDUCTION FROM DIRECTED MAX FLOW TO UNDIRECTED MAX FLOW In this section, we describe how the general directed max flow problem can be reduced to the general undirected max flow problem. By applying the Karger-Levine max flow algorithm for undirected graphs [9], we can then achieve an Õ(m+n(v +i)) time algorithm for finding maximum flows in directed graphs, where i is the imbalance of the graph, defined as i = u V {s,t} (w,u) E c (w,u) (u,w) E c (u,w). Before describing the reduction for graphs with general integer capacities, we start by showing how the unit capacity directed max flow problem can be reduced to the unit capacity undirected max flow problem. Given the reduction for unit capacity graphs, it will not be hard to see how the same idea also yields a reduction for graphs with general integer capacities. We now describe a high level picture of the reduction from the unit capacity directed max flow problem to the unit capacity undirected max flow problem. Given a directed graph G = (V, E) with n nodes, m edges, and max flow value v, we construct in O(m) time an undirected graph G = (V, E ) with n nodes, O(m) edges, and max flow (v+i), where i is the imbalance defined above. In the unit capacity setting, the imbalance is simply i = u V {s,t} indegree(u) outdegree(u). We then run the Karger-Levine algorithm on the undirected graph G to find a maximum flow f kl in G in Õ(m+n(v+i)) time. Once we have found a maximum flow f kl for the graph G, we can then modify f kl in O(m) time to get a maximum flow for G. Thus, the final running time of our algorithm for the unit capacity directed max flow problem will be Õ(m + n(v + i)). A. A Simple Lemma for Intuition Before we describe how the graph G is constructed and define the reduction exactly, let us first explain why one might expect that an algorithm for finding maximum flows in undirected graphs should also be able to find maximum flows in a directed graphs as well. Notice that if we follow any of the standard augmenting path algorithms for computing a maximum flow in an undirected graph, once we start sending flow in the undirected graph, we are left with a directed residual graph, and thus a directed max flow instance to solve. Thus, algorithms for finding a maximum flow in an undirected graph also seem to inadvertently require finding a maximum flow in a directed graph. Can we exploit this weak intuition in order to build a formal reduction? We formalize this intuition a bit further by proving the following simple lemma, which will be useful for our reduction: Lemma 1 For any directed graph G = (V, E), there exists an undirected graph G = (V, E ) and a flow f init, such that the residual graph of G with respect to the flow f init is essentially equivalent to the directed graph G. Without being too formal, the two graphs will be essentially equivalent in the sense that the residual graph will be the same as the graph G, except it will have additional edges into s and

3 out of t, and each edge will have capacity 2. We call these two graphs essentially equivalent, because finding a maximum flow in one graph is more or less equivalent to finding a maximum flow in the other. Proof: To prove the lemma, we need to define an undirected graph G and a flow f init for any given directed graph G, and show that the residual graph of G w.r.t. f init is essentially equivalent to G. To define our undirected graph G, we set G = (V, E ) to have the same nodes as G = (V, E), and for each edge (u, v) E, we add the following three edges to G : (a) {s, v}, (b) {u, v}, and (c) {u, t}. For notational purposes, we call these three types of edges (a) new source edges, (b) original edges, and (c) new destination edges, respectively. Note that G could be a multigraph, as it may have multiple edges between different pairs of nodes. Now to define the flow f init, f init will be a flow that sends m units of flow from s to t as follows: for every edge (u, v) in G, we send one unit of flow along the path s-v-u-t in G. Now that we have defined G and f init, let us check that the residual graph of G with respect to f init is essentially equivalent to the directed graph G. Note that for every edge (u, v) in G, there is an undirected edge {u, v} in G and one unit of flow traveling from v to u. As a result, in the residual graph of G, this flow subtracts one unit of capacity along the edge (v, u) and adds one unit of capacity along the edge (u, v). Thus the residual graph has no units of capacity along (v, u) and two units of capacity along (u, v). Furthermore, for any new source edge {s, v} in G, there is one unit of flow traveling along (s, v), which leaves two units of capacity along the edge (v, s) and no units of capacity along (s, v). Similarly, for the new destination edges {u, t}, the residual graph has two units of capacity along (t, u) and no units of capacity along (u, t). Thus, the residual graph of G with respect to flow f init is the same as G, except each edge (u, v) E has capacity 2, and the residual graph has additional edges with capacity 2 into s and out of t. Even though these two graphs are different, they are nonetheless essentially equivalent as we defined above. B. A Preliminary Reduction For reasons that will become clear later, now let us assume that we are trying solve a maximum flow problem on a directed graph G, which has capacity 2 on each edge. Given the above lemma, we can now define a simple way to reduce the directed max flow problem on G to a unit capacity undirected max flow problem. Given a directed graph G with capacity 2 along each edge, we can solve the maximum flow problem on G, via the following reduction: Given the directed graph G, construct the undirected graph G, as described in Lemma 1. in G Run Karger-Levine to find a maximum flow f kl Construct f init as described in Lemma 1, and return r(f kl f init ) as a maximum flow for G In the above reduction, the function r in the last step is a function that takes the flow f kl f init, and removes any flow cycles, before returning it as a maximum flow for G. The function r can be implemented in O(m) time by using a standard flow decomposition algorithm to decompose f kl f init into a set of simple s to t paths and flow cycles, and returning the set of simple s to t paths. Also note that the first step runs in O(m) time, but for now let us not worry about that the value of the maximum flow of G and running time of the Karger-Levine step. (The value of the maximum flow will be more than v + i as we wanted, but we ll fix that later). Let us first prove that the above algorithm works. To prove that our algorithm works, we need to prove that f = r(f kl f init ) is a valid flow for G and that f a maximum flow for G. In particular, we need to prove the following three statements: 1) f sends v G units of flow from s to t, where v G is the value of the maximum flow of G 2) f sends at most two units along any edge (u, v) E, and no units of flow from v to u. 3) f does not send any flow on any new source edges, nor any new destination edges. To prove statement 1, let us first compute v G, the value of the maximum flow of G. Note that if we send the flow f init through G, we have sent m units of flow through G, and have a residual graph which is essentially equivalent to the directed graph G. Thus, if v G is the value of the maximum flow of the directed graph G with capacity 2 along each edge, then the value of the maximum flow of G is v G = v G + m. Therefore, if f kl is a maximum flow for G, then it must send v G = v G + m units of flow from s to t. Now, if we subtract f init from f kl, we must have exactly v G units of flow traveling from s to t. Moreover, removing flow cycles from f kl f init does not change the amount of flow sent from s to t, so we know f must send exactly v G units of flow from s to t, and statement 1 holds. To prove statement 2, note that for every edge (u, v) E, we created an undirected edge {u, v} in G. Thus, the flow f kl may send -1, 0, or +1 units of flow from u to v (-1 units of flow from u to v means one unit of flow travels from v to u). However, note that by definition f init sends +1 unit of flow from u to v so that if we add the two flows, we see that f kl f init sends either 0, +1, or +2 units of flow from u to v, and no units of flow in the opposite direction. Furthermore, this statement is true even after removing flow cycles from f kl f init, and thus statement 2 holds as well. To prove statement 3, we show that r(f kl f init ) does not have any flow on any new source edges. The argument for proving that the new destination edges do not have any flow is exactly the same. To prove that r(f kl f init ) does not have any flow on any new source edges, consider a new source edge {s, v}. We know that f kl may have sent -1, 0, or +1 units of flow from v to s, but f init sends +1 unit of flow from v to s. Thus, if we add the two flows f kl f init must send 0, +1, or +2 units of flow from v to s. This means that if f kl f init is sending flow along the edge {s, v}, it must be going into s. However, if the flow is going into the source, then that must mean that it is participating in a flow cycle. As a result, it is clear that after removing flow cycles, there must not be any flow remaining on the new {s, v} edges. A similar argument

4 can be made for the new destination edges, and thus, statement 3 holds as well. C. Improving the Running Time and Extending the Reduction We have proved our reduction works, but what about the running time? As we argued above, the reduction yields a graph G with a maximum flow value of v + m, where v is the value of the maximum flow of the directed graph G and m is the number of edges of G. Thus our algorithm has a running time of Õ(m + n(v + m)), and not Õ(m + n(v + i)) as promised. However, note that our reduction was somewhat inefficient as it often adds a pair of new source and new destination edges to a single node v, i.e. it adds the edges {s, v} and {v, t}. It is not hard to show that if we remove these pairs of edges from G and remove the flow that f init sends on these edges, we are left with a new graph G and new flow f f init init such that the residual graph of G with respect to flow is still essentially equivalent to G. Moreover, for edges leaving s or entering t in the original graph G, we can just add those edges as undirected edges to G, without adding any additional new source or new destination edges, or sending any flow them. Lastly, for edges entering s or leaving t, we can just ignore those edges without influencing the value of the maximum flow. With these improvements in mind, it is not hard to see we have found a undirected graph G and f init a flow f init, such that the residual graph of G w.r.t f init is essentially equivalent to G, and G has maximum flow (v +i) as defined. Furthermore, applying the reduction defined in the previous section with the graph G instead of G yields a correct reduction as well, and the running time of the new reduction is Õ(m + n(v + i)) as promised. Also note that we solved the directed maximum flow problem on a graph G with capacity two along each edge. If we would like a solution to the maximum flow problem on a graph G with unit capacity on each edge, we can simply apply the same reduction and divide the final flow by 2. This flow will be a maximum flow for the unit capacity version of the problem, although it may not be integral. If one would like an integral max flow, it turns out there is a simple procedure to convert a half integral flow to an integral flow in linear time, which we prove in the next subsection. We believe this procedure may be novel as well, and may be of independent interest. Finally, in order to describe how one might reduce the general directed max flow problem to the general undirected max flow problem, note that a similar reduction can be derived when edges are allowed to have integer capacities. Simply consider each edge (u, v) with capacity c (u,v) as c (u,v) unit capacity edges between (u, v), and apply the same reduction works as before. The reduction still holds and the Karger- Levine algorithm still works for undirected graphs with integer capacities. Thus, we have a valid reduction, and the reduction can be implemented efficiently, so that the total running time is Õ(m + n(v + i)) as stated. D. Converting a Half-Integral Flow to an Integral Flow To convert a half integral flow to an integral flow, let us consider the equivalent problem of converting a flow f which sends 0, 1, or 2 units of flow along each edge into a flow of equal or greater value which sends either 0 or 2 units of flow along each edge. In order to do so, let us consider the set of edges E f, along which f sends one unit of flow. It is clear that for any node v s or t, the number of edges of E f which are adjacent to v must be an even number due to flow conservation and the fact that all of v s edges not in E f have an even amount of flow. Thus, if we treat the edges E f as undirected, it must be the case that we can be decompose E f into a set of cycles and s to t paths. Now consider a cycle consisting of edges in E f, and consider traversing the cycle in an arbitrary direction. This traversal may traverse some edges in E f in the correct direction, and some edges in E f in the reverse direction. Note that if we add one unit flow along each edge in the cycle, in the direction we traversed the cycle, we still have a flow that satisfies flow conservation, and we have not changed the value of the flow (the total amount of flow leaving s or entering t). Moreover, this addition has the effect of adding one unit of flow to each edge we traversed in the correct direction, and subtracting one unit of flow to each edge we traversed in the reverse direction. Thus, this addition converts each edge in E f into an edge with 0 or 2 units of flow depending on whether or not the edge was traversed in the correct or reverse direction. If we repeat this process for all edges in E f occurring in cycles, we can then convert all these edges into to edges with 0 or 2 units of flow, without changing the amount of flow sent from s to t. Now let us consider edges in E f appearing in an s to t path, and consider traversing the path from s to t. If we add one unit of flow along each edge in the direction which we traversed it, we increase the amount of flow sent from s to t, and maintain flow conservation at each intermediate node. Furthermore, this process adds one unit of flow to each edge we traverse in the correct direction, and subtracts one unit of flow to each edge we traverse in the reverse direction. As before, this process converts the flow along each edge we traverse into having value 0 or 2. Thus, by repeating this process, we can convert our original {0, 1, 2} flow into a {0, 2} flow with equal or greater flow sent from s to t in O(m) time, for a flow consisting of m edges. III. REDUCTION FROM DIRECTED MAX FLOW TO BIPARTITE MATCHING In this section, we show that the unit capacity directed max flow problem can be reduced to the bipartite matching problem. In order to prove the reduction, we define a new intermediate problem X and show that we can reduce the unit capacity directed max flow problem to our new problem X. We then show that X can be reduced to the bipartite matching problem. We call our new intermediate problem X the unit vertex capacity directed max flow problem. Our new unit vertex capacity directed max flow problem is exactly

5 like the unit capacity directed max flow problem, except that each vertex has unit capacity as well. That is, in the unit vertex capacity directed max flow problem, we seek to find a maximum flow in a directed graph G, such that the flow sends at most one unit of flow along any edge and at most one unit of flow through any node. In our reduction, we will reduce the unit capacity directed max flow problem into an instance of our intermediate problem X on a graph G with n = O(m log n) nodes and m = O(m log n) edges. We then show that an instance of our intermediate problem X on a directed graph G with n nodes and m edges can be reduced to a bipartite matching problem on a graph with O(n ) nodes and O(m ) edges. In the remainder of this subsection, we show the reduction from unit capacity directed max flow to problem X, and in the next subsection, we show the reduction from problem X to the bipartite matching problem. Given a unit capacity max flow problem on a directed graph G, we construct a unit vertex capacity max flow problem on a directed graph G, such that a maximum flow for the graph G, which respects unit vertex capacities, can easily be converted to a maximum flow for G. Note that the only problem with just setting the graph G to be the graph G is the fact that a maximum flow for G must respect unit vertex capacity constraints, while a maximum flow for G does not have any vertex capacity constraints and may send multiple units of flow through each node. In other words, a maximum flow for G = G, respecting the vertex capacity constraints, may not be a maximum flow for the unit capacity max flow problem on graph G. However, this problem can be fixed by replacing each node u in G, with a gadget in G which allows any number of incoming edges of u to send one unit of flow to an equal number of outgoing edges of u, despite unit vertex capacity constraints being imposed on the graph G. More formally, to define the graph G, we first create a node v e in G for each edge e in G. Now, for each node u in G, to define the construction of a gadget for node u, we could simply create an edge, from each node in G associated with an incoming edge of u, to each node in G associated with an outgoing edge of u. Note that this naive construction does allow any number of incoming edges of u to route one unit of flow to any equal number of outgoing edges of u. Thus, any maximum flow for G, respecting unit vertex capacities, would be equivalent to a maximum flow for G with unit edge capacities only. However, this construction is inefficient, as it may yield a graph G with m = Ω(n 2 ) edges instead of m = O(m log n) edges, as promised. However, it is easy to see that the gadget associated which each node u can be implemented more efficiently by merely placing a Benes network between the nodes associated with u s incoming edges, and the nodes associated with u s outgoing edges. This more efficient construction yields a graph G with n = O(m log n) nodes and m = O(m log n) edges. A. Reduction from Unit Vertex Capacity Directed Max Flow to Bipartite Matching To reduce a unit vertex capacity max flow problem on a directed graph G to a bipartite matching problem on a bipartite graph G, we follow a strategy similar to the one used to reduce the directed max flow problem to the undirected max flow problem. Given a unit vertex capacity max flow problem on a directed graph G, in our reduction, roughly speaking, we construct a bipartite graph G and a matching M init such that the residual graph of G with respect to the matching M init is essentially equivalent to the directed graph G. We then find a maximum matching M in the bipartite graph G and use it in conjunction with M init to finding a maximum flow for the directed graph G. In the description above, we were vague in not defining the notion of a residual graph for a bipartite matching problem, or the notion of essentially equivalent, although we make those notions more precise now. Given a bipartite graph G = (V l V r, E ) with edges E between left nodes V l and right nodes V r, and a matching M init, we consider the residual graph of G with respect to the matching M init to be a directed graph over the same set of nodes V l V r, where all the edges in M init are directed from V r nodes to V l nodes, while all the edges not in M init are directed from V l to V r. We consider this to be the residual graph of G with respect to the matching M init because a path from an unmatched node in V l to an unmatched node in V r, exactly corresponds to an augmenting path in G - namely, path in G which alternates between matched and unmatched edges, and starts and ends on unmatched edges. We call the paths described above, augmenting paths, because each augmenting path can be used to increase the size of the initial matching M init by one, by switching matched edges along the path to be unmatched edges and unmatched edges to be matched edges. Now to define the concept of essentially equivalent, we say that the residual graph of G is essentially equivalent to the graph G with respect to matching M init if there is a one-toone correspondence between augmenting paths in the residual graph of G and s t flow paths in G. We now prove a lemma that shows for any directed graph G, there exists a bipartite graph G and a matching M init such that the residual graph of M init is essentially equivalent to the graph G. Lemma 2 For any directed graph G = (V, E), there exists a bipartite graph G = (V l V r, E ) and a matching M init, such that there is a one-to-one correspondence between augmenting paths in the residual graph of G with respect to the matching M init and s t paths in G. Moreover, our lemma will show that there is a one-toone correspondence between any set of k vertex disjoint augmenting paths in the residual graph of G, and any set of k vertex disjoint s t paths in G. Thus, the residual graph of G is also equivalent to the graph G, in the sense that, there is a maximum flow of value k in the graph G, respecting unit vertex capacities, if and only if, there are k vertex disjoint

6 augmenting paths in the residual graph of G (or in other words, the size of the matching M init can be increased by k). Before we prove the lemma, let us make one final note that our lemma above only works for certain directed graphs G. Our restrictions on G are not material in terms of impeding our ability to reduce the unit vertex capacity max flow problem on any directed graph G to a bipartite matching problem, but make the proof of the lemma easier. For example, we will assume that G does not have any edges into s or out of t, as these edges are not useful in terms of finding a maximum s t flow for G. Additionally, we will assume that if a node v has an edge from s, then it does not have any other incoming edges; any other incoming edges are not useful in terms of finding a unit vertex capacity max flow, as at most unit of flow may pass through v, and we might as well assume that that unit of flow comes directly from s along the (s, v) edge. Similarly, we can assume that if a node v has an edge to t, then it does not have any other outgoing edges. If it does have extra edges to other nodes, we can safely remove those edges from G without impacting the value of the maximum flow. We also assume that there are no s to t edges in G, as we know one unit of flow will be sent along those edges in a maximum flow, and can remove them from G. We can also assume G does not have any nodes v with both an (s, v) edge and an (v, t) edge. If it does have such a node v, then we can safely assume that there is a maximum flow which sends one unit of flow from s to v to t, and thus we can remove v and its edges from G. We make these assumptions in order ensure that any s to t path in G is of the form s v 1 p v l t, where p is a (possibly empty) path, which does not contain any nodes v with an edge from s or to t. Our lemma will show that there is a one-to-one correspondence between augmenting paths in G, and s t paths in G of the form s v 1 p v l t. Given these additional restrictions, we now prove our lemma. Proof: We start by defining the bipartite graph G for any given directed graph G, satisfying the conditions described above. For each node v in G not adjacent to s and t (without an arc from s and without an arc to t), we create two nodes v in and v out in the bipartite graph G and an edge in G between v in and v out. In our reduction, we will consider the v in nodes to be the nodes on the right and the v out nodes to be the nodes on the left, and our initial matching M init will consist only of the edges between the v in and v out nodes we created above. As a result, the residual graph of G with respect to the matching M init will contain an arc from each v in node to its corresponding v out node, for nodes v not adjacent to s and t. For each node v in G with an arc from the source, we create a single v out node (on the left), and for each node v in G with an arc to the destination, we create a v in node (on the right). Lastly, for every edge in (u, v) in G, we add an edge between u out and v in in G, which creates and directed edge from u out to v in in the residual graph of G, as these edges are not in M init. Note that for any edge (u, v) in G the nodes u out and v in must exist in G, since u must not have an edge to t and v must not have an edge from s in G. (The edge (u, v) cannot exist in G, if there is an edge from u to t, or an edge from s to v in G). Now, we need to show that there is a one-to-one correspondence between s t paths in G and augmenting paths in G. It is easy to see that any augmenting path in G implies a unique s t path in G. Note that if we have an augmenting path in G, it must be of the form (v 1 ) out (v 2 ) in (v 2 ) out (v 3 ) in... (v l 1 ) in (v l 1 ) out (v l ) in, where (v 1 ) out is an unmatched node on the left and (v l ) in is an unmatched node on the left. Now note that if (v 1 ) out and (v l ) in are not matched in M init, then v 1 must have an edge from s in G, and v l must have an edge to t in G. Furthermore, the augmenting path above implies the existence of the edges (v 1, v 2 ), (v 2, v 3 ),..., (v l 1, v l ) in G. Thus, G must have an s to t path from consisting of the nodes s v 1 v 2 v 3... v l t. Similarly, for any s to t path in G, we can show the existence of a unique augmenting path in the residual graph of G. Given the limitations we set on the graph G, we can assume the s to t path in G is of the form, s v 1 p v l t, where p is a sequence of l 0 nodes p 1,..., p l, none of which are adjacent to s or t. Given the path s v 1 p v l t in G, it is not hard to see that (v 1 ) out (p 1 ) in (p 1 ) out,..., (p l ) in (p l ) out (v l ) in must be a valid augmenting path in the graph G with respect to matching M init. One can confirm that (v 1 ) out and (v l ) in are unmatched nodes, and the path from (v 1 ) out to (v l ) in is a valid path, which switches between matched and unmatched nodes. Therefore, the residual graph of G with respect to matching M init is essentially equivalent to the graph G, as defined above. Furthermore, it is not hard to see that there is a one-to-one correspondence between sets of k vertex disjoint augmenting paths in G and sets of k vertex disjoint s t flow paths in G. Given the lemma above, we can now define our reduction from the unit vertex capacity directed max flow problem to the bipartite matching problem. Given a directed graph G, satisfying the conditions of the Lemma 2, we reduce the problem to bipartite matching as follows: Given G, construct the bipartite graph G, as described in Lemma 2 Find a maximum matching M in G Consider the set of k vertex disjoint augmenting paths formed by the taking the union of M init and M, and convert them into a set of k vertex disjoint s t paths in G, to be returned as a maximum flow for G. The proof of correctness for our algorithm follows more or less from Lemma 2. We know that if G has a maximum flow of value k, then there are k vertex disjoint augmenting paths in the residual graph of G with respect to the matching M init. Thus, any maximum matching M must match at least M init + k nodes, and if we consider the union of M and M init it must contain at least k vertex disjoint augmenting paths. Finally, we know that these k vertex disjoint augmenting paths exactly correspond to k vertex disjoint s-t paths in G,

7 and these s t paths can be found efficiently given the k augmenting paths. Thus, we have a valid reduction from unit vertex capacity directed max flow to bipartite matching. In order to analyze the total runtime of the reduction, note that if the directed graph G has n nodes and m edges, we construct a bipartite graph G with O(n ) nodes and O(m ) edges as well. Analyzing the running time of each step of the reduction, it is easy to see our reduction shows that the unit vertex capacity max flow problem on a directed graph G, can be solved in O(m + β(n, m )) time, where β(n, m ) is the time needed to solve a bipartite matching problem on a graph with n nodes and m edges. In terms of the complete reduction from unit capacity directed max flow to bipartite matching, we have shown that we can solve a unit capacity max flow problem on a graph with n nodes and m edges in O(m + β(n, m )) time, where n = O(m log n) and m = O(m log n). Given that the best bipartite matching algorithms run in O(min(m n, n ω )) time, our reduction runs in O((m log n) 3/2 ) time, which does not yield a faster unit capacity directed max flow algorithm. However, it does imply that if one can find a bipartite matching in faster than o(m n / log 3/2 n ) time for bipartite graphs with n nodes and m = O(n ) edges, it would yield a faster unit capacity directed max flow algorithm, running in o(m 3/2 ) time for graphs with m edges. REFERENCES [1] E. A. Dinic. Algorithm for solution of a problem of maximum flow in networks with power estimation. In Soviet Math. Dokl. 11, pages , [2] Jack Edmonds and Richard M. Karp. Theoretical improvements in algorithmic efficiency for network flow problems. In Journal of the ACM 19 (2), page [3] S. Even and R. E. Tarjan. Network flow and testing graph connectivity. In SIAM Journal on Computing, volume 4, pages , [4] A. Goldberg. Recent developments in maximum flow algorithms. Technical report, [5] A. Goldberg and S. Rao. Beyond the flow decomposition barrier. In Proceedings of the 30 th Annual Symposium on Foundations of Computer Science, pages 2 11, [6] John E. Hopcroft and Richard M. Karp. An n 5/2 algorithm for maximum matchings in bipartite graphs. In SIAM Journal on Computing 2(4), pages , [7] L. R. Ford Jr. and D. R. Fulkerson. Maximal flow through a network. In Canadian Journal of Mathematics, volume 8, pages , [8] David R. Karger. Random sampling in cut, flow, and network design problems. In Proceedings of the 26 th ACM Symposium on Theory of Computing, [9] David R. Karger and Matthew S. Levine. Random sampling from residual graphs. In Proceedings of the 33 rd ACM Symposium on Theory of Computing, pages 63 66, May [10] A. V. Karzanov. In russian; title translation: On finding maximum flows in networks with special structure and some applications. In Moscow State University Press, volume 5, [11] J. Kleinberg and E. Tardos. Algorithm Design. Addison Wesley, [12] Marcin Mucha and Piotr Sankowski. Maximum matchings via gaussian elimination. In Proceedings of the 45th Annual IEEE Symposium on Foundations of Computer Science (FOCS), IV. CONCLUSION To conclude, we finish with some open questions. In our reduction from the directed max flow problem to the undirected max flow problem, we saw the only barrier towards getting an Õ(m + nv) algorithm for finding maximum flows in directed graphs was the fact that our reduction created a graph G with maximum flow value v + i. Is there a more clever reduction that generates an undirected graph G with max flow value O(v), which can be used to solve the max flow problem on the directed graph G? In our reduction from directed max flow to bipartite matching, we increased the number of nodes in the bipartite graph G to O(m log n). Thus, the best known algorithms for solving the bipartite matching problem do not yield faster algorithms for the directed max flow problem. Is there any other way to reduce directed max flow to bipartite matching while keeping the number of nodes to be O(n)? V. ACKNOWLEDGEMENTS The author would like to thank Satish Rao for informative discussions and helpful suggestions. In the reduction from unit capacity directed max flow to unit capacity undirected max flow, it was Satish Rao who suggested the removal of pairs of {s, v} and {v, t} edges in the graph G to decrease the value of maximum flow of G. Additionally, it was Satish Rao who suggested the use of Benes networks to reduce the unit edge capacity directed max flow problem to the unit vertex capacity directed max flow problem.

Design And Analysis of Algorithms Lecture 6: Combinatorial Matching Algorithms.

Design And Analysis of Algorithms Lecture 6: Combinatorial Matching Algorithms. Design And Analysis of Algorithms Lecture 6: Combinatorial Matching Algorithms. February 14, 2018 In this lecture, we will study algorithms for constructing matchings on graphs. A matching M E has maximum

More information

Jessica Su (some parts copied from CLRS / last quarter s notes)

Jessica Su (some parts copied from CLRS / last quarter s notes) 1 Max flow Consider a directed graph G with positive edge weights c that define the capacity of each edge. We can identify two special nodes in G: the source node s and the sink node t. We want to find

More information

Solution for Homework set 3

Solution for Homework set 3 TTIC 300 and CMSC 37000 Algorithms Winter 07 Solution for Homework set 3 Question (0 points) We are given a directed graph G = (V, E), with two special vertices s and t, and non-negative integral capacities

More information

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email: mikel,spalex,bruck @caltech.edu Abstract In the multicast network

More information

Scribe from 2014/2015: Jessica Su, Hieu Pham Date: October 6, 2016 Editor: Jimmy Wu

Scribe from 2014/2015: Jessica Su, Hieu Pham Date: October 6, 2016 Editor: Jimmy Wu CS 267 Lecture 3 Shortest paths, graph diameter Scribe from 2014/2015: Jessica Su, Hieu Pham Date: October 6, 2016 Editor: Jimmy Wu Today we will talk about algorithms for finding shortest paths in a graph.

More information

2386 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 52, NO. 6, JUNE 2006

2386 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 52, NO. 6, JUNE 2006 2386 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 52, NO. 6, JUNE 2006 The Encoding Complexity of Network Coding Michael Langberg, Member, IEEE, Alexander Sprintson, Member, IEEE, and Jehoshua Bruck,

More information

Network Flow and Matching

Network Flow and Matching Chapter 4 Network Flow and Matching In this chapter, we examine the network flow problem, a graph problem to which many problems can be reduced. In fact, some problems that don t even appear to be graph

More information

CS261: Problem Set #1

CS261: Problem Set #1 CS261: Problem Set #1 Due by 11:59 PM on Tuesday, April 21, 2015 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. (2) Turn in your solutions by

More information

Minimum Cost Edge Disjoint Paths

Minimum Cost Edge Disjoint Paths Minimum Cost Edge Disjoint Paths Theodor Mader 15.4.2008 1 Introduction Finding paths in networks and graphs constitutes an area of theoretical computer science which has been highly researched during

More information

V1.0: Seth Gilbert, V1.1: Steven Halim August 30, Abstract. d(e), and we assume that the distance function is non-negative (i.e., d(x, y) 0).

V1.0: Seth Gilbert, V1.1: Steven Halim August 30, Abstract. d(e), and we assume that the distance function is non-negative (i.e., d(x, y) 0). CS4234: Optimisation Algorithms Lecture 4 TRAVELLING-SALESMAN-PROBLEM (4 variants) V1.0: Seth Gilbert, V1.1: Steven Halim August 30, 2016 Abstract The goal of the TRAVELLING-SALESMAN-PROBLEM is to find

More information

Matching Theory. Figure 1: Is this graph bipartite?

Matching Theory. Figure 1: Is this graph bipartite? Matching Theory 1 Introduction A matching M of a graph is a subset of E such that no two edges in M share a vertex; edges which have this property are called independent edges. A matching M is said to

More information

Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn

Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn Graphs Extremely important concept in computer science Graph, : node (or vertex) set : edge set Simple graph: no self loops, no multiple

More information

Lecture Notes on Karger s Min-Cut Algorithm. Eric Vigoda Georgia Institute of Technology Last updated for Advanced Algorithms, Fall 2013.

Lecture Notes on Karger s Min-Cut Algorithm. Eric Vigoda Georgia Institute of Technology Last updated for Advanced Algorithms, Fall 2013. Lecture Notes on Karger s Min-Cut Algorithm. Eric Vigoda Georgia Institute of Technology Last updated for 4540 - Advanced Algorithms, Fall 2013. Today s topic: Karger s min-cut algorithm [3]. Problem Definition

More information

arxiv: v2 [cs.ds] 14 Sep 2010

arxiv: v2 [cs.ds] 14 Sep 2010 Multiple-source single-sink maximum flow in directed planar graphs in O(n 1.5 log n) time arxiv:1008.5332v2 [cs.ds] 14 Sep 2010 Philip N. Klein and Shay Mozes Brown University October 28, 2018 Abstract

More information

arxiv: v2 [cs.dm] 28 Dec 2010

arxiv: v2 [cs.dm] 28 Dec 2010 Multiple-source multiple-sink maximum flow in planar graphs Yahav Nussbaum arxiv:1012.4767v2 [cs.dm] 28 Dec 2010 Abstract In this paper we show an O(n 3/2 log 2 n) time algorithm for finding a maximum

More information

so when retreat on edge, can \delete" edge when vertex has no outgoing arcs, know it is blocked when augment along path, can also \delete" edges so to

so when retreat on edge, can \delete edge when vertex has no outgoing arcs, know it is blocked when augment along path, can also \delete edges so to advance: follow some outgoing edge from current v ertex eventually, r e a c h sink: augment along current path seems much l i k e aug path algorithm but can save info since don't create residual arcs No

More information

Parallel Breadth First Search

Parallel Breadth First Search CSE341T/CSE549T 11/03/2014 Lecture 18 Parallel Breadth First Search Today, we will look at a basic graph algorithm, breadth first search (BFS). BFS can be applied to solve a variety of problems including:

More information

Lecture notes on: Maximum matching in bipartite and non-bipartite graphs (Draft)

Lecture notes on: Maximum matching in bipartite and non-bipartite graphs (Draft) Lecture notes on: Maximum matching in bipartite and non-bipartite graphs (Draft) Lecturer: Uri Zwick June 5, 2013 1 The maximum matching problem Let G = (V, E) be an undirected graph. A set M E is a matching

More information

Fast and Simple Algorithms for Weighted Perfect Matching

Fast and Simple Algorithms for Weighted Perfect Matching Fast and Simple Algorithms for Weighted Perfect Matching Mirjam Wattenhofer, Roger Wattenhofer {mirjam.wattenhofer,wattenhofer}@inf.ethz.ch, Department of Computer Science, ETH Zurich, Switzerland Abstract

More information

Bipartite Perfect Matching in O(n log n) Randomized Time. Nikhil Bhargava and Elliot Marx

Bipartite Perfect Matching in O(n log n) Randomized Time. Nikhil Bhargava and Elliot Marx Bipartite Perfect Matching in O(n log n) Randomized Time Nikhil Bhargava and Elliot Marx Background Matching in bipartite graphs is a problem that has many distinct applications. Many problems can be reduced

More information

Vertex Deletion games with Parity rules

Vertex Deletion games with Parity rules Vertex Deletion games with Parity rules Richard J. Nowakowski 1 Department of Mathematics, Dalhousie University, Halifax, Nova Scotia, Canada rjn@mathstat.dal.ca Paul Ottaway Department of Mathematics,

More information

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS THE CENTRALIZED DEPLOYMENT OF MOBILE SENSORS I.E. THE MINIMUM WEIGHT PERFECT MATCHING 1 2 ON BIPARTITE GRAPHS Prof. Tiziana Calamoneri Network Algorithms

More information

5.1 Min-Max Theorem for General Matching

5.1 Min-Max Theorem for General Matching CSC5160: Combinatorial Optimization and Approximation Algorithms Topic: General Matching Date: 4/01/008 Lecturer: Lap Chi Lau Scribe: Jennifer X.M. WU In this lecture, we discuss matchings in general graph.

More information

Lecture 3: Graphs and flows

Lecture 3: Graphs and flows Chapter 3 Lecture 3: Graphs and flows Graphs: a useful combinatorial structure. Definitions: graph, directed and undirected graph, edge as ordered pair, path, cycle, connected graph, strongly connected

More information

1 Introduction. 2 The Generic Push-Relabel Algorithm. Improvements on the Push-Relabel Method: Excess Scaling. 2.1 Definitions CMSC 29700

1 Introduction. 2 The Generic Push-Relabel Algorithm. Improvements on the Push-Relabel Method: Excess Scaling. 2.1 Definitions CMSC 29700 CMSC 9700 Supervised Reading & Research Week 6: May 17, 013 Improvements on the Push-Relabel Method: Excess Scaling Rahul Mehta 1 Introduction We now know about both the methods based on the idea of Ford

More information

Simpler Approximation of the Maximum Asymmetric Traveling Salesman Problem

Simpler Approximation of the Maximum Asymmetric Traveling Salesman Problem Simpler Approximation of the Maximum Asymmetric Traveling Salesman Problem Katarzyna Paluch 1, Khaled Elbassioni 2, and Anke van Zuylen 2 1 Institute of Computer Science, University of Wroclaw ul. Joliot-Curie

More information

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email mikel,spalex,bruck @caltech.edu Abstract In the multicast network

More information

Tutorial for Algorithm s Theory Problem Set 5. January 17, 2013

Tutorial for Algorithm s Theory Problem Set 5. January 17, 2013 Tutorial for Algorithm s Theory Problem Set 5 January 17, 2013 Exercise 1: Maximum Flow Algorithms Consider the following flow network: a) Solve the maximum flow problem on the above network by using the

More information

Algebraic method for Shortest Paths problems

Algebraic method for Shortest Paths problems Lecture 1 (06.03.2013) Author: Jaros law B lasiok Algebraic method for Shortest Paths problems 1 Introduction In the following lecture we will see algebraic algorithms for various shortest-paths problems.

More information

Network Flow. The network flow problem is as follows:

Network Flow. The network flow problem is as follows: Network Flow The network flow problem is as follows: Given a connected directed graph G with non-negative integer weights, (where each edge stands for the capacity of that edge), and two distinguished

More information

Lecture 9 - Matrix Multiplication Equivalences and Spectral Graph Theory 1

Lecture 9 - Matrix Multiplication Equivalences and Spectral Graph Theory 1 CME 305: Discrete Mathematics and Algorithms Instructor: Professor Aaron Sidford (sidford@stanfordedu) February 6, 2018 Lecture 9 - Matrix Multiplication Equivalences and Spectral Graph Theory 1 In the

More information

Introduction III. Graphs. Motivations I. Introduction IV

Introduction III. Graphs. Motivations I. Introduction IV Introduction I Graphs Computer Science & Engineering 235: Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu Graph theory was introduced in the 18th century by Leonhard Euler via the Königsberg

More information

Faster parameterized algorithms for Minimum Fill-In

Faster parameterized algorithms for Minimum Fill-In Faster parameterized algorithms for Minimum Fill-In Hans L. Bodlaender Pinar Heggernes Yngve Villanger Technical Report UU-CS-2008-042 December 2008 Department of Information and Computing Sciences Utrecht

More information

Lecture 11: Maximum flow and minimum cut

Lecture 11: Maximum flow and minimum cut Optimisation Part IB - Easter 2018 Lecture 11: Maximum flow and minimum cut Lecturer: Quentin Berthet 4.4. The maximum flow problem. We consider in this lecture a particular kind of flow problem, with

More information

Counting the Number of Eulerian Orientations

Counting the Number of Eulerian Orientations Counting the Number of Eulerian Orientations Zhenghui Wang March 16, 011 1 Introduction Consider an undirected Eulerian graph, a graph in which each vertex has even degree. An Eulerian orientation of the

More information

2. CONNECTIVITY Connectivity

2. CONNECTIVITY Connectivity 2. CONNECTIVITY 70 2. Connectivity 2.1. Connectivity. Definition 2.1.1. (1) A path in a graph G = (V, E) is a sequence of vertices v 0, v 1, v 2,..., v n such that {v i 1, v i } is an edge of G for i =

More information

Bipartite Roots of Graphs

Bipartite Roots of Graphs Bipartite Roots of Graphs Lap Chi Lau Department of Computer Science University of Toronto Graph H is a root of graph G if there exists a positive integer k such that x and y are adjacent in G if and only

More information

Faster parameterized algorithms for Minimum Fill-In

Faster parameterized algorithms for Minimum Fill-In Faster parameterized algorithms for Minimum Fill-In Hans L. Bodlaender Pinar Heggernes Yngve Villanger Abstract We present two parameterized algorithms for the Minimum Fill-In problem, also known as Chordal

More information

Source. Sink. Chapter 10: Iterative Programming Maximum Flow Problem. CmSc250 Intro to Algorithms

Source. Sink. Chapter 10: Iterative Programming Maximum Flow Problem. CmSc250 Intro to Algorithms Chapter 10: Iterative Programming Maximum Flow Problem CmSc20 Intro to Algorithms A flow network is a model of a system where some material is produced at its source, travels through the system, and is

More information

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch.

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch. Iterative Improvement Algorithm design technique for solving optimization problems Start with a feasible solution Repeat the following step until no improvement can be found: change the current feasible

More information

CS261: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem

CS261: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem CS61: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem Tim Roughgarden February 5, 016 1 The Traveling Salesman Problem (TSP) In this lecture we study a famous computational problem,

More information

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition. 18.433 Combinatorial Optimization Matching Algorithms September 9,14,16 Lecturer: Santosh Vempala Given a graph G = (V, E), a matching M is a set of edges with the property that no two of the edges have

More information

Maximum flows & Maximum Matchings

Maximum flows & Maximum Matchings Chapter 9 Maximum flows & Maximum Matchings This chapter analyzes flows and matchings. We will define flows and maximum flows and present an algorithm that solves the maximum flow problem. Then matchings

More information

Exact Algorithms Lecture 7: FPT Hardness and the ETH

Exact Algorithms Lecture 7: FPT Hardness and the ETH Exact Algorithms Lecture 7: FPT Hardness and the ETH February 12, 2016 Lecturer: Michael Lampis 1 Reminder: FPT algorithms Definition 1. A parameterized problem is a function from (χ, k) {0, 1} N to {0,

More information

New Upper Bounds for MAX-2-SAT and MAX-2-CSP w.r.t. the Average Variable Degree

New Upper Bounds for MAX-2-SAT and MAX-2-CSP w.r.t. the Average Variable Degree New Upper Bounds for MAX-2-SAT and MAX-2-CSP w.r.t. the Average Variable Degree Alexander Golovnev St. Petersburg University of the Russian Academy of Sciences, St. Petersburg, Russia alex.golovnev@gmail.com

More information

Network flows and Menger s theorem

Network flows and Menger s theorem Network flows and Menger s theorem Recall... Theorem (max flow, min cut strong duality). Let G be a network. The maximum value of a flow equals the minimum capacity of a cut. We prove this strong duality

More information

6.856 Randomized Algorithms

6.856 Randomized Algorithms 6.856 Randomized Algorithms David Karger Handout #4, September 21, 2002 Homework 1 Solutions Problem 1 MR 1.8. (a) The min-cut algorithm given in class works because at each step it is very unlikely (probability

More information

Maximal Independent Set

Maximal Independent Set Chapter 0 Maximal Independent Set In this chapter we present a highlight of this course, a fast maximal independent set (MIS) algorithm. The algorithm is the first randomized algorithm that we study in

More information

12.1 Formulation of General Perfect Matching

12.1 Formulation of General Perfect Matching CSC5160: Combinatorial Optimization and Approximation Algorithms Topic: Perfect Matching Polytope Date: 22/02/2008 Lecturer: Lap Chi Lau Scribe: Yuk Hei Chan, Ling Ding and Xiaobing Wu In this lecture,

More information

Graphs. Edges may be directed (from u to v) or undirected. Undirected edge eqvt to pair of directed edges

Graphs. Edges may be directed (from u to v) or undirected. Undirected edge eqvt to pair of directed edges (p 186) Graphs G = (V,E) Graphs set V of vertices, each with a unique name Note: book calls vertices as nodes set E of edges between vertices, each encoded as tuple of 2 vertices as in (u,v) Edges may

More information

Topic: Local Search: Max-Cut, Facility Location Date: 2/13/2007

Topic: Local Search: Max-Cut, Facility Location Date: 2/13/2007 CS880: Approximations Algorithms Scribe: Chi Man Liu Lecturer: Shuchi Chawla Topic: Local Search: Max-Cut, Facility Location Date: 2/3/2007 In previous lectures we saw how dynamic programming could be

More information

Maximal Independent Set

Maximal Independent Set Chapter 4 Maximal Independent Set In this chapter we present a first highlight of this course, a fast maximal independent set (MIS) algorithm. The algorithm is the first randomized algorithm that we study

More information

[13] D. Karger, \Using randomized sparsication to approximate minimum cuts" Proc. 5th Annual

[13] D. Karger, \Using randomized sparsication to approximate minimum cuts Proc. 5th Annual [12] F. Harary, \Graph Theory", Addison-Wesley, Reading, MA, 1969. [13] D. Karger, \Using randomized sparsication to approximate minimum cuts" Proc. 5th Annual ACM-SIAM Symposium on Discrete Algorithms,

More information

Parametric Maximum Flow Problem: Techniques and Algorithms. Deepika Sareen, Dr Deepak Garg. Thapar University, Patiala

Parametric Maximum Flow Problem: Techniques and Algorithms. Deepika Sareen, Dr Deepak Garg. Thapar University, Patiala Parametric Maximum Flow Problem: Techniques and Algorithms Deepika Sareen, Dr Deepak Garg Thapar University, Patiala sareendeepika@yahoo.co.in, dgarg@thapar.edu Abstract We encounter many different types

More information

Edge-disjoint Spanning Trees in Triangulated Graphs on Surfaces and application to node labeling 1

Edge-disjoint Spanning Trees in Triangulated Graphs on Surfaces and application to node labeling 1 Edge-disjoint Spanning Trees in Triangulated Graphs on Surfaces and application to node labeling 1 Arnaud Labourel a a LaBRI - Universite Bordeaux 1, France Abstract In 1974, Kundu [4] has shown that triangulated

More information

Network Design and Optimization course

Network Design and Optimization course Effective maximum flow algorithms Modeling with flows Network Design and Optimization course Lecture 5 Alberto Ceselli alberto.ceselli@unimi.it Dipartimento di Tecnologie dell Informazione Università degli

More information

The Complexity of Minimizing Certain Cost Metrics for k-source Spanning Trees

The Complexity of Minimizing Certain Cost Metrics for k-source Spanning Trees The Complexity of Minimizing Certain Cost Metrics for ksource Spanning Trees Harold S Connamacher University of Oregon Andrzej Proskurowski University of Oregon May 9 2001 Abstract We investigate multisource

More information

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS SECOND PART: WIRELESS NETWORKS.B. SENSOR NETWORKS THE CENTRALIZED DEPLOYMENT OF MOBILE SENSORS I.E. THE MINIMUM WEIGHT PERFECT MATCHING ON BIPARTITE GRAPHS Prof. Tiziana Calamoneri Network Algorithms A.y.

More information

CSCI 5454 Ramdomized Min Cut

CSCI 5454 Ramdomized Min Cut CSCI 5454 Ramdomized Min Cut Sean Wiese, Ramya Nair April 8, 013 1 Randomized Minimum Cut A classic problem in computer science is finding the minimum cut of an undirected graph. If we are presented with

More information

1 Bipartite maximum matching

1 Bipartite maximum matching Cornell University, Fall 2017 Lecture notes: Matchings CS 6820: Algorithms 23 Aug 1 Sep These notes analyze algorithms for optimization problems involving matchings in bipartite graphs. Matching algorithms

More information

g(s, w) g(w, s) (in gross model).

g(s, w) g(w, s) (in gross model). 1 Maximum Flow 1.1 Definitions Tarjan: Data Structures and Network Algorithms Ford and Fulkerson, Flows in Networks, 1962 (paper 1956) Ahuja, Magnanti, Orlin Network Flows. Problem: do min-cost. Problem:

More information

Monotone Paths in Geometric Triangulations

Monotone Paths in Geometric Triangulations Monotone Paths in Geometric Triangulations Adrian Dumitrescu Ritankar Mandal Csaba D. Tóth November 19, 2017 Abstract (I) We prove that the (maximum) number of monotone paths in a geometric triangulation

More information

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016 GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS ZOÉ HAMEL March 3, 2016 1. Introduction Let G = (V (G), E(G)) be a graph G (loops and multiple edges not allowed) on the set of vertices V (G) and the set

More information

LECTURES 3 and 4: Flows and Matchings

LECTURES 3 and 4: Flows and Matchings LECTURES 3 and 4: Flows and Matchings 1 Max Flow MAX FLOW (SP). Instance: Directed graph N = (V,A), two nodes s,t V, and capacities on the arcs c : A R +. A flow is a set of numbers on the arcs such that

More information

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs CMPUT 675: Topics in Algorithms and Combinatorial Optimization (Fall 2009) Lecture 10,11: General Matching Polytope, Maximum Flow Lecturer: Mohammad R Salavatipour Date: Oct 6 and 8, 2009 Scriber: Mohammad

More information

Problem Set 7 Solutions

Problem Set 7 Solutions Design and Analysis of Algorithms March 0, 2015 Massachusetts Institute of Technology 6.046J/18.410J Profs. Erik Demaine, Srini Devadas, and Nancy Lynch Problem Set 7 Solutions Problem Set 7 Solutions

More information

Introduction to Graph Theory

Introduction to Graph Theory Introduction to Graph Theory Tandy Warnow January 20, 2017 Graphs Tandy Warnow Graphs A graph G = (V, E) is an object that contains a vertex set V and an edge set E. We also write V (G) to denote the vertex

More information

Matchings. Saad Mneimneh

Matchings. Saad Mneimneh Matchings Saad Mneimneh 1 Stable matching Consider n men and n women. A matching is a one to one correspondence between the men and the women. In finding a matching, however, we would like to respect the

More information

Workshop In Advanced Data Structures Push-Relabel Heuristics. Maya Orshizer Sagi Hed

Workshop In Advanced Data Structures Push-Relabel Heuristics. Maya Orshizer Sagi Hed Workshop In Advanced Data Structures Push-Relabel Heuristics Maya Orshizer Sagi Hed 1 Contents 1 Overview And Goals 3 2 Our Implementation Of Push Relabel 3 2.1 Definitions...............................

More information

The Directed Steiner Network problem is tractable for a constant number of terminals

The Directed Steiner Network problem is tractable for a constant number of terminals The Directed Steiner Network problem is tractable for a constant number of terminals Jon Feldman Matthias Ruhl MIT Laboratory for Computer Science Cambridge, MA 02139, USA Abstract We consider the DIRECTED

More information

CMPSCI 311: Introduction to Algorithms Practice Final Exam

CMPSCI 311: Introduction to Algorithms Practice Final Exam CMPSCI 311: Introduction to Algorithms Practice Final Exam Name: ID: Instructions: Answer the questions directly on the exam pages. Show all your work for each question. Providing more detail including

More information

Advanced Combinatorial Optimization September 15, Lecture 2

Advanced Combinatorial Optimization September 15, Lecture 2 18.438 Advanced Combinatorial Optimization September 15, 2009 Lecture 2 Lecturer: Michel X. Goemans Scribes: Robert Kleinberg (2004), Alex Levin (2009) In this lecture, we will present Edmonds s algorithm

More information

An Optimal Algorithm for the Euclidean Bottleneck Full Steiner Tree Problem

An Optimal Algorithm for the Euclidean Bottleneck Full Steiner Tree Problem An Optimal Algorithm for the Euclidean Bottleneck Full Steiner Tree Problem Ahmad Biniaz Anil Maheshwari Michiel Smid September 30, 2013 Abstract Let P and S be two disjoint sets of n and m points in the

More information

Solutions for the Exam 6 January 2014

Solutions for the Exam 6 January 2014 Mastermath and LNMB Course: Discrete Optimization Solutions for the Exam 6 January 2014 Utrecht University, Educatorium, 13:30 16:30 The examination lasts 3 hours. Grading will be done before January 20,

More information

Faster Algorithms for Computing Maximal 2-Connected Subgraphs in Sparse Directed Graphs

Faster Algorithms for Computing Maximal 2-Connected Subgraphs in Sparse Directed Graphs Faster Algorithms for Computing Maximal 2-Connected Subgraphs in Sparse Directed Graphs Abstract Shiri Chechik Tel Aviv University, Israel schechik@cs.tau.ac.il Giuseppe F. Italiano Università di Roma

More information

CS261: A Second Course in Algorithms Lecture #3: The Push-Relabel Algorithm for Maximum Flow

CS261: A Second Course in Algorithms Lecture #3: The Push-Relabel Algorithm for Maximum Flow CS26: A Second Course in Algorithms Lecture #3: The Push-Relabel Algorithm for Maximum Flow Tim Roughgarden January 2, 206 Motivation The maximum flow algorithms that we ve studied so far are augmenting

More information

Lectures 8/9. 1 Overview. 2 Prelude:Routing on the Grid. 3 A couple of networks.

Lectures 8/9. 1 Overview. 2 Prelude:Routing on the Grid. 3 A couple of networks. U.C. Berkeley CS273: Parallel and Distributed Theory Lectures 8/9 Professor Satish Rao September 23,2010 Lecturer: Satish Rao Last revised October 23, 2010 Lectures 8/9 1 Overview We will give a couple

More information

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Greedy Algorithms (continued) The best known application where the greedy algorithm is optimal is surely

More information

A Reduction of Conway s Thrackle Conjecture

A Reduction of Conway s Thrackle Conjecture A Reduction of Conway s Thrackle Conjecture Wei Li, Karen Daniels, and Konstantin Rybnikov Department of Computer Science and Department of Mathematical Sciences University of Massachusetts, Lowell 01854

More information

Solving problems on graph algorithms

Solving problems on graph algorithms Solving problems on graph algorithms Workshop Organized by: ACM Unit, Indian Statistical Institute, Kolkata. Tutorial-3 Date: 06.07.2017 Let G = (V, E) be an undirected graph. For a vertex v V, G {v} is

More information

Optimal Parallel Randomized Renaming

Optimal Parallel Randomized Renaming Optimal Parallel Randomized Renaming Martin Farach S. Muthukrishnan September 11, 1995 Abstract We consider the Renaming Problem, a basic processing step in string algorithms, for which we give a simultaneously

More information

CSE 417 Network Flows (pt 3) Modeling with Min Cuts

CSE 417 Network Flows (pt 3) Modeling with Min Cuts CSE 417 Network Flows (pt 3) Modeling with Min Cuts Reminders > HW6 is due on Friday start early bug fixed on line 33 of OptimalLineup.java: > change true to false Review of last two lectures > Defined

More information

CMPSCI611: The SUBSET-SUM Problem Lecture 18

CMPSCI611: The SUBSET-SUM Problem Lecture 18 CMPSCI611: The SUBSET-SUM Problem Lecture 18 We begin today with the problem we didn t get to at the end of last lecture the SUBSET-SUM problem, which we also saw back in Lecture 8. The input to SUBSET-

More information

Framework for Design of Dynamic Programming Algorithms

Framework for Design of Dynamic Programming Algorithms CSE 441T/541T Advanced Algorithms September 22, 2010 Framework for Design of Dynamic Programming Algorithms Dynamic programming algorithms for combinatorial optimization generalize the strategy we studied

More information

Distributed minimum spanning tree problem

Distributed minimum spanning tree problem Distributed minimum spanning tree problem Juho-Kustaa Kangas 24th November 2012 Abstract Given a connected weighted undirected graph, the minimum spanning tree problem asks for a spanning subtree with

More information

9.1 Cook-Levin Theorem

9.1 Cook-Levin Theorem CS787: Advanced Algorithms Scribe: Shijin Kong and David Malec Lecturer: Shuchi Chawla Topic: NP-Completeness, Approximation Algorithms Date: 10/1/2007 As we ve already seen in the preceding lecture, two

More information

Testing Isomorphism of Strongly Regular Graphs

Testing Isomorphism of Strongly Regular Graphs Spectral Graph Theory Lecture 9 Testing Isomorphism of Strongly Regular Graphs Daniel A. Spielman September 26, 2018 9.1 Introduction In the last lecture we saw how to test isomorphism of graphs in which

More information

Hardness of Subgraph and Supergraph Problems in c-tournaments

Hardness of Subgraph and Supergraph Problems in c-tournaments Hardness of Subgraph and Supergraph Problems in c-tournaments Kanthi K Sarpatwar 1 and N.S. Narayanaswamy 1 Department of Computer Science and Engineering, IIT madras, Chennai 600036, India kanthik@gmail.com,swamy@cse.iitm.ac.in

More information

Report on article The Travelling Salesman Problem: A Linear Programming Formulation

Report on article The Travelling Salesman Problem: A Linear Programming Formulation Report on article The Travelling Salesman Problem: A Linear Programming Formulation Radosław Hofman, Poznań 2008 Abstract This article describes counter example prepared in order to prove that linear formulation

More information

PLANAR GRAPH BIPARTIZATION IN LINEAR TIME

PLANAR GRAPH BIPARTIZATION IN LINEAR TIME PLANAR GRAPH BIPARTIZATION IN LINEAR TIME SAMUEL FIORINI, NADIA HARDY, BRUCE REED, AND ADRIAN VETTA Abstract. For each constant k, we present a linear time algorithm that, given a planar graph G, either

More information

Preflow-Push Algorithm

Preflow-Push Algorithm Preflow-Push Algorithm An s-t preflow obeys the following constraints: Capacity constraints: 0 f(e) c(e) e f (v) = f (u,v) f (v,w) 0 u V w V A labeling h assigns nonnegative integers to vertices. h(t)

More information

Fast, Effective Vertex Cover Kernelization: A Tale of Two Algorithms

Fast, Effective Vertex Cover Kernelization: A Tale of Two Algorithms Fast, Effective Vertex Cover Kernelization: A Tale of Two Algorithms Faisal N. Abu-Khzam Division of Computer Science and Mathematics Lebanese American University Beirut, Lebanon faisal.abukhzam@lau.edu.lb

More information

GRAPH THEORY: AN INTRODUCTION

GRAPH THEORY: AN INTRODUCTION GRAPH THEORY: AN INTRODUCTION BEGINNERS 3/4/2018 1. GRAPHS AND THEIR PROPERTIES A graph G consists of two sets: a set of vertices V, and a set of edges E. A vertex is simply a labeled point. An edge is

More information

7. NETWORK FLOW II. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley Copyright 2013 Kevin Wayne

7. NETWORK FLOW II. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley Copyright 2013 Kevin Wayne 7. NETWORK FLOW II Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley Copyright 203 Kevin Wayne http://www.cs.princeton.edu/~wayne/kleinberg-tardos bipartite matching disjoint paths extensions

More information

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE Professor Kindred Math 104, Graph Theory Homework 2 Solutions February 7, 2013 Introduction to Graph Theory, West Section 1.2: 26, 38, 42 Section 1.3: 14, 18 Section 2.1: 26, 29, 30 DO NOT RE-DISTRIBUTE

More information

CS 125 Section #5 Graph Traversal and Linear Programs October 6, 2016

CS 125 Section #5 Graph Traversal and Linear Programs October 6, 2016 CS 125 Section #5 Graph Traversal and Linear Programs October 6, 2016 1 Depth first search 1.1 The Algorithm Besides breadth first search, which we saw in class in relation to Dijkstra s algorithm, there

More information

Pebble Sets in Convex Polygons

Pebble Sets in Convex Polygons 2 1 Pebble Sets in Convex Polygons Kevin Iga, Randall Maddox June 15, 2005 Abstract Lukács and András posed the problem of showing the existence of a set of n 2 points in the interior of a convex n-gon

More information

arxiv: v1 [cs.ds] 15 Jan 2014

arxiv: v1 [cs.ds] 15 Jan 2014 Better Approximation Algorithms for Maximum Asymmetric Traveling Salesman and Shortest Superstring Katarzyna Paluch Institute of Computer Science, University of Wrocław abraka@cs.uni.wroc.pl arxiv:1401.3670v1

More information

FOUR EDGE-INDEPENDENT SPANNING TREES 1

FOUR EDGE-INDEPENDENT SPANNING TREES 1 FOUR EDGE-INDEPENDENT SPANNING TREES 1 Alexander Hoyer and Robin Thomas School of Mathematics Georgia Institute of Technology Atlanta, Georgia 30332-0160, USA ABSTRACT We prove an ear-decomposition theorem

More information

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs Graphs and Network Flows IE411 Lecture 21 Dr. Ted Ralphs IE411 Lecture 21 1 Combinatorial Optimization and Network Flows In general, most combinatorial optimization and integer programming problems are

More information