Advanced Mathematics

Graph Theory

The mathematics of networks: points (vertices) joined by lines (edges), and what can be proved about paths, trees and colourings.

Needs a step first: 3

A graph is any set of things with connections between some pairs: cities and roads, people and friendships, web pages and links. Simple counting gives strong results: the degrees add up to twice the number of edges, a tree on nn vertices has n−1n-1 edges, and a walk using every edge once exists only if at most two vertices have odd degree. Graphs lead to shortest-path and search algorithms, to Markov chains as random walks, and to neural networks, which are graphs with weighted edges.

Where it shows up: A neural network is a directed graph with weighted edges, and backpropagation walks it backwards; a Markov chain is a random walk on a graph, and PageRank is its long-run distribution.

How to hold it: In your head

Picture any network as vertices and edges, and use degree counts to decide quickly which paths, trees or tours are possible.

What knowing it looks like

  • Use the handshake lemma to show that no graph has degrees 3,3,3,3,33, 3, 3, 3, 3.
  • Decide whether a graph has an Euler trail or circuit, and explain why from the degrees.
  • Run breadth-first search or Dijkstra's algorithm by hand on a small weighted graph.

Test yourself

A connected simple graph has 7 vertices with degrees 1,2,2,3,3,3,41, 2, 2, 3, 3, 3, 4. How many edges does it have? Is there a walk that uses every edge exactly once?
Show the worked answer
The degrees add to 1+2+2+3+3+3+4=181+2+2+3+3+3+4 = 18, and each edge adds 2 to that total, so there are 99 edges. No such walk exists: four vertices (degrees 1,3,3,31, 3, 3, 3) have odd degree. Every time a walk passes through a vertex it uses two edges there, so only its start and end can have odd degree, which allows at most two odd vertices.

Needs a step first: 3

Learn it with an AI

Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.

Be my maths tutor. I'm learning "Graph Theory" (Undergraduate I tier): The mathematics of networks: points (vertices) joined by lines (edges), and what can be proved about paths, trees and colourings.
I already know: Sets, Functions and Notation, Permutations and Combinations.
Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away.
Finish by testing me with this: A connected simple graph has 7 vertices with degrees $1, 2, 2, 3, 3, 3, 4$. How many edges does it have? Is there a walk that uses every edge exactly once?
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.

Recommended