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 vertices has 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 .
- 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 . How many edges does it have? Is there a walk that uses every edge exactly once?
Show the worked answer
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.
Needs first
- Sets, Functions and NotationSets, the symbols for combining them, and functions as rules sending each element of one set to exactly one element of another.Bridge · Proof & Discrete Maths
- Permutations and CombinationsCounting arrangements and selections without listing them: factorials, permutations, combinations and the binomial theorem.Bridge · Proof & Discrete Maths
Leads to
This is the end of a path.
Recommended
- Book of ProofRichard Hammack · BookA free textbook that teaches how to read and write proofs, from logic and sets through induction and contradiction, with many exercises and solutions.
- MIT 6.1200J Mathematics for Computer ScienceMIT OpenCourseWare · CourseMIT's 2024 course on proofs, number theory, graphs, counting and discrete probability, with lecture videos, notes and problem sets.
- Linear Algebra Done RightSheldon Axler · BookThe standard proof-based second course in linear algebra, built on linear maps rather than determinants; the 4th edition is free to read, also in Chinese.