Resources For Teachers For Tutors For Students & Parents Pricing
Year 11 Maths - Specialist (Unit 1 and Unit 2) Graph theory

Degree and the handshaking lemma

20 practice questions 0 video lessons Theory + worked examples

Master degree and the handshaking lemma in Year 11 VCE Specialist Mathematics. The degree of a vertex counts the edge-ends meeting it (a loop counts twice), and the handshaking lemma states that the degrees sum to twice the number of edges, \(\sum \deg = 2E\). It sits in the Algebra, number and structure area of study of the VCE Mathematics Study Design (VCAA), within the Graph theory topic of Unit 1.

You will learn to read degrees from a diagram, count edges from a degree sequence, find an unknown degree, and explain why the number of odd-degree vertices is always even — a result used throughout graph theory.

Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

The degree of a vertex is the number of edge-ends meeting it, where a loop counts twice. The handshaking lemma says the sum of all vertex degrees equals twice the number of edges, \(\sum \deg = 2E\). In Year 11 Specialist Mathematics you use it to count edges, find an unknown degree, and explain why the number of odd-degree vertices is always even.

A graph is a set of vertices joined by edges. The degree of a vertex, written \(\deg(v)\), is the number of edge-ends that meet it — informally, how many edges “stick out” of that vertex.

Each ordinary edge has two ends, so it adds \(1\) to the degree of each of the two vertices it joins. A loop (an edge from a vertex back to itself) has both ends at the same vertex, so it adds \(2\) to that vertex's degree — a loop counts twice.

Writing every degree from largest to smallest gives the graph's degree sequence, for example \((3,2,2,1)\). A vertex is odd or even according to whether its degree is an odd or even number.

Because every edge contributes \(2\) to the total of all the degrees (one to each end, or both to a looped vertex), the sum of all the degrees is always even and equals twice the number of edges. This is the handshaking lemma, and it is the key tool for this subtopic.

Degrees on a simple graphA four-vertex graph. A is joined to B, C and D, and B and C are joined. The degrees, shown in red, are 3, 2, 2 and 1, adding to 8, which is twice the four edges. A B C D 3 2 2 1
Each red number is a degree — the count of edges at that vertex. Here the degrees are \(3,2,2,1\), and \(3+2+2+1=8=2\times 4\) edges, matching the handshaking lemma.
A loop adds 2 to the degreeA four-vertex graph with a loop at A. A is joined to B, C and D, B and C are joined, and A also has a loop. The loop makes the degree of A equal to 5, and the degrees 5, 2, 2, 1 add to 10, which is twice the five edges. A B C D 5 2 2 1
A loop counts twice: vertex \(A\) has three ordinary edges plus a loop, so \(\deg(A)=3+2=5\). The degrees \(5,2,2,1\) sum to \(10=2\times 5\) edges — the loop is still a single edge.

The handshaking lemma links the degrees to the number of edges \(E\). Since every edge supplies exactly two edge-ends:

\[ \sum_{v} \deg(v) = 2E \]
vdeg(v)=2E

Rearranging gives the number of edges directly from the degree sum:

\[ E = \dfrac{1}{2}\sum_{v} \deg(v) \]
A loop adds \(2\) to the degree of its vertex, but still counts as a single edge. So a loop contributes \(2\) to the degree sum and \(1\) to \(E\) — consistent with \(\sum\deg = 2E\).

Two useful consequences follow. First, the degree sum \(2E\) is always even, so a list of numbers with an odd total can never be a degree sequence. Second, splitting the degrees into even and odd:

\[ \underbrace{2E}_{\text{even}} = \underbrace{(\text{sum of even degrees})}_{\text{even}} + (\text{sum of odd degrees}) \]

forces the sum of the odd degrees to be even, which is only possible when there is an even number of odd-degree vertices.

For special graphs the degree sum is quick to write down. In the complete graph \(K_n\) every vertex has degree \(n-1\); in an \(r\)-regular graph every one of the \(n\) vertices has degree \(r\):

\[ E(K_n) = \dfrac{n(n-1)}{2}, \qquad E(\text{regular}) = \dfrac{n\,r}{2} \]

Finding a degree, or using the handshaking lemma

  1. Read a degree off a diagram: count the edge-ends at the vertex, adding \(2\) for each loop and \(1\) for every ordinary edge.
  2. Form the degree sum: add the degrees of all the vertices — this total is \(\sum\deg\).
  3. Count edges: the handshaking lemma gives \(E = \tfrac{1}{2}\sum\deg\). If the sum is odd, no such graph exists.
  4. Find an unknown degree: if the number of edges is known, use \(\sum\deg = 2E\) and subtract the known degrees, \(d = 2E - (\text{known degrees})\).
  5. Check feasibility: a degree sequence is possible only if its sum is even; the number of odd entries must be even.

For a graph with degree sequence \((4,3,3,2,2)\), the sum is \(14\), so \(E = 14/2 = 7\) edges.

Example 1 — Degree of a vertex
For the graph shown, find the degree of vertex \(A\).
Solution

Count the edges meeting \(A\):

\(\text{edges at } A\)\(=\)\(AB,\ AC,\ AD\)
\(\deg(A)\)\(=\)\(3\)

The degree of \(A\) is \(\deg(A)=3\).

Degrees of the four verticesA is joined to B, C and D and has degree 3; B and C are joined; the degrees are 3, 2, 2 and 1. A B C D 3 2 2 1
Example 2 — A loop counts twice
In the graph shown, vertex \(P\) has a loop. Find the degree of \(P\).
Solution

