196k views
3 votes
Kruskal’s algorithm might produce a non-minimal spanning tree. S2. Kruskal’s algorithm can efficiently implemented using the disjoint-set data structure. S1 is true but S2 is false Both S1 and S2 are false Both S1 and S2 are true S2 is true but S1 is false

1 Answer

4 votes

Complete Question:

Consider the following statements.

S1. Kruskal’s algorithm might produce a non-minimal spanning tree.

S2. Kruskal’s algorithm can efficiently be implemented using the disjoint-set data structure.

a) S1 is true but S2 is false

b) Both S1 and S2 are false

c) Both S1 and S2 are true

d) S2 is true but S1 is false

Answer:

d) S2 is true but S1 is false

Explanation:

Kruskal's algorithm is an algorithm that produces minimum spanning tree and finds an edge of the least possible weight that connects any two trees in the forest. It is a greedy algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph and adds increasing cost arcs at each of the steps.

In Kruskal’s algorithm, the disjoint-set data structure is used for its implementation. It always finds the Minimum Spanning Tree for any connected graph.

User Ajmurmann
by
4.9k points