Given an undirected graph G with V vertices and E edges, the sum of the degrees of all vertices is
1.E
2.2*E
3.V
4.2*V*E
In an undirected graph, each edge connects two vertices. Since each edge contributes 1 to the degree of each of the two vertices it connects, the total sum of the degrees of all vertices is twice the number of edges.
Degree of a vertex: The degree of a vertex is the number of edges incident to that vertex.
Sum of degrees of all vertices: Each edge in an undirected graph is counted twice—once for each of its two endpoints.
Hence, the sum of the degrees of all vertices in the graph is 2 times the number of edges (since each edge contributes 2 to the total degree count).
Therefore, the sum of the degrees of all vertices in the graph is 2 * E.
The correct answer is 2. 2 * E.
Answered By