Instructions:
Simulate the behavior of Prim's Algorithm for the given graph below. Click on the appropriate edge (parent, node) to enqueue or update a node in the Priority Queue (PQ). Click Dequeue to remove the node from PQ, and to add a node to the spanning tree. Begin from node A. The table contains the known shortest distance from A to each node alongside its parent node.
0
A
B
C
D
E
F
G
H
I
J
K
L
M
N
5
8
2
8
6
9
3
3
7
7
5
1
6
2
8
8
Legend
- Node
- A
- B
- C
- D
- E
- F
- G
- H
- I
- J
- K
- L
- M
- N
- Distance
- 0
- ∞
- ∞
- ∞
- ∞
- ∞
- ∞
- ∞
- ∞
- ∞
- ∞
- ∞
- ∞
- ∞
- Parent
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -