演算法›Ch4 圖論演算法第 8 題/共 111 題
8. Dijkstra、MST、廣義最短路徑演算法框架
#AL-04-008難DijkstraMST廣義最短路徑演算法框架
Consider the (incomplete) pseudocode snippet SOLVE().
function SOLVE(, , ) 1 // Initializes a set with all vertices. 2 Set and for all . // Initializes an array . 3 while do 4 // Chooses a vertex. 5 // Removes the vertex. 6 for each such that , do 7 () 8 return ()
You have realized that this code snippet can be used to solve different problems by filling the blanks in different ways. Here are three problems we consider:
- In the ST-DISTANCE problem, you are given a graph with non-negative weights, and two vertices . The goal is to compute the shortest distance between and .
- In the ST-BOTTLENECK problem, you are given a graph with non-negative weights, and two vertices . The goal is to compute the smallest possible weight such that there exists at least one path from to using only edges whose weights are less than or equal to .
- In the MST problem, you are given an undirected, weighted, and connected graph . The goal is to compute the total weight of a minimum spanning tree.
Select all correct statement(s) below.
📄 台大114
▤完整推導請見《WH 資工筆記 · 演算法》Ch4 圖論演算法