Network Algorithms Flashcards
(4 cards)
How do you carry out Kruskal’s algorithm?
Minimum spanning network
- Select shortest edge
- Select next shortest edge that doesn’t create a cycle until all vertices are connected
How do you carry out Prim’s algorithm?
Minimum spanning network
- Start with any vertex and delete its row
- Select smallest entry from that column and label the new vertice as 2 and delete its row
- Select smallest entry from any connected vertices’ columns and delete their rows until all finished
How do you carry out Djikstra’s algorithm?
Shortest path from node to node
- Starting node labelled as (1 0)
- Write working values in all connected vertices (distance to starting node)
- Select node with smallest working distance and repeat process until final node has a permanent label
CPA?
- Forward pass - longest time
- Backward pass - shortest time