▓▒░RASTKO'S DIGITAL REALM░▒▓
>
00:00:00

[T] Handshake Lemma (T1.1)

For any graph , the sum of the degrees of its vertices is twice the number of its edges:

where is the degree of vertex : the number of edges incident with , each loop counting as two edges.

The name comes from the picture of people at a party shaking hands: every handshake involves exactly two hands, so the total number of hands shaken is twice the number of handshakes.

Proof

Uses counting in two ways on the incidence matrix of , the matrix where is the number of times (0, 1 or 2) that vertex and edge are incident.

  • Row sums: the row of vertex sums to exactly , so the sum of all entries of is .

  • Column sums: every edge has two ends, so each of the columns sums to , and the sum of all entries of is .

Equating the two:

Example

A graph with vertices and edges, where is a loop at (shown in red):

Its incidence matrix, with the row sums on the right and the column sums along the bottom:

  • Each row sums to the degree of its vertex: .

  • Each column sums to , because every edge has two ends: .

  • The loop: has both ends at , so its whole column sum of sits in one cell (). This is why a loop adds to the degree; otherwise the identity would fail.

[C] Number of odd-degree vertices is even (C1.2)

In any graph, the number of vertices of odd degree is even.

Proof

Consider the handshake identity modulo 2. Each term satisfies

So modulo 2 the left-hand side is congruent to the number of odd-degree vertices, while the right-hand side . Hence the number of odd-degree vertices is , i.e. even.

In the example above, the odd-degree vertices are and (both have degree ). That is of them, an even number.

Consequences

  • The average degree .

  • A -regular graph on vertices has edges, so must be even (e.g. there is no 3-regular graph on an odd number of vertices).