GATE / CS ARCHIVE

GATE CSE 1991 / QUESTION 3(vi)

Kruskal bounds in a multiple-answer question

Algorithms · Graph Algorithms · Full GATE CSE 1991 paper

GATE 1991, Q3(vi) 2 marks · MSQ
Report issue

Graph Algorithms

Question 3(vi), GATE 1991: For n vertices and m edges, choices are A O(n²), B O(mn), C O(m+n), D O(m log n), E O(m²). Identify Kruskal’s complexity.
Question 3(vi), GATE 1991: For n vertices and m edges, choices are A O(n²), B O(mn), C O(m+n), D O(m log n), E O(m²). Identify Kruskal’s complexity.
Tap to enlarge
Select all that apply
Answer & solution

Answer: D is the usual informative bound; B, D, E are valid upper bounds for connected simple graphs (no official key was published)

Comparison-sort Kruskal first sorts m edges in O(m log m), then processes them with disjoint-set operations. For a connected simple graph, n−1≤m≤n(n−1)/2, so log m=O(log n), yielding O(m log n). This supports D. Because big-O is an upper bound, the same algorithm is also O(mn) and O(m²), so B and E cannot be called false merely for being looser in a multiple-answer task. O(m+n) is not the generic comparison-sorting bound; O(n²) does not cover the usual sorting cost for dense arbitrary-weight inputs. Different integer-sorting or presorted-edge models can change the analysis.

Original paper, page 3