I have a directed weighted graph G = <V, E>
. I need to find shortest path between s
and t
in O((V + E)*logV)
. It would be a really simple task, if I have a classical metric weight of path. But it is not.
Weight of path = two heaviest edges in this path
.
Therefore, classic Dijkstra's algorithm with modified binary heap
does not work. I think, that I have to modify this algorithm. I'm trying to do it, but I have no success.
Example.
Weight of path between 3
and 5
= 4 + 2 = 6
Weight of path between 3
and 7
= 4 + 4 = 8