Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding the minimax/maximin paths (Floyd-Warshall)

I've implemented the Floyd-Warshall-Algorithm to solve the All-pairs shortest path problem. Now I found out I can also compute the minimax or maximin path with easy modifications. But I don't understand what the result means (what a minimax path is). I found some explanations on the web, but they are confusing me.

Minimax - Minimax in graph problems involves finding a path between two nodes that minimizes the maximum cost along the path.

Maximin - the other way around from Minimax - here you have problems where you need to find the path the maximizes the minimum cost along a path.

Could someone please try to give an other explanation or an example?

like image 407
d.hill Avatar asked Jan 26 '12 17:01

d.hill


People also ask

What is the Minimax path?

* A minimax path is the shortest length path such that the. * maximum edge weight along a path is minimum. (

Can we reconstruct path using Floyd-Warshall algorithm?

The Floyd-Warshall algorithm is an efficient DynamicProgramming algorithm that computes the shortest path between all pairs of vertices in a directed (or undirected) graph. This is arguably the easiest-to-implement algorithm around for computing shortest paths on programming contests.

What is the Floyd-Warshall algorithm used for?

Floyd-Warshall Algorithm is an algorithm for finding the shortest path between all the pairs of vertices in a weighted graph. This algorithm works for both the directed and undirected weighted graphs. But, it does not work for the graphs with negative cycles (where the sum of the edges in a cycle is negative).

Is Floyd warshall better than Dijkstra?

Unlike Dijkstra's algorithm, Floyd Warshall can be implemented in a distributed system, making it suitable for data structures such as Graph of Graphs (Used in Maps). Lastly Floyd Warshall works for negative edge but no negative cycle, whereas Dijkstra's algorithm don't work for negative edges.


1 Answers

To understand maximin paths (often called bottleneck paths) in a graph, consider the following problem. You have a road map of a country as a graph where each node represents an intersection and each edge represents a road. Each road has a weight limit, and if you drive a truck that exceeds the limit over that road it will break. You have a truck that you want to drive from some start location to some end location, and you want to put the maximum possible amount of weight on it. Given this, what path should you drive the truck in order to send the maximum possible weight?

If you think about this problem, for any path that you take in the graph, the maximum weight you can send along that path is going to be determined by the edge on that path with the minimum capacity. As a result, you want to find the path from the start to the destination whose minimum-capacity edge is maximized. The path with this property is called the maximin path or bottleneck path, and can be found with a straightforward set of modifications to mot shortest-path algorithms.

The minimax path represents the opposite idea - the path between two points that minimizes the maximum edge capacity.

Hope this helps!

like image 91
templatetypedef Avatar answered Sep 19 '22 14:09

templatetypedef