Kann man den Dijkstra Algorithmus zur Entwerfung eines Algorithmus in Pseudocode benutzen, wenn ich die Exzentrizität mit Laufzeit der für einen gegebenen Graphen und Knoten den Wert ex(v) bestimmen soll?
1:function Dijkstra(Graph, source): 2:for each vertex in Graph: Initialization 3:distv] infinity initial distance from source to vertex is set to infinite 4:previousv] undefined Previous node in optimal path from source 5:distsource] Distance from source to source the set of all nodes in Graph all nodes in the graph are unoptimized - thus are in 7:while is not empty: main loop node in with smallest dist ] 9:remove from for each neighbor of where has not yet been removed from Q. alt distu] dist_between(u, if alt distv] Relax distv] alt previousv] return previous ]
Für alle, die mir helfen möchten (automatisch von OnlineMathe generiert): "Ich möchte die Lösung in Zusammenarbeit mit anderen erstellen." |