![]() V u = min(q, key' vertex -> dist = Float.infinity | u = dest V neighbours = Dict(.vertices, vertex -> (vertex, ())) V previous = Dict(.vertices, vertex -> (vertex, ‘’)) V dist = Dict(.vertices, vertex -> (vertex, Float.infinity)) vertices = Set(.edges.map(e -> e.start)).union(Set(.edges.map(e -> e.end))) Concurrent Dijkstra's Algorithm (youtube) You can use numbers or names to identify vertices in your program. Write a program which interprets the output from the above and use it to output the shortest path from node a to nodes e and f.Run your program with the following directed graph starting at node a. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |