Which of the following statements is/are TRUE for an undirected graph?
P: Number of odd degree vertices is even
Q: Sum of degrees of all vertices is even
(A) P Only
(B) Q Only
(C) Both P and Q
(D) Neither P nor Q
Explanation: P is true for undirected graph as adding an edge always increases degree of two vertices by 1.
Q is true: If we consider sum of degrees and subtract all even degrees, we get an even number because every edge increases the sum of degrees by 2. So total number of odd degree vertices must be even.
Quiz of this Question
- Data Structures | Graph | Question 8
- Data Structures | Graph | Question 9
- Data Structures | Graph | Question 5
- Advantages of vector over array in C++
- Data Structures and Algorithms | Set 37
- Data Structures and Algorithms | Set 36
- Data Structures | Heap | Question 12
- Data Structures | Linked List | Question 17
- Data Structures | Balanced Binary Search Trees | Question 13
- Data Structures | Balanced Binary Search Trees | Question 12