问题1: 在有10个点的图中,唔的直观含义是什么? 如果=7,能认定节点间的最短路径长度 是7吗?
一种“最优解”的递归定义方式 怎么从路-1去计算珊 Form1,we compute as the minimum of(the weight of a shortest path from i to j consisting of at most m-l edges)and the minimum weight of any path from i to j consisting of at most m edges,obtained by looking at all possible predecessors k ofj.Thus,we recursively define m)=min(-1).min 1<k< min (25.2) 1≤k≤n {-D+w}. The latter equality follows since wjj=0 for all j
一种“最优解”的递归定义方式 怎么从𝑙 𝑖𝑗 𝑚−1去计算𝑙 𝑖𝑗 𝑚
间题2: 如果定义矩阵L=(珊),L1,L2, …,L观-1分别表示什么含义?
间题3: 我们需要计算瑞吗? 为什么(,》=瑞1?
自底向上计算 The heart of the algorithm is the following procedure,which,given matrices L(m-1and W.returns the matrix L(m).That is,it extends the shortest paths com- puted so far by one more edge. EXTEND-SHORTEST-PATHS(L.W) 1 n =L.rows 2 let L'=()be a new n x n matrix 间题4: 3 for i Iton 4 forj 1to n 567 号=∞ one more for k Ito n 号=min(吗,lk+0对) edge”体现在 8 return L' 哪里?
自底向上计算 O(n3 )