4 The diagram shows routes connecting five cities. Lengths are in km .
\includegraphics[max width=\textwidth, alt={}, center]{ae8dc840-0c61-4ba5-b082-1f5f3e6c2cef-4_442_995_319_534}
- Produce the initial matrices for an application of Floyd's algorithm to find the complete network of shortest distances between the five cities.
The following are the distance and route matrices after the third iteration of Floyd's algorithm.
\begin{center}
\begin{tabular}{ | c | c | c | c | c | c | }
\cline { 2 - 6 }
\multicolumn{1}{c|}{} & \(\mathbf { 1 }\) & \(\mathbf { 2 }\) & \(\mathbf { 3 }\) & \(\mathbf { 4 }\) & \(\mathbf { 5 }\)
\hline
\(\mathbf { 1 }\) & 44 & 22 & 42 & 15 & 15
\hline
\(\mathbf { 2 }\) & 22 & 44 & 20 & 5 & 23
\hline
\(\mathbf { 3 }\) & 42 & 20 & 40 & 25 & 43
\hline
\(\mathbf { 4 }\) & 15 & 5 & 25 & 10 & 16
\hline