演算法›Ch4 圖論演算法
第 17 題/共 111 題
◀ AL 17/111
17. Floyd-Warshall、空間複雜度
#AL-04-017易Floyd-Warshall空間複雜度

Given a graph G=(V,E)G=(V,E) with the adjacent matrix W=wijW=w_{ij} with WW an n×nn\times n matrix. The following algorithm can compute the All-Pairs Shortest Path of GG.

FLOYD-WARSHALL'(W) 1 D = W 2 for k = 1,2,...,n 3 for i = 1,2,...,n 4 for j = 1,2,...,n 5 dij=min⁡(dij,dik+dkj)d_{ij} = \min(d_{ij}, d_{ik}+d_{kj})

What is the SPACE complexity of this algorithm?

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