This is a homework problem I'm really struggling with. I'm supposed to program the shortest path problem in Mathematica. There are 100 nodes, each node has corresponding distances to 2-3 more nodes. At first I'm supposed to program a module that takes in the graph data, then builds a distance matrix.
An example of the graph data looks like this
node0, node1 0.04, node8 11.11, node14 72.21
node1, node46 1247.25, node6 20.59, node13 64.94
node2, node66 54.18, node31 166.80, node45 1561.45
node3, node20 133.65, node6 2.06, node11 42.43
Where the first node is the initial node and the next few nodes with numbers next to them are the distances.
How do I go about doing this?
Thank you for your help!