I need your help with F-W algorithm. My question is: is it possible to find shortest path between two vertexes? Down below I will give you an example of what I want.
1 -----50(w)----- 5
| \__ / |
| \5(w) /20(w)|
10(w) \__3__/ |25(w)
| \___ |
| 18(w)\ |
2--------8(w)------4
If my picture isn't possible to see, here is a picture of it: http://prntscr.com/b6n43d
This is what I got with final cycle with weights:
0 10 5 18 25
10 0 15 8 33
5 15 0 18 20
18 8 18 0 25
25 33 20 25 0
And this is what I got with vertex'es:
0 1 2 1 2
0 0 0 3 3
0 0 0 3 4
1 1 2 0 4
2 3 2 3 0
And I need to find that vertex, that furthermost vertex be as most as possible near that first vertex. What I mean, that vertex 1 have 50 weight with 5 vertex (that mean they are furthermost from each other) and I need to find shortest path between 1 and 5. Any ideas how I can do that ?
The whole code were write'd from https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm pseuudo code.