Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have is ____________.
GATE 2022 CS Q.30: solution and answer
Answer and solution
ANSWER
The maximum number of edges is 36.
Official answer: 36Source: Official answer key, GATE 2022 CS (IIT Kharagpur)
A disconnected graph has at least two components. To maximise edges, first take exactly two components, with and vertices, where . Merging extra components into one of these only allows more edges, so two components is enough.
A simple graph on vertices has at most edges, reached by . So the number of edges is at most .
Expand: . This is a parabola opening upward with its minimum at , so on it is largest at the ends and .
Check the values: , , . These agree with , and .
The maximum is , reached by together with one isolated vertex (a graph with 10 vertices, disconnected).
General rule: a disconnected simple graph on vertices has at most edges. Here .
KEY IDEA
A disconnected graph splits into components. The edge count is largest when one component is a complete graph on vertices and the other is a single isolated vertex, giving edges.
WATCH OUT FOR
Using or . Removing one edge from leaves the graph connected. To disconnect it you must remove all 9 edges at one vertex, which leaves .
From the GATE 2022 CS paper. Every question of this paper · Download the full paper · All 14 Graph theory questions, with notes
More Graph theory questions
- GATE 2022 CS Q.50 · MSQ · 2 marksThe following simple undirected graph is referred to as the Peterson graph.
- GATE 2022 CS Q.52 · MSQ · 2 marksWhich of the properties hold for the adjacency matrix A of a simple undirected unweighted graph having n…
- GATE 2022 CS Q.58 · NAT · 2 marksLet G(V,E) be a directed graph, where V = 1,2,3,4,5 is the set of vertices and E is the set of directed…
- GATE 2020 CS Q.52 · NAT · 2 marksGraph G is obtained by adding vertex s to K_3,4 and making s adjacent to every vertex of K_3,4.