MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
For an undirected graph G with n vertices and e edges, the sum of the degrees of each vertex is
A
ne
B
2n
C
2e
D
e^n
Explanation: 

Detailed explanation-1: -Theorem 3.12: In any graph G with e edges, the sum of the degrees of all the vertices = 2e.

Detailed explanation-2: -It states that the sum of all the degrees in an undirected graph will be 2 times the number of edges. In the example above, the sum of the degrees is 10 and there are 5 total edges.

Detailed explanation-3: -The degree of a vertex in an undirected graph is the number of edges associated with it. If a vertex has a loop, it contributes twice.

Detailed explanation-4: -An undirected graph G with n vertices and edges is represented by adjacency list.

There is 1 question to complete.