I would like a review for my algorithm for the following question:
A flow network is a “balanced network” if for every $v∈V- {s,t}$ it holds that $c_in (v)=c_out (v).$
Let G be a balanced network in which in-degree(s)=out-degree(t)=0
Find max-flow for G.
My Algorithm so far:
- We will define the following capacity-function: $∀(u,v)∈E,f(ⅇ)=c(ⅇ)$
- Run over the adj. list and update for every edge it to be our function, and return c(e)
I was also wondering how to prove its a max flow in the correctness part Thank you