Let denote the number of vertices in each of components of the graph.
Then the -th component contains not more than edges. We can add more edges to make a complete subgraph from each of the components. Then each of the components will contain exactly edges.
If , then we can take a vertex from the j-th component, deleting edges, and add this vertex to the i-th component, connecting it with other vertices by edges.
By acting in this way, we can accumulate the maximum number of vertices, , in one component with all possible edges, whereas all other components consist of one vertex without any edges. Then we obtain a graph with k components, having the maximum possible number of edges. This number equals to .
Therefore, for the general simple graph with vertices and components, the total number of edges does not exceed .
Comments