MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the algorithm uses the concept of best spanning tree?
A
Path vector
B
distance vector
C
link state
D
none of the mentioned
Explanation: 

Detailed explanation-1: -Kruskal’s algorithm is used to construct the minimal spanning tree for a given graph topology. Additionally, you also learned how to build an MST for a given graph using Kruskal’s Algorithm.

Detailed explanation-2: -The advantage of Prim’s algorithm is its complexity, which is better than Kruskal’s algorithm. Therefore, Prim’s algorithm is helpful when dealing with dense graphs that have lots of edges. However, Prim’s algorithm doesn’t allow us much control over the chosen edges when multiple edges with the same weight occur.

Detailed explanation-3: -Prim’s Algorithm is a greedy algorithm that is used to find the minimum spanning tree from a graph. Prim’s algorithm finds the subset of edges that includes every vertex of the graph such that the sum of the weights of the edges can be minimized.

There is 1 question to complete.