Question: Recall the mountain biking problem from class. In this updated version, each of the mountain bike trails can be taken in only one direction. Furthermore,

Recall the mountain biking problem from class. In this updated version, each of the mountain bike trails can be taken in only one direction. Furthermore, there is only one mountain pass, called P. There are n marked routes on the map, of which n/5 are starting positions, and n/5 are finishing positions. There are m direct routes on the map, where each direct route between two points has both a direction (possibly bi-directional) and a distance.
Your job is to determine the shortest distance through the mountain from a start point, to the mountain pass, to a finish point. Be sure to consider all possible starting and ending position. You must carefully describe the graph model to your problem, and describe your steps. Be sure to describe the input and output to Dijkstra. The algorithm must find the shortest distance from a start to a finish point, and also a print out of the stops from start to finish (in order).
Justify the runtime of O(m log n), where n is the number of trail points and m is the number of bike trails.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!