Closed walk Created 2026-10-06 Updated 2026-10-14
A closed walk is a walk with equal endpoint vertices, . Under our convention this includes the zero-length walk ; returning after traversing at least one edge requires . Closure imposes no other restriction on repeated vertices or edges. In a directed graph, a closed directed walk must also follow every directed edge in its permitted direction.[ref]
Figure 1.
Returning to : backtracking closed walk, closed trail with a repeated internal vertex, and graph cycle
. Details.
In the shared simple graph, is a length-two closed walk that immediately backtracks along . It is not a trail, since is used twice, and it is not a graph cycle. The length-six closed walk is a trail, since its six edges are distinct, but is not a graph cycle: it returns to midway through the journey. The length-three closed walk is a graph cycle, with all vertices distinct apart from the required endpoint repetition. In a simple graph that is an undirected graph, a graph cycle has length at least three; the two-step backtrack is excluded.[ref]
A positive-length closed walk therefore need not reveal a graph cycle: even a tree permits an out-and-back journey on an edge. A positive-length closed trail in a simple graph does contain a graph cycle. For a proof outline, choose a shortest positive-length consecutive portion of the trail whose endpoint vertices coincide. It cannot repeat an internal vertex, since that would give a shorter such portion; it cannot have length one or two because self-loops and repeated edges are excluded. It is consequently a graph cycle. Cutting it out leaves another closed trail, possibly of length zero, so repetition partitions the original edges into graph cycles. In our six-step example these are the two triangles in a graph. A closed trail using every edge would be an Euler circuit; here is omitted.
Counting return journeys makes closed walks useful even when they repeat edges. For a finite simple graph with adjacency matrix , the walk count from powers of an adjacency matrix gives length- walks from to , for every nonnegative integer . A proof outline is that matrix multiplication appends one allowed step, summing over the previous endpoint; is the identity matrix, recording the unique zero-length walk at each vertex. Consequently
The trace counts closed walks with a specified starting vertex and traversal order, not distinct graph cycles. These formulas use adjacency entries, not arbitrary travel costs in a weighted graph.[ref]
In our example, : the five length-two closed walks are , , , , and . Also , going round either triangle in a graph in either direction, and : each of the two triangles in a graph supplies three choices of starting vertex and two directions. These exact counts for the constructed graph illustrate why return counts and graph cycle counts differ.
A closed walk naturally models a delivery or inspection journey that returns to its depot. Repeated vertices let it combine several excursions; repeated edges let it serve a dead end and return. For an Euclidean travelling salesman tour, one can first construct a closed walk visiting all locations and then use the triangle inequality to shortcut repeated visits without increasing total length. That argument assumes direct travel between the retained locations is permitted, as in a complete graph weighted by Euclidean distance; an arbitrary road network need not contain those shortcut edges.
Linear independence of adjacency powers up to the diameter Created 2026-09-24 Updated 2026-09-24
If a connected graph has adjacency matrix and diameter , then
are linearly independent. For the largest index with a nonzero coefficient, choose vertices at distance ; the corresponding entries of all lower powers vanish, while by the walk count from powers of an adjacency matrix.
Take the initial removed set to be empty, as required by the displayed equality in this discrete SIR epidemic on a graph. If initially removed individuals are allowed, add their indicators to the final-removal count; an isolated initially removed vertex already shows why this correction is necessary. Condition on a fixed initial infection vector.
Given the history through time , the union bound over currently infected neighbours gives
Write . Taking expectations and iterating this componentwise inequality for the nonnegative adjacency matrix of a graph gives .
A vertex is infected at most once, and an infection lasts exactly one step before permanent removal. Hence under the stated initial convention. The Tonelli theorem now gives
The walk count from powers of an adjacency matrix explains the terms: all possible transmission walks are counted, including walks that overcount because removal prevents reinfection. This is the adjacency-matrix bound for a discrete SIR epidemic.
Suppose the strongly regular graph has vertices, degree , common neighbours for every adjacent pair and common neighbours for every nonadjacent pair. By the walk count from powers of an adjacency matrix, counts common neighbours of and , while . Hence the adjacency-matrix relation for a strongly regular graph is
where is the all-ones matrix.
The spectral theorem for real symmetric matrices gives an orthonormal eigenbasis for . Part (a) says that the constant direction is the one-dimensional -eigenspace; every other eigenvector belongs to , so . If , the displayed identity gives
There are at most two possible roots in addition to . Thus has at most three distinct eigenvalues.
Let and suppose
If some coefficient is nonzero, let be the largest index with . Choose a path
whose endpoints realize the graph diameter. Every initial segment is a shortest path, since a shorter route from to could be followed by the remaining segment to shorten the path from to . Thus
By the walk count from powers of an adjacency matrix,
Taking the entry of the assumed relation and using maximality of gives
a contradiction. Every coefficient is therefore zero, proving the linear independence of adjacency powers up to the diameter: