演算法›Ch4 圖論演算法
第 81 題/共 111 題
◀ AL 81/111
81. Floyd-Warshall、負權邊、All-Pairs Shortest Path
#AL-04-081中Floyd-Warshall負權邊All-Pairs Shortest Path

[10%] You are analyzing the routing latencies for a constellation of 4 satellites (Nodes A, B, C, D). Below is the adjacency list with the latency between specific nodes:

Adjacency List:

  • A → B: 10
  • A → C: -5
  • C → B: 4
  • B → D: 5
  • D → C: 2
  • D → A: 3

Requirement: You need to analyze the latency characteristics of the network so that shortest communication paths can be efficiently determined when needed.

Questions:

(1) [4%] Based on the specific properties of the edges in this graph and the problem requirement, identify the single most appropriate standard algorithm to use. Explain your choice by pointing out the specific graph feature that disqualifies other algorithms, and explicitly state why at least one other commonly used shortest-path algorithm would fail or be inappropriate in this case.

(2) [2%] Let MM be the initial 4×44 \times 4 distance matrix used at the start of your chosen algorithm. Please construct and write down MM clearly. (Note: Use “∞\infty” for non-existing edges and “0” for self-loops. Order: A, B, C, D)

(3) [4%] After the algorithm completes execution:

    (a) [2%] What is the final shortest path cost from Node D to Node B? Please trace the path logic (e.g., D → … → B).

    (b) [2%] State the asymptotic Time Complexity Θ\Theta of this algorithm.

📄 成大115
跳轉到第題
▤完整推導請見《WH 資工筆記 · 演算法》Ch4 圖論演算法
本章題號 · 81–100 / 111