0

Suppose I have a network of interconnected switches. Every link connecting two different switches has its own positive usage cost and maximum bandwidth that it can pass through. Is there an algorithm / a combination of algorithms to optimally find paths between specified ports of different switches where every such path has minimal possible cost and guarantees to be able to pass through traffic of a predefined bandwidth?

Using Dijkstra's algorithm on a weighted graph solves the problem of finding minimal cost path, but what to do with bandwidth requirement? If such algorithm exists will it give optimal solution when requests to find a path aren't known all beforehand, but come one after another?

Thank you!

  • The kind of term/problem category you are looking for is [Max-flow_min-cut](https://en.wikipedia.org/wiki/Max-flow_min-cut_theorem). In easy words: you want to optimize your throughput, while respecting the limits/costs of each node/edge. – SME_Dev Oct 28 '14 at 14:47
  • There is also a good wiki-page with diverse [algorithms](https://en.wikipedia.org/wiki/Maximum_flow_problem#Solutions) to solve the problem – SME_Dev Oct 28 '14 at 15:09

1 Answers1

0

Merely determining the feasibility of routing several demands as paths is strongly NP-hard, by reduction from, e.g., the 3-partition problem. The tough constraint is routing a whole demand on just one path. If we allow multiple paths (i.e., a flow), then we get the minimum-cost multi-commodity flow problem, which is polynomial-time solvable (albeit inefficiently in practice). It seems unlikely that there is an optimal online algorithm for either problem.

David Eisenstat
  • 64,237
  • 7
  • 60
  • 120