8,337 views
3 votes
3 votes

In a simple undirected graph with n vertices what is maximum no of edges that you can have keeping the graph disconnected?

A) nC2 -1

B) nC2

C) n-1C2

n-1C2 - 1

Ans is C) ....Please explain how?

1 Answer

Best answer
6 votes
6 votes

Maximum number of edges in a complete graph = nC2

Since we have to find a disconnected graph with maximum number of edges with n vertices. Therefore our disconnected graph will have only two partions because as number of partition increases number of edges will decrease.

Now assume that First partition has x vertices and second partition has (n-x) vertices.

total number of edges = xC2 +(n-x)C2

                                        =1/2*(2x2 -2nx + n2 -n),              where , 1<= x <= n-1

It would be maximum at both extreme(at x=1 or x= n-1).

Therefore, total number of edges = nC2 - (n-1) = n-1C2

selected by

Related questions

0 votes
0 votes
3 answers
1
2 votes
2 votes
1 answer
2
Sanjay Sharma asked Dec 9, 2016
1,002 views
1 votes
1 votes
2 answers
3
Akanksha Kesarwani asked Jan 22, 2016
2,900 views
A simple undirected graph ‘X’ has 10 vertices. If ‘X’ has 5 equally sized connected components, the maximum number of edges in graph ‘X’ is _________.
0 votes
0 votes
1 answer
4
R S BAGDA asked Apr 27, 2022
304 views
What is the number of faces in a connected plane graph having 23 vertices, 30 edges?