Question
Which condition must be satisfied for Kruskal’s
Algorithm to function correctly?Solution
Kruskal’s Algorithm constructs a Minimum Spanning Tree (MST) by selecting the smallest edges while ensuring no cycles are formed. For the algorithm to function correctly, the graph must be connected, meaning there exists a path between any two vertices. In a disconnected graph, Kruskal’s Algorithm would result in a Minimum Spanning Forest, not a single tree. Connectivity ensures that all vertices are included in a unified MST. Steps: • Sort edges by weight. • Use a Disjoint Set to detect and prevent cycles. • Add edges until all vertices are connected. Why Other Options Are Incorrect: 1. Directed Graph: Kruskal works on undirected graphs; additional considerations are needed for directed graphs. 2. Weighted Graph: While weights are essential, connectivity is a stricter requirement. 3. Distinct Weights: Not required; ties can be resolved arbitrarily. 4. No Cycles: The algorithm actively avoids cycles but does not require the graph to be cycle-free initially. Kruskal’s reliance on graph connectivity is a cornerstone of its application in MST problems.
- The first country to grant Mount Taranaki legal personhood is:
Which city of Madhya Pradesh is home to India’s first modern, self-sufficient gaushala with Bio-CNG plant?
Who is the Brand Ambassador of Madhya Pradesh Tourism?
Which Indian state recently became the first to implement a 'Right to Water' law?
- Which of India's Five-Year Plans is predominantly associated with the economic concept of "inclusive growth"?
- How many languages are included in the Eighth Schedule of the Constitution of India as scheduled languages?
Recently, who has been appointed as the Director General, SashastraSeemaBal (SSB)?
Consider the following statements about the Civil Disobedience Movement:
1. It was launched in 1930 by breaking the salt laws through the Dandi M...
Where was the 27th International Congress of Vedanta held?
- During which 1929 session was the aim of 'Poorna Swaraj' (complete independence) adopted by the Indian National Congress?