Prim’s Algorithm Multiple choice Questions and Answers (MCQs)

YOU may join our Telegram for all subjects PDF BOOKS.

https://t.me/+Ccx9McEia7wyODg1

Prim's Algorithm Multiple choice Questions and Answers (MCQs)

Question 1 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following is true?
A
Prim's algorithm initialises with a vertex
B
Prim's algorithm initialises with a edge
C
Prim's algorithm initialises with a vertex which has smallest edge
D
Prim's algorithm initialises with a forest
Question 1 Explanation: 
Steps in Prim's algorithm: (I) Select any vertex of given graph and add it to MST (II) Add the edge of minimum weight from a vertex not in MST to the vertex in MST; (III) It MST is complete the stop, otherwise go to step (II).

Question 2 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Consider the given graph.

What is the weight of the minimum spanning tree using the Prim's algorithm, starting from vertex a?

A
23
B
28
C
27
D
11
Question 3 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Worst case is the worst case time complexity of Prim's algorithm if adjacency matrix is used?
A
O(log V)
B
O(V2)
C
O(E2)
D
O(V log E)
Question 3 Explanation: 
Use of adjacency matrix provides the simple implementation of the Prim's algorithm. In Prim's algorithm, we need to search for the edge with a minimum for that vertex. So, worst case time complexity will be O(V2), where V is the number of vertices.

Question 4 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Prim's algorithm is a .....
A
Divide and conquer algorithm
B
Greedy algorithm
C
Dynamic Programming
D
Approximation algorithm
Question 4 Explanation: 
Prim's algorithm uses a greedy algorithm approach to find the MST of the connected weighted graph. In greedy method, we attempt to find an optimal solution in stages.

Question 5 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Prim's algorithm resembles Dijkstra's algorithm.
A
True
B
False
Question 5 Explanation: 
In Prim's algorithm, the MST is constructed starting from a single vertex and adding in new edges to the MST that link the partial tree to a new vertex outside of the MST. And Dijkstra's algorithm also rely on the similar approach of finding the next closest vertex. So, Prim's algorithm resembles Dijkstra's algorithm.

There are 5 questions to complete.