Separate the ordinary edges from the loop:

\(\text{ordinary edges at } P\)\(=\)\(PQ,\ PR \ \Rightarrow\ 2\)
\(\text{loop at } P\)\(=\)\(\text{adds } 2\)
\(\deg(P)\)\(=\)\(2 + 2\)
\(=\)\(4\)

A loop adds \(2\), so \(\deg(P)=4\).

Degree of a looped vertexA triangle P, Q, R with a loop at P. The loop makes the degree of P equal to 4, while Q and R each have degree 2. P Q R 4 2 2
Example 3 — Count edges from the degrees
A graph has degree sequence \((4,3,3,2,2)\). How many edges does it have?
Solution

Add the degrees to get the degree sum:

\(\sum \deg\)\(=\)\(4+3+3+2+2\)
\(=\)\(14\)

Halve it, using \(E = \tfrac{1}{2}\sum\deg\):

\(E\)\(=\)\(\dfrac{14}{2}\)
\(=\)\(7\)

The graph has \(7\) edges.

Example 4 — Find an unknown degree
A graph has five vertices with degrees \(4,3,3,2\) and one unknown degree \(d\). The graph has \(8\) edges. Find \(d\).
Solution

The degree sum is \(2E\):

\(\sum \deg\)\(=\)\(2 \times 8\)
\(=\)\(16\)

Subtract the four known degrees:

\(d\)\(=\)\(16 - (4+3+3+2)\)
\(=\)\(16 - 12\)
\(=\)\(4\)

The unknown degree is \(d=4\).

Example 5 — Which sequence is impossible?
Explain why \((3,3,2,2,1)\) cannot be the degree sequence of any graph, while \((3,2,2,2,1)\) can.
Solution

The degree sum must equal \(2E\), so it must be even. Test each total:

\(3+3+2+2+1\)\(=\)\(11 \ (\text{odd})\)
\(3+2+2+2+1\)\(=\)\(10 \ (\text{even})\)

An odd total can never equal \(2E\), so the first sequence is impossible. The second has an even sum, giving \(E = 10/2 = 5\) edges, and its two odd entries \((3,1)\) form an even count of odd-degree vertices, as required.

\((3,3,2,2,1)\) has an odd sum, so it is impossible; \((3,2,2,2,1)\) is possible with \(5\) edges.

Example 6 — Degree sum, edges and odd vertices
The graph shown is a \(5\)-cycle \(A,B,C,D,E\) with one extra edge joining \(A\) and \(C\). Find the sum of the degrees, the number of edges, and how many vertices have odd degree.
Solution

Read the degrees, then add them:

\(\deg(A)=3,\ \deg(C)\)\(=\)\(3\)
\(\deg(B)=\deg(D)=\deg(E)\)\(=\)\(2\)
\(\sum \deg\)\(=\)\(3+3+2+2+2\)
\(=\)\(12\)

Apply the handshaking lemma \(\sum\deg = 2E\):

\(2E\)\(=\)\(12\)
\(E\)\(=\)\(6\)

Only \(A\) and \(C\) have odd degree \((3)\), so there are \(2\) odd-degree vertices — an even number, exactly as the handshaking lemma guarantees.

\(\sum\deg = 12\), \(E = 6\) edges, and \(2\) vertices have odd degree.

Degree sum on a five-vertex graphA 5-cycle A, B, C, D, E with an extra edge joining A and C. The degrees are 3, 3, 2, 2, 2, adding to 12, which is twice the six edges. A B C D E 3 2 3 2 2

Common pitfalls

Counting a loop only once. A loop has both ends at the same vertex, so it adds \(2\) to that vertex's degree, not \(1\). It is still a single edge for the edge count.
Confusing the degree sum with the number of edges. The handshaking lemma is \(\sum\deg = 2E\). To get the edges you must halve the degree sum: \(E = \tfrac{1}{2}\sum\deg\), not equal it.
Accepting an odd degree sum. Every graph has an even degree sum. A list of degrees with an odd total (such as \(3+3+2+2+1=11\)) can never be a degree sequence.
Forgetting the odd-vertex rule. The number of vertices with odd degree is always even. If your working gives an odd number of odd-degree vertices, a degree has been miscounted.

Frequently asked questions

What is the degree of a vertex?

It is the number of edge-ends meeting the vertex — each ordinary edge adds \(1\), and a loop adds \(2\) because both of its ends are at that vertex.

What is the handshaking lemma?

It states that the sum of all the vertex degrees equals twice the number of edges, \(\sum\deg = 2E\). Every edge has two ends, so it contributes \(2\) to the total of the degrees.

How do I find the number of edges from the degrees?

Add up all the degrees to get \(\sum\deg\), then halve it: \(E = \tfrac{1}{2}\sum\deg\). For degree sequence \((4,3,3,2,2)\) the sum is \(14\), so \(E = 7\).

How does a loop affect the degree?

A loop adds \(2\) to the degree of its vertex, since both of its ends are attached there. It counts as one edge, so it adds \(2\) to the degree sum and \(1\) to the edge count.

Why is the number of odd-degree vertices always even?

The degree sum \(2E\) is even. The even-degree vertices contribute an even amount, so the odd-degree vertices must also contribute an even amount — which is only possible if there is an even number of them.

How do I find an unknown degree in a graph?

Use \(\sum\deg = 2E\). If the number of edges is known, the missing degree is \(d = 2E - (\text{sum of the known degrees})\). For example, with \(8\) edges and known degrees \(4,3,3,2\), \(d = 16 - 12 = 4\).