Question

Let TT be a tree with 10 vertices. The sum of the degrees of all the vertices in TT is ______.

Official answer and solution
Official answer
18
From
Official GATE 2017 answer key

Solution

Apply the Handshaking Lemma to the number of edges in a tree with 10 vertices.

A tree with nn vertices is a connected acyclic graph and contains exactly n−1n - 1 edges. For n=10n = 10, the number of edges is:

∣E∣=10−1=9|E| = 10 - 1 = 9

According to the Handshaking Lemma, the sum of the degrees of all vertices in any undirected graph is equal to twice the number of edges:

∑v∈Vdeg(v)=2∣E∣=2×9=18\sum_{v \in V} \text{deg}(v) = 2 |E| = 2 \times 9 = 18
Final answer

18.0

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2017 Computer Science and Information Technology (CS) Session 1
Question
20 of 65, printed as CS Q.20
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.