Search code examples
graphnetworkxmax-flowcontrol-flow-graphminimum-cut

Is there a way to maximize the max flow of a graph by adjusting the weights within a certain range?


I've been learning about flow graphs and from what I've learned, a flow graph is a directed, weighted graph that has a certain maximum flow that can be calculated. However, is there a way to randomly weight the graph with values between a certain range and gradually change the weights to maximize the max flow?


Solution

  • If you change the weights of the edges then it's possible that the max flow value change. I mean, the max flow value is for a graph, if you change the graph the max flow value will change too.

    Ask yourself about what do you persuit whenever changing weights of edges. If you want to maximize max flow value and you have to choose weights for a certain range then by choosing the maximum value of the range as weight of all edges you will surely find the highest max flow value obtained by modification of weights in a certain range.