MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Given an undirected graph G with V vertices and E edges, the sum of the degrees of all vertices is
A
2E
B
2V
C
E
D
V
Explanation: 

Detailed explanation-1: -Answers. Since the given graph is undirected, every edge contributes as 2 to sum of degrees. So the sum of degrees is 2E.

Detailed explanation-2: -Sum of degree of all the vertices is twice the number of edges contained in it. The following conclusions may be drawn from the Handshaking Theorem. In any graph, The sum of degree of all the vertices is always even.

Detailed explanation-3: -The average degree of an undirected graph is used to measure the number of edges compared to the number of nodes. To do this we simply divide the summation of all nodes’ degree by the total number of nodes. For example in the graph above the nodes have the following degrees: A=2, B=2, C=4, D=2, E=3, F=2, G=2, H=1.

Detailed explanation-4: -The number of edges connected to a single vertex v is the degree of v. Thus, the sum of all the degrees of vertices in the graph equals the total number of incident pairs (v, e) we wanted to count. For the second way of counting the incident pairs, notice that each edge is attached to two vertices.

Detailed explanation-5: -In case of an undirected graph, each edge contributes twice, once for its initial vertex and second for its terminal vertex. So the sum of degrees is equal to twice the number of edges. This fact is stated in the Handshaking Theorem.

There is 1 question to complete.