Question: Suppose we start Prim's algorithm from ( S ) on this graph. Write down the state of the Priority Queue being used as
Suppose we start Prim's algorithm from S on this graph. Write down the state of the Priority Queue being used as the after S is visited, after B is visited, and after the algorithm is completed. Each value in the priority queue should be an integer. Resolve ties by alphabetical order of the vertices. For example: if A and C have the same priority, then you should first pop A since it comes alphabetically first.
Initialize the priority of each vertex as which we'll use to represent infty So before the first iteration, the values of the are:
fringe S: A:inf, B:inf, C:inf, D:inf, E:inf, F:inf, G:inf, H:inf, I:inf
Order your fringe by priority values. You should use the same alphabetical tiebreaking scheme when choosing the order of the Make sure you include the and in your answer. If the fringe is empty, put Q down
Points
Give the state of the priority queue after B is visited
fringe:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
