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

 

 Help authour, Buy PDF Ebook   >>>Click Here<<<

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

Click on any option to know the CORRECT ANSWERS

Question 1
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
Data interpretation (DI) Questions answers

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
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
EVS Questions answers

Question 3
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)
Visual arts Questions answers

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
Prim's algorithm is a .....
A
Divide and conquer algorithm
B
Greedy algorithm
C
Dynamic Programming
D
Approximation algorithm
Biology Questions answers

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
Prim's algorithm resembles Dijkstra's algorithm.
A
True
B
False
ICT Questions answers

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.

 

 Download all FREE PDF Ebook >>>CLICK HERE<<<