## 4 Problem Modeling and Solution
### A Ranking Method Based on Path Contribution
```
1:Input: Paths \(P\)
2:Output: Total flow, Paths selected according to the rank order
3:Function find_max_min_bandwidth_path(paths):
4:max_mid_bandwidth \(\leftarrow\)\(-1\)
5:best_path \(\leftarrow\) None
6:for path in paths do
7:if path.min_bandwidth() > max_min_bandwidth then
8: max_min_bandwidth \(\leftarrow\) path.min_bandwidth()
9: best_path \(\leftarrow\) path
10:else if path.min_bandwidth() = max_min_bandwidth then
11:if path.length() < best_path.length() then
12: best_path \(\leftarrow\) path
13:endif
14:endif
15:endfor
16:Return (best_path, max_min_bandwidth)
17:Function update_bandwidth(path, min_bw):
18:for link in path.links do
19: link.capacity \(\leftarrow\) link.capacity--min_bw
20:endfor
21:Main Program:
22:total_flow \(\leftarrow\) 0
23:path_results \(\leftarrow\) []
24:while True do
25: (best_path, min_bw) \(\leftarrow\) find_max_min_bandwidth_path(paths)
26:if best_path = None or min_bw <= 0 then
27:break
28:endif
29: update_bandwidth(best_path, min_bw)
30: total_flow \(\leftarrow\) total_flow + min_bw
31: path_results.append((best_path, min_bw))
32:endwhile
33:Return total_flow, path_results
```  
**Algorithm 1** Rank paths while maximizing transmission capacity  
The input to this Algorithm 1 is the set of all simple paths between a source-destination node pair, along with parameters such as the available bandwidth of each link in the path and the path length. The algorithm selects the path \(p*\) from the path set \(P\) that has the maximum minimum link bandwidth and is the shortest. For all links contained in path \(p*\), the available bandwidth is reduced by \(\underset{l\in p*}{\text{min}}l\), making the available bandwidth of the bottleneck link of path \(p*\) equal to 0. The path \(p*\) is then removed from the set \(P\), and the next path with the maximum minimum link bandwidth and shortest length is selected. This process is repeated until set \(P\) is empty or the maximum minimum link bandwidth is less than or equal to 0. The time complexity of the algorithm is \(O\big{(}L\times P^{2}\big{)}\), where \(L\) represents the number of links, and \(P\) represents the number of paths. The output of this algorithm is the maximum transmission capacity between the node pair and the selected paths ranked by contribution. Higher-ranked paths can transmit greater amounts of traffic. The output path set is the minimal set of paths that achieves the maximum transmission capacity from the candidate paths. Removing any path from this minimal set would lead to a decrease in overall transmission capacity, while adding another path would not increase it. This ensures that the multiple paths selected between the node pair are non-redundant. It is important to note that the shortest path between the node pair is always selected in this algorithm. If the bottleneck link of the shortest path overlaps with the bottleneck links of other paths, the shortest path is still selected due to its minimal length. If the bottleneck link of the shortest path does not overlap with the bottleneck links of other paths, it will be selected sooner or later during one of the iterations in the loop from line 24 to line 32.