Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/Dijkstras-algorithm/Maxima/dijkstras-algorithm.maxima
Normal file
14
Task/Dijkstras-algorithm/Maxima/dijkstras-algorithm.maxima
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
load(graphs)$
|
||||
g: create_graph([[1, "a"], [2, "b"], [3, "c"], [4, "d"], [5, "e"], [6, "f"]],
|
||||
[[[1, 2], 7],
|
||||
[[1, 3], 9],
|
||||
[[1, 6], 14],
|
||||
[[2, 3], 10],
|
||||
[[2, 4], 15],
|
||||
[[3, 4], 11],
|
||||
[[3, 6], 2],
|
||||
[[4, 5], 6],
|
||||
[[5, 6], 9]], directed)$
|
||||
|
||||
shortest_weighted_path(1, 5, g);
|
||||
/* [26, [1, 3, 4, 5]] */
|
||||
Loading…
Add table
Add a link
Reference in a new issue