Hi,
I have got problem with this task. (It's not homework!).
We have undirected graph with wages X,Y.
Firstly all edges has got X. But if exist path that costs 2X (from vi to vj and (vi and vj arent connected directly)) than we can replace it by Y.
Our task is to find minimal distance to all vertex from start vertex.
I will write an example:
V E StartVertex, X, Y
6 6 1 4 1
1 2
...