Jump to content

Dijkstra's algorithm: Difference between revisions

Line 897:
 
=={{header|Mathematica}}==
This is beautiful, but incorrect.
This solution is incorrect. Since the path is directed and f is only a sink, f cannot be in the middle of a path.
 
<lang Mathematica>bd = Graph[ {
"a"\[UndirectedEdge] "b", "a"\[UndirectedEdge] "c", "b"\[UndirectedEdge] "c",
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.