Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given a flow network $G=(V,E)$, source $s$ , sink $t$ and capacity function $c:E \to \mathbb{R}^+ \cup \{0\}$ ; as well an edge $e=(u,v) \in E$. I need to find an efficient algorithm which finds among all possible flows between $s$ and $t$ , a flow $f$ where $f(e)$ is the maximum flow possible on the edge $e$ for it.

I want to use Ford Fulkerson algorithm but instead of using BFSs one after the other and increase the flow, first use all the paths through $e$, and then after we don't find any, go on with any path available to $t$ from $s$, or something in this direction..

Edit: You can assume that the capacities are integers.

Thanks a lot!

share|improve this question
    
You can't use the Ford Fulkerson algorithm unless all capacities are integers since otherwise you are promised that the algorithm will stop. –  Belgi Aug 28 '12 at 10:42
    
By the way, I would first try to make a reduction to an existing algorithm and only upon failing I would start to consider changing it –  Belgi Aug 28 '12 at 10:50
    
@Belgi: I can assume that the capacities are integers. I add it to the answer. BTW Dinic and Dijkstra are only for integer capacities? –  Jozef Aug 28 '12 at 11:03
    
I don't remember, you can look this up easily in Google though. Among all flows where $f(e)$ is maximal, are we required to find one that maximizes the flow of the network ? –  Belgi Aug 28 '12 at 11:33
    
I do not get the part: "where $f(e)$ is the maximum flow possible on the edge $e$ for it". –  utdiscant Aug 28 '12 at 13:14

1 Answer 1

up vote 1 down vote accepted

Try this: let $e$ join $v$ to $w$, delete every edge that is neither in a path from source to $v$ nor in a path from $w$ to sink, and find a maximal flow in what's left of the network.

EDIT: Here's another way to achieve this. Reviewing the notation: the source is $s$, the sink is $t$, the edge $e$ joins $u$ to $v$. Make believe the sink is $u$, and find a maximal flow in the network; let its value be $a$. Now make believe the source is $v$, and the sink is $t$, and find a maximal flow; let its value be $b$. Then the maximal flow achievable in $e$ is the smallest of the numbers $a$, $b$, and the capacity of $e$. Moreover, you can easily adjust the flows you have found to a flow with that maximal amount going through $e$ and with the rest of the flow maximal subject to that restriction.

share|improve this answer
    
You are not guaranteed that you can even send some flow from $s$ to $t$ since if no flow uses $e$ you deleted the other options –  Belgi Aug 28 '12 at 13:55
    
@Belgi, if no flow uses $e$ then the answer is zero, isn't it? –  Gerry Myerson Aug 28 '12 at 22:38
    
Technicly the answer is any flow (the answer is not a number...). and I just wanted to point to the first thing that came to mind...I still think that the solution is incorrect (thats my intuition) –  Belgi Aug 28 '12 at 22:43
    
@Belgi, different flows have different values for $f(e)$, so I don't see how the answer can be "any flow". And Mathematics doesn't necessarily accord with your intuition. My proposed solution may be incorrect, but I'd like to see an example where it gives the wrong answer. –  Gerry Myerson Aug 29 '12 at 1:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.