給定{v1, v2, v3, v4, v5}鄰接矩陣(adjacency matrix)如下,則 v1 到其他各點(可以經過別的點)的最短路徑距離何者正確? $$ \begin{array}{c c c c c} \text {v1} & \text {v2} & \text {v3} & \text {v4} & \text {v5} \end{array} $$ $$ \begin{array}{l} \text {v1} \\ \text {v2} \\ \text {v3} \\ \text {v4} \\ \text {v5} \end{array} \left[ \begin{array}{c c c c c} 0 & 1 & 3 & \infty & \infty \\ 1 & 0 & 1 & 2 & 6 \\ 3 & 1 & 0 & 1 & \infty \\ \infty & 2 & 1 & 0 & 1 \\ \infty & 6 & \infty & 1 & 0 \end{array} \right] $$

Av1→v3,最短路徑距離=3
Bv1→v4,最短路徑距離=3正確答案
Cv1→v5,最短路徑距離=∞
Dv1→v2,最短路徑距離=4
答案與詳解
