15.082 and 6.855J
-
Upload
zenia-chaney -
Category
Documents
-
view
23 -
download
3
description
Transcript of 15.082 and 6.855J
1
15.082 and 6.855J
Dijkstra’s Algorithm
2
An Example
1
2
3
4
5
6
2
4
2 1
3
4
2
3
2
Initialize
1
0
Select the node with the minimum temporary distance label.
3
Update Step
2
3
4
5
6
2
4
2 1
3
4
2
3
2
2
4
0
1
4
Choose Minimum Temporary Label
1
3
4
5
6
2
4
2 1
3
4
2
3
2
2
4
0
2
5
Update Step
1
2
3
4
5
6
2
4
2 1
3
4
2
3
2
2
4
6
43
0
The predecessor of node 3 is now node 2
6
Choose Minimum Temporary Label
1
2 4
5
6
2
4
2 1
3
4
2
3
2
2
3
6
4
0
3
7
Update
1
2 4
5
6
2
4
2 1
3
4
2
3
2
0
d(5) is not changed.
3
2
3
6
4
8
Choose Minimum Temporary Label
1
2 4
6
2
4
2 1
3
4
2
3
2
0
3
2
3
6
4
5
9
Update
1
2 4
6
2
4
2 1
3
4
2
3
2
0
3
2
3
6
4
5
d(4) is not changed
6
10
Choose Minimum Temporary Label
1
2
6
2
4
2 1
3
4
2
3
2
0
3
2
3
6
4
5
6
4
11
Update
1
2
6
2
4
2 1
3
4
2
3
2
0
3
2
3
6
4
5
6
4
d(6) is not updated
12
Choose Minimum Temporary Label
1
2
2
4
2 1
3
4
2
3
2
0
3
2
3
6
4
5
6
4
6
There is nothing to update
13
End of Algorithm
1
2
2
4
2 1
3
4
2
3
2
0
3
2
3
6
4
5
6
4
6
All nodes are now permanent
The predecessors form a tree
The shortest path from node 1 to node 6 can be found by tracing back predecessors