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 moreBipartite 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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesSet Operations: Union, Intersection, and ComplementProof by CasesProving by Cases and ExhaustionVacuous Truth and Trivial CasesProof by Cases (Proof by Exhaustion)Mathematical InductionGraph Paths, Cycles, and Connectivity

Longest path: 75 steps · 385 total prerequisite topics

Prerequisites (3)

Leads To (11)