COMPUTER SCIENCE AND ENGINEERING
ALGORITHMS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Path vector
|
|
distance vector
|
|
link state
|
|
none of the mentioned
|
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.