1、15.082 和 6.855J,使用简单桶的Dijkstra 算法 (也是闻名的Dial 算法),2,例子,1,2,3,4,5,6,2,4,2,1,3,4,2,3,2,初始化距离标号,选择带有最小临时距离标号的结点,1,初始化桶,3,更新步,2,3,4,5,6,2,4,2,1,3,4,2,3,2,2,4,0,1,1,2,3,4,选择最小临时标号,1,3,4,5,6,2,4,2,1,3,4,2,3,2,2,4,0,2,4,5,6,2,3,通过从最左端的桶开始且向右扫描直到找到非空桶,来寻找最小值.,5,更新步,1,2,3,4,5,6,2,4,2,1,3,4,2,3,2,2,4,6,4,3,0,4
2、,5,6,2,3,3,4,5,6,选择最小临时标号,1,2,4,5,6,2,4,2,1,3,4,2,3,2,2,3,6,4,0,3,6,3,4,5,通过从最左端的桶开始且向右扫描直到找到非空桶,来寻找最小值.,7,更新,1,2,4,5,6,2,4,2,1,3,4,2,3,2,0,3,2,3,6,4,6,3,4,5,8,选择最小临时标号,1,2,4,6,2,4,2,1,3,4,2,3,2,0,3,2,3,6,4,5,6,4,5,9,更新,1,2,4,6,2,4,2,1,3,4,2,3,2,0,3,2,3,6,4,5,6,6,4,5,6,10,选择最小临时标号,1,2,6,2,4,2,1,3,4,2,3,2,0,3,2,3,6,4,5,6,4,4,6,11,更新,1,2,6,2,4,2,1,3,4,2,3,2,0,3,2,3,6,4,5,6,4,4,6,12,选择最小临时标号,1,2,2,4,2,1,3,4,2,3,2,0,3,2,3,6,4,5,6,4,6,6,没有可更新的了,13,算法结束,1,2,2,4,2,1,3,4,2,3,2,0,3,2,3,6,4,5,6,4,6,所有结点都保持不变了,前驱形成一棵树,通过回溯前驱,可以找到从结点 1 到结点 6 的最短路径,