retagged by
8,746 views
19 votes
19 votes
Consider a simple undirected graph of $10$ vertices. If the graph is disconnected, then the maximum number of edges it can have is _______________ .
retagged by

5 Answers

0 votes
0 votes
For all graph problems the trick which works is scale down the problem.

It's really simple. Just take 5 vertices.

Now try to draw disconnected graphs. It's simple to understand that if we take more than 3 components we can't have max edges possible because the vertices will be spreaded into different components

The possibilities can be

Connected components of 3 vertices & connected components of 2 vertices.

-> with 3 vertices we can have max 3 edges that is a complete graph and with 2 vertices we can have 1 edge. Total 4 edges

Connected components of 4 vertices & connected components of 1 vertices.

-> with 4 vertices a complete graph has max 6 edges and with 1 vertices 0 edge possible. So total 6 edges.

So we got the max when we form 2 connected component with n-1 vertices and last vertex.

And then form a complete graph with n-1 vertices that's the answer.

For 10 vertices do the same now.

Complete graph of 9 vertices gives 36 edges

Last vertex gives 0 edge

So total 36 edges
Answer:

Related questions

14 votes
14 votes
3 answers
5
16 votes
16 votes
4 answers
6