Skip to content
Official PYQ · 2017

GATE CS 2017 Set 1 Q20 — Trees

Explain with AI
Let TT be a tree with 1010 vertices. The sum of the degrees of all the vertices in TT is ________
View worked solution

Answer: 18

According to the fundamental properties of trees and graph theory:

  1. A tree TT with nn vertices always has exactly e=n−1e = n - 1 edges.
  2. By the Handshaking Lemma, the sum of the degrees of all vertices in any graph is equal to twice the number of edges:
    ∑v∈Vdeg(v)=2e\sum_{v \in V} \text{deg}(v) = 2e

Given that the tree TT has n=10n = 10 vertices:

  • Number of edges, e=10−1=9e = 10 - 1 = 9
  • Sum of degrees =2×9=18= 2 \times 9 = 18

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Trees questions