The node data base has the following information. Node number Price of gas at that node. Number of connection to other nodes. A connection between nodes will be listed only once, but the connection can be traveled both directions. For example, node 5 may show a connection to node 12 of 60 miles, but node 12 will not show a connection to node 5.
Travel can be either direction.
From node 5 to 12 or from node 12 to 5. Find the low cost route between any two nodes. This might not be the lowest distance route. If a gas price is low enough, you may want to consider traveling the same route both directions. Find the shortest distance route between to nodes.