Can someone explain (in detail) how can a Linear Programming Problem be converted to a Network Flow problem.
Essentially I wish know how to create the network flow graph given the LP constraints,what edges/vertices to add to the graph and why those edges/vertices are added
Auto comment: topic has been updated by arasmus (previous revision, new revision, compare).
Also , it would be helpful if anyone can suggest such a practice problem.
Where can such a question arise? Not every LP problem can be transformed into a network flow problem (under some natural meaning), network flow LP representation is a very small and strict class.
A general LP problem can define an unbounded feasible set while a network flow LP always defines a bounded polyhedron.
I was actually motivated by this discussion. http://codeforces.net/blog/entry/45412
But can every network problem be solved by LP?
i came across this comment so you might ask Swistakk
You messed up direction of convertion. As Zlobober says not every LP can be represented as flow. But other way around is surely true. Look at any definition of flow. Variables are flows through every edge. Constraints are of form "influx=outflux" for every vertex and "0<=flow<=capacity" for every edge. Goal is to maximize outflux of source. Everything is perfectly linear, the very definition of flow is already an LP instance, no tweaking needed.