Graph theory worksheet with answers

Free printable Graph theory worksheet: 6 problems from easy to exam level, with an answer key. Print it or save it as a PDF.

For teachers: free to print, copy and use in class. Every new worksheet has new values and its own answer key. A link to ExamProblems on your course page is appreciated.

Name: ____________________   Date: ____________

1.Easy

A simple graph has 6 vertices with degrees 3, 3, 2, 2, 1, 1. How many edges |E| does it have?

deg: 3, 3, 2, 2, 1, 1
|E| =
2.Easy
AABBCCDDEEFF011000101110110010010011011101000110

The adjacency matrix of a simple undirected graph is shown. Find the degree deg(D) of vertex D.

deg(D) =
3.Medium

A connected graph has 13 vertices and 20 edges. How many edges k must be removed to leave a spanning tree?

|V| = 13|E| = 20
k =
4.Medium

A tree has 3 vertices of degree 3, 2 vertices of degree 2, and all its other vertices are leaves (degree 1). How many leaves L does it have?

3 × deg 32 × deg 2
L =
5.Hard
51113512122ABCDEF

Dijkstra’s algorithm runs from A. Click the vertex that is settled (made permanent) in round 5; A itself is round 1.

start: Around 5
  1. 1A
  2. 2B
  3. 3C
  4. 4D
  5. 5E
  6. 6F
6.Hard
171211341419ABCDE

Prim’s algorithm builds a minimum spanning tree starting from vertex B. Click the edge it adds as edge number 4.

start: Bk = 4
  1. 1edge AB
  2. 2edge AC
  3. 3edge BC
  4. 4edge BD
  5. 5edge CE
  6. 6edge DE
  7. 7edge BE

Answer key

  1. 1. |E| = 6
  2. 2. deg(D) = 3
  3. 3. k = 8
  4. 4. L = 5
  5. 5. F
  6. 6. edge AC

Full step-by-step solutions: practise this topic on examproblems.com.