Questions tagged [network-flow]

A network-flow or flow network is a directed graph with a capacity for each edge that can propagate a flow from a source to a sink. It is one of the most powerful problem solving tools in computer science and it is used to solve many network problems, operation research problems, etc.

In graph theory, a flow network (also known as a transportation network) is a directed graph where each edge has a capacity and each edge receives a flow. The amount of flow on an edge cannot exceed the capacity of the edge. Often in operations research, a directed graph is called a network. The vertices are called nodes and the edges are called arcs. A flow must satisfy the restriction that the amount of flow into a node equals the amount of flow out of it, unless it is a source, which has only outgoing flow, or sink, which has only incoming flow. A network can be used to model traffic in a road system, circulation with demands, fluids in pipes, currents in an electrical circuit, or anything similar in which something travels through a network of nodes.

142 questions
50
votes
4 answers

What exactly is augmenting path?

When talking about computing network flows, the Algorithm Design Manual says: Traditional network flow algorithms are based on the idea of augmenting paths, and repeatedly finding a path of positive capacity from s to t and adding it to the flow.…
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271
18
votes
1 answer

Is this Sedgewick code correct?

I am solving an optimization problem in which, among other things, I must maximize flow networks. I implemented a c++ code based flow-maximization algorithm based in the following java code that appears in the book of Sedgewick "Algorithms in Java,…
lrleon
  • 2,610
  • 3
  • 25
  • 38
11
votes
3 answers

What algorithm should I use to find the minimum flow on a digraph where there are lower bounds but not upper bounds on flow?

What algorithm should I use to find the minimum flow on a digraph where there are lower bounds, but not upper bounds on flow? Such as this simple example: In the literature this is a minimum cost flow problem. In my case however the cost is the…
jwezorek
  • 8,592
  • 1
  • 29
  • 46
10
votes
2 answers

Minimum Cost Flow - network optimization in R

I am trying to implement a "Minimum Cost Network Flow" transportation problem solution in R. I understand that this could be implemented from scratch using something like lpSolve. However, I see that there is a convenient igraph implementation for…
JanLauGe
  • 2,297
  • 2
  • 16
  • 40
9
votes
1 answer

Maximum flow in the undirected graph

How can I find maximum flow in this undirected graph? Can anyone show the step?
runrunrun
  • 111
  • 1
  • 5
8
votes
1 answer

Time complexity of the Ford-Fulkerson method in a flow network with unit capacity edges

Will the Ford-Fulkerson algorithm find a maximum flow of a unit-capacity flow network (all edges have unit capacity) with n vertices and m edges in O(mn) time?
Jay Patel
  • 1,266
  • 6
  • 20
  • 38
8
votes
2 answers

All pair Maximum Flow

Given a directed weighted graph, how to find the Maximum Flow ( or Minimum Edge Cut ) between all pairs of vertices. The naive approach is simply to call a Max Flow algorithm like Dinic's, whose complexity is O((V^2)*E), for each pair. Hence for all…
sabari
  • 779
  • 2
  • 8
  • 14
7
votes
3 answers

Is minimum-cut same for the graph after increasing edge capacity by 1 for all edges?

Let G = (V,E) be an arbitrary flow network, with a source s and target t and positive integer capacity c(e) for every edge e. Let (S,T) be a minimum s-t cut with respect to these capacities. Now suppose we increase the capacity of every edge by one,…
Sanket Achari
  • 480
  • 1
  • 6
  • 20
6
votes
1 answer

Finding a Circulation in a Network with lower bounds

I can't understand how to find circulation flow in the network with lower bounds(not demands). I found next documents with problem description and solving…
KolKir
  • 859
  • 1
  • 8
  • 16
6
votes
1 answer

Dynamic Tree Data Structure For Improved Dinic's Algorithm

I want to apply Dinic's algorithm with dynamic tree. But I find very few sources. especially about the dynamic tree. It would be great if there is a good source with detailed explains or some simple sources code which uses dynamic tree. Any one come…
arslan
  • 2,034
  • 7
  • 34
  • 61
6
votes
2 answers

Which min-cut does the Ford-Fulkerson algorithm find?

There can be multiple min-cuts in a network. E.g: has four min-cuts and Ford-Fulkerson finds the one "nearer" to s (the source). Can we say the same for all networks? That is, Ford-Fulkerson finds the cut nearest to the source? If true, how do we…
6
votes
1 answer

Modification to Maximum Flow Algorithm

I've tried to solve a question about the maximum-flow problem. I have one source and two sinks. I need to find a maximum flow in this network. This part is general max-flow. However, both targets have to get same amount of flow in this special…
TheGost
  • 147
  • 1
  • 3
  • 8
6
votes
3 answers

Crab Graphs, Algorithms, Graph Theory, How is this network flow?

Can somebody please help me out with this problem? The solution is apparently using network flow but I am not very familiar with network flow. How does network flow help you solve this? A crab is an undirected graph which has two kinds of vertices:…
user2445793
  • 85
  • 2
  • 7
5
votes
1 answer

In a Max Flow problem, how to find all possible sets of paths that give max flow?

I understand that Ford-Fulkerson Algorithm can find the maximum flow that can flow from source (s) to sink (t) in a flow network. But is there an algorithm that finds all possible sets of paths that give the max flow? An example: In this network…
Allen
  • 2,195
  • 1
  • 14
  • 9
5
votes
2 answers

Is there an algorithm to find minimum cut in undirected graph separating source and sink

I have an edge-weighted undirected graph and 2 nodes (often called source and sink). I need to find a set of edges of minimum possible weight, which separates these 2 nodes into 2 weak components. I know about Ford-Fulkerson's maximum flow algorithm…
Youda008
  • 1,788
  • 1
  • 17
  • 35
1
2 3
9 10