Skip to content
Official PYQ · 2022

GATE CS 2022 Q20 — Graphs: Connectivity, Matching, Colouring

Explain with AI
Consider a simple undirected graph of 1010 vertices. If the graph is disconnected, then the maximum number of edges it can have is _______________ .
View worked solution

Answer: 36

To find the maximum number of edges in a disconnected simple undirected graph with n=10n = 10 vertices, we need to partition the vertices into at least two disconnected components such that the sum of the edges in these components is maximized.

Let the graph be partitioned into two components with n1n_1 and n2n_2 vertices, where n1+n2=10n_1 + n_2 = 10 and n1,n2≥1n_1, n_2 \ge 1. To maximize the edges, each component itself must be a complete graph (clique).

The total number of edges EE is given by:

E=(n12)+(n22)E = \binom{n_1}{2} + \binom{n_2}{2}

To maximize this quadratic sum, the sizes of the components should be as unbalanced as possible. Thus, we choose:

  • n1=9n_1 = 9 (a complete graph K9K_9)
  • n2=1n_2 = 1 (an isolated vertex)

Calculating the maximum number of edges:

Emax=(92)+(12)=9×82+0=36E_{\text{max}} = \binom{9}{2} + \binom{1}{2} = \frac{9 \times 8}{2} + 0 = 36

Any other partition (for example, n1=8n_1 = 8 and n2=2n_2 = 2) yields fewer edges:

(82)+(22)=28+1=29<36\binom{8}{2} + \binom{2}{2} = 28 + 1 = 29 < 36

Therefore, the maximum number of edges the disconnected graph can have is 36.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Graphs: Connectivity, Matching, Colouring questions