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 tree has 39 vertices. How many edges |E| does it have?

|V| = 39
|E| =
2.Easy

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

deg: 3, 3, 3, 2, 2, 1
|E| =
3.Medium

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

|V| = 6|E| = 8
k =
4.Medium

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

|V| = 6|E| = 14
k =
5.Hard
1413151521351410ABCDEF

Use Dijkstra’s algorithm to find the length d(F) of the shortest path from A to F in the weighted graph.

start: Aend: F
d(F) =
6.Hard
418141016986ABCDEF

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

start: Fk = 5
  1. 1edge AB
  2. 2edge BC
  3. 3edge BD
  4. 4edge CE
  5. 5edge DE
  6. 6edge DF
  7. 7edge EF
  8. 8edge BE

Answer key

  1. 1. |E| = 38
  2. 2. |E| = 7
  3. 3. k = 3
  4. 4. k = 9
  5. 5. d(F) = 29
  6. 6. edge CE

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