I need explanation about what exactly node-disjoint paths? and How to determine maximum number of node-disjoint path between two nodes Source(s) and Sink(t) in a directed graph. Can anyone explain with graphically.
-
1This might help: https://www.quora.com/How-can-I-approach-the-problem-Intergalactic-Map-IM-on-SPOJ-using-Max-Flow/answer/Raziman-T-V – Raziman T V Jan 27 '17 at 14:50
2 Answers
A path is sequence of vertices: s, v_1, .., v_m, t
. Two paths s, v_1, .., v_m, t
and s, u_1, ..., u_k, t
are called node-disjoint if v_i != u_j
for any valid i
and j
.
We can reduce this problem to finding the maximum number of edge-disjoint paths by splitting each vertex (except for the source and the target) into two, adding an edge from the first copy to the second copy, redirecting all edges that end in this vertex to the first copy and all outgoing edges from the second copy. After that, the answer is the maximum flow in this graph (all edges should have a unit capacity).

- 18,368
- 4
- 33
- 45
-
here i did not understand what exactly the meaning of splitting each vertex into two?. – Praveenkumar Beedanal Jan 27 '17 at 18:46
-
@praveenkumarbeedanal It means building a new graph where there is pair of vertices instead of each vertex (except for the source and the target) and the edges are adding as described in my answer. – kraskevich Jan 27 '17 at 19:21
You can also think that every vertex has its own capacity, which means each vertex can be passed only once. Build a new graph in this way:
(1)capacity(vi) = 1
(2)capacity(ei) = 1
then run maximum flow. The answer is the maximum number.

- 175
- 7