Prim's algorithm with the Fibonacci heap