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 4-regular graph has 7 vertices (every vertex has degree 4). How many edges |E| does it have?

n = 7k = 4
|E| =
2.Easy
AABBCCDDEE0100010101010010000101110

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

deg(C) =
3.Medium
ABCDEFGEuler circuitEuler path, no circuitneither

Does the connected graph have an Euler circuit, an Euler path that is not a circuit, or neither? Click your answer.

|V| = 7|E| = 7
  1. 1Euler circuit
  2. 2Euler path, no circuit
  3. 3neither
4.Medium

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

3 × deg 32 × deg 4
L =
5.Hard
815921317191816ABCDEFG

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

start: Gk = 2
  1. 1edge AB
  2. 2edge AC
  3. 3edge BC
  4. 4edge CE
  5. 5edge DF
  6. 6edge EF
  7. 7edge GB
  8. 8edge GC
  9. 9edge GD
6.Hard
11812113444938ABCDEFG

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) =

Answer key

  1. 1. |E| = 14
  2. 2. deg(C) = 2
  3. 3. neither
  4. 4. L = 9
  5. 5. edge DF
  6. 6. d(F) = 15

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