5.
\begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{44ddb176-e265-4545-b438-c1b5ffb40852-06_965_1290_237_390}
\captionsetup{labelformat=empty}
\caption{Figure 4}
\end{figure}
Figure 4 represents a network of roads. The number on each arc represents the length, in miles, of the corresponding road. Tamasi, who lives at A, needs to collect a caravan. Tamasi can collect a caravan from either J or K.
Tamasi decides to use Dijkstra's algorithm once to find the shortest routes between A and J and between A and K.
- State, with a reason, which vertex should be chosen as the starting vertex for the algorithm.
- Use Dijkstra's algorithm to find the shortest routes from A to J and from A to K . You should state the routes and their corresponding lengths.
Tamasi's brother lives at F . He needs to visit Tamasi at A and then visit their mother who lives at H .
- Find a route of minimal length that goes from F to H via A .