I've been trying to solve the following problem:
Problem is the following: Given a graph and a pair of nodes $s$, $t$ you have to find the path from $s$ to $t$ which minimises the sum of its two largest edges.
Here's what i've come up with: I am executing the Prim algorithm with a slight modification. The cost of a node $u$ (i.e what's saved in the heap) is the following: Minimum sum of two largest edges that can lead from $s$ to $u$, where said edges are either on the tree constructed thus far (via Prim) or one of them can be an edge $e=(a,u)$ where $a$ is a node on the tree.
The reasoning of why this should work – I think – is similar to the Prim's algorithm proof. The problem reminds me of the Minimum Bottleneck Tree which can also be solved by MST.
However, the algorithm fails on three test cases. I've checked the source code for errors but I didn't find anything. This means that the error is likely in my algorithm. (Of course, I can post the code if needed.)
Can anyone either show a testcase where the algorithm fails or give a hint in the right direction?