Computer Science I / Graphs and Trees
Practice question · Multiple choice

The handshaking lemma says the degrees of all vertices sum to twice the number of edges. Why must the total be even, and what does that immediately rule out?

Hints
  1. Count an edge from both of its endpoints. How many times is it counted in the degree sum?
  2. If the total is even, what constrains how many odd numbers can be in the sum?
Show the answer

D. Because each edge adds 2 to the sum, so the degree sum is always even.

Why

Each edge has two endpoints and adds 1 to each, contributing exactly 2, so the sum is always even whatever the graph looks like. Odd numbers sum to an even total only in even quantity, so a graph with exactly three odd-degree vertices does not exist. It underlies Euler's theorem: a closed circuit needs every degree even, an open trail exactly two odd, never one.

Read the lesson: Graphs and Trees →

Practise Graphs and Trees

The app has 4 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Graphs and Trees