|
Here we can see the code of how our algorithm works. The input values are an undirected network graph G and a flow f, and the output is a path for that flow. The function, find path in graph, first checks if the source and destination of the flow are connected. If so, it will get the minimum edge cut set and then pick an edge e=(e1,e2) from the set. Then it appends that edge to the path list. If the selected edge contains both source and destination it will return the path, otherwise, it will set node e2 as the new source and node e1 as the new destination, then recursively run the function on the two partitioned networks. This loop of partitioning continues until the path is constructed.
|