Sum of degrees of all nodes for a graph G(V, E) can be given by:
2022
Sum of degrees of all nodes for a graph G(V, E) can be given by:
- A.
|E|
- B.
2 × |E|
- C.
2 × |V|
- D.
|V|
Attempted by 430 students.
Show answer & explanation
Correct answer: B
In any undirected graph, each edge connects two vertices and contributes 1 to the degree of each vertex. Therefore, the sum of the degrees of all vertices is equal to twice the number of edges.
This is known as the handshaking lemma: ∑deg(v) = 2 × |E|.
Hence, the sum of degrees of all nodes in a graph G(V, E) is 2 × |E|.
हिन्दी उत्तर: किसी अन्तर्वेशी ग्राफ में, प्रत्येक किनारा दो शीर्षों को जोड़ता है और प्रत्येक शीर्ष की डिग्री में 1 जोड़ता है। इसलिए, सभी शीर्षों की डिग्री का योग किनारों की संख्या का दोगुना होता है।
इसे हैंडशेकिंग लेम्मा कहा जाता है: ∑deg(v) = 2 × |E|।
इसलिए, ग्राफ G(V, E) में सभी नोड्स की डिग्री का योग 2 × |E| होता है।