Network Models:: - Shortest-Route Algorithm - Minimal Spanning Tree Algorithm
Network Models:: - Shortest-Route Algorithm - Minimal Spanning Tree Algorithm
-SHORTEST-ROUTE ALGORITHM
-MINIMAL SPANNING TREE
ALGORITHM
Jefferson S. Felipe
September 11, 2010
SHORTEST-ROUTE ALGORITHM
NODE
NODE LABEL
STEPS IN FINDING SHORTEST-
ROUTE ALGORITHM
1. Assign node 1 permanently label [0,S]; S indicates that node 1 is
the starting node and the zero indicates that the distance from
node 1 to itself is zero.
2. Compute tentative labels for the nodes that can be reached directly
from node 1. The first number in each label is the direct distance
from node 1 to the node in the question; we refer to as the
preceding node value, indicates the preceding node on the route
from node 1 to node in question; thus, in this step the preceding
node value is 1 since we are only considering nodes that can be
directly reached from node 1.
3. Identify the tentatively labeled node with the smallest distance
value, and declare that the node permanently labeled. If all nodes
are permanently labeled go to step 5
4. Consider all nodes that are not permanently labeled and can be
reached directly from the new permanently labeled node identified
in step 3. Compute tentative labels for these nodes as follows:
Steps cont.
a. If the non permanently labeled node in the question has a
tentative label, compute the sum of the distance value at the new
permanently labeled node to the node in question. If this sum is
less than the distance value for the node in question, set the
distance value for this node equal to this sum: in addition, set the
preceding node value equal to the new permanent labeled node
that provided the smaller distance. Go to step 3.
b. If the the nonpermanently labeled node in question does not have
a tentative label, a tentative label is created with a distance value
equal to the sum of the distance value at the new permanently
labeled node to the node in question. The preceding node value is
set to equal to the new permanently labeled node. Go to step 3.
5. The permanent labels identify the shortest distance from node 1
to each node and the preceding node on the shortest route. The
shortest route to a given node can be found by starting at a given
node and moving to its preceding node. Continuing this backward
movement through the network will provide the shortest route
from node 1. to the node in question.
Sample problem:
GORMAN CONSTRUCTION COMPANY
Gorman Construction company has several
construction projects located throughout a
three-county area. Construction sites are
sometimes located as far as 50 miles from
Gorman’s main office. With multiple daily trips
carrying personnel, equipment, and supplies to
and from the construction locations, the costs
associated with the transportation activities are
substantial. For any given construction site, the
travel alternatives between the site and the
office can be described by a network of roads,
streets, and highways.
Figure 2. NETWORK FOR THE GORMAN
COMPANY SHORTEST-ROUTE PROBLEM
7
17
2
6 5 6
15 4
3
6
10 3 4 2
5
Gorman’s
office