A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Graph Paths, Cycles, and Connectivity

College Depth 74 in the knowledge graph ☐ I know this ☆ Set as goal
409topics build on this
385prerequisites beneath it
See this on the map →
Introduction to Graph TheoryGraph Representation: Matrices and Lists+1 more→→Bipartite Graphs and MatchingsEulerian Circuits and Paths+9 more
paths cycles connectivity connected-components graph-theory

Core Idea

A path is a sequence of distinct vertices where consecutive vertices are connected by edges. A cycle is a closed path where the first and last vertices are the same. A graph is connected if there is a path between every pair of vertices; otherwise it consists of multiple disconnected components. The distinction between walks (vertices may repeat), trails (edges do not repeat), and paths (vertices do not repeat) is essential. Connectivity is the foundational structural property for almost all graph-theoretic results.

How It's Best Learned

Practice finding paths and cycles in small graphs by hand, writing out vertex sequences explicitly. Test connectivity by trying to reach every vertex from a fixed start. Deliberately construct examples that distinguish walks from trails from paths.

Common Misconceptions

Explainer

From your introduction to graphs, you know that a graph is a set of vertices and a set of edges connecting pairs of vertices. Now the natural question is: given two vertices, is there a way to travel from one to the other along edges? And if so, what kind of route is it? These questions lead to the core vocabulary of paths, cycles, and connectivity.

The vocabulary for routes through a graph comes in three levels of precision, and keeping them distinct is essential. A walk is completely permissive: you follow edges in sequence, and you may revisit any vertex or edge as many times as you like. A trail adds one restriction: you may not reuse any edge, though you may revisit vertices. A path is the most restrictive: you may not revisit any vertex, which automatically prevents reusing any edge. In formal notation, a path from u to v is a sequence u = v₀, v₁, ..., vₖ = v where all the vᵢ are distinct and each consecutive pair is connected by an edge.

A graph is connected if a path exists between every pair of vertices. If the graph is not connected, it decomposes into connected components — maximal subgraphs that are internally connected but have no edges between them. Checking connectivity from a given vertex can be done by a depth-first or breadth-first search: start at the vertex, follow edges to unvisited neighbors, repeat. If you reach every vertex, the graph is connected; if some vertices remain unreachable, they form separate components.

A very common misconception is that "no isolated vertices" implies connectivity. It does not. Isolated vertices have degree 0; removing them from the hypothesis still leaves graphs that are disconnected into multiple components, each of which has all its vertices connected to at least one other vertex within the component. Connectivity is a global property of the whole graph, not a local property of each vertex's neighborhood.

Cycles — closed paths where the first and last vertex coincide and all intermediate vertices are distinct — capture the idea of a loop in a graph. Cycles are central to almost every advanced graph theorem you will study next: trees are characterized as connected acyclic graphs, Euler circuits require every vertex to have even degree, and planarity is tied to the structure of cycles through Kuratowski's theorem. Keeping walks, trails, and paths precisely defined now will prevent errors when these theorems state exactly which type of route they are about.

Practice Questions 3 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Proof by Cases → Proving by Cases and Exhaustion → Vacuous Truth and Trivial Cases → Proof by Cases (Proof by Exhaustion) → Mathematical Induction → Graph Paths, Cycles, and Connectivity

Longest path: 75 steps · 385 total prerequisite topics

Prerequisites (3)

Leads To (11)