Graphs (computer science): What algorithm should I use to find the minimum flow of a digraph where the flow across each edge has an infinite upper bound but a non-zero lower bound?
-
... such as this simple example: In the literature this is a minimum cost flow problem. In my case however the cost is the same as a nonzero lower bound on the flow required on each edge so I worded the question as above. In the literature the question would be: what is the best algorithm for finding the minimum cost flow of a single-source/single-sink directed acyclic graph in which each edge has infinite capacity, a non-zero lower bound on flow, and a cost equal to the lower bound on flow. From my research it seems that the main way people deal with any kind of minimum cost of any kind of network is to set the problem up as a LP problem and solve that way. My intuition, however, is that not having upper bounds on flow ,i.e. having edges with infinite capacites, makes the problem easier, so I was wondering if there is an algorithm specifically targeting this case using more "graphy" techniques than the simplex method et. al. I mean, if all the costs and lower bounds are 1 as in the above... we are then looking for a flow that covers all edges, obeys flow rules, and isn't pushing too much flow through any path from s to t. This just feels like it shouldn't require an LP solver to me and indeed the Wikipedia article on min cost flows states that "if the capacity constraint is removed, the problem is reduced to the http://en.wikipedia.org/wiki/Shortest_path_problem" but I think they are talking about the case in which the lower bounds are all zero. Also is there open source C/C++ code for minimum cost flow anywhere? From googling what is available I find that I can either set the problem up as an LP problem myself and solve with an open source LP solver, or I could use http://lemon.cs.elte.hu/trac/lemon which provides several algorithms for min-cost flow. The boost graph library does not include an implementation as far as I can tell. Is there anything else?
-
Answer:
Answering my own question ... In the absence of upper-bounds, the easiest way -- easiest to implement, understand, and that is reasonably efficient -- to find the minimum flow of a graph is the following: Find a feasible flow, i.e. a flow that satisfies flow rules and lower-bounds on flow but isn't necessarily a minimum flow. This can be accomplished by doing a depth-first traversal of the graph, keeping track of the current path as we traverse, and upon visiting a previously discovered node or t, the target node, augmenting the flow on the current path with the maximum lower-bound of the unsatisfied edges on the current path all the way to t. Turn the feasible flow into a minimum flow by solving a max flow problem. You need to find the maximum flow on the graph that has capacities equal to flow(e) - lower-bound(e), where flow(e) means flow from the feasible flow. This maximum flow subtracted from the feasible flow will be a minimum flow. A version of the above can also be performed in the case in which the graph also has upper-bounds on flow. In that case step 1. is more complicated but can be solved by performing an initial max flow computation on a specially constructed graph.
Joe Wezorek at Quora Visit the source
Other answers
Basics: [math]G=(V,E,W)[/math] (graph) [math]\equiv \Sigma_{(u,v)\in E} W_{u,v}(x(u)-x(v))^2[/math] (Quadratic form) [math]= X^T L_G X [/math] [math]L_G[/math] is laplacian of G. [math]L_G=D_G-A_G[/math]. ([math]L_G[/math] is required to define inequality & [math]\epsilon[/math] approximation of graphs, which also implies similar eigenvalues for the laplacians on both sides of inequality,which is same as saying that Eï¬ective resistances between vertices similar,max resistance means min flow) General Approach : for an input graph G with n vertices, find a sparse graph H having O(n) edges , so that H is an [math]\epsilon[/math] approximation of G. (It is proven that there is an H for every G) (cf : Ramanujan Expanders for approximating complete graphs ) Find out the upper barrier potential function: [math]\phi^u (A) = \Sigma_i \frac{i}{\lambda - u_i}[/math][math]=(uI - A)^{-1}[/math] (& Substitute bounding expectations as specified in the problem )
Sameer Gupta
I would transform the problem to maximum flow. Your problem is Given a graph G(V,E), minimize sum f(s,w) where s is source and w belongs to V where f(u,v) >= lower(u,v) Let g(u,v) = -f(u,v) Now, the problem is Given a graph G(V,E), maximize sum g(s,w) where s is source and w belongs to V where g(u,v) <= -1* lower(u,v) For this problem, http://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm works. The wiki page also has code at the end.
Darshan Singh
Related Q & A:
- What colors should i use for a project of architecture?Best solution by Yahoo! Answers
- What book should I use to teach playing on a bass guitar?Best solution by Yahoo! Answers
- What do I do to find a old article from a newspaper?Best solution by Yahoo! Answers
- What monitor can I use with a mac mini?Best solution by eHow old
- What rope should I use for a rope swing?Best solution by lowes.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.