Papers
Topics
Authors
Recent
Search
2000 character limit reached

Shortest-Walk Problem (SWP) Overview

Updated 6 July 2026
  • SWP is defined as minimizing a sequence of traversals under various constraints, extending classic shortest-path concepts to dynamic and structured settings.
  • Different formulations target objectives like reducing edge count, transmission time, or convex cost accumulations, with applications in waypoint routing, circuit walks, and label-constrained databases.
  • Algorithmic approaches, from spectral descent to quantum and ant-inspired dynamics, reveal both efficiently solvable cases and NP-hard challenges in SWP variants.

In the cited literature, the Shortest-Walk Problem (SWP) denotes a family of optimization problems whose common core is the minimization of a walk rather than merely an unconstrained static path. Depending on the ambient structure, the walk may lie on the $1$-skeleton of a polytope, in a temporal graph, in a graph of convex sets, or in a graph database subject to regular-language constraints. The objective may be the number of traversed edges, the total transmission time, or the cumulative value of coupled convex programs, and repeated vertices or edges may be either allowed or essential (Cardinal et al., 2023, Morozov et al., 15 Jul 2025, Himmel et al., 2019). In undirected graphs with nonnegative weights, an optimal walk can be taken to be simple, so SWP collapses to the classical shortest-path problem; many of the deepest results therefore arise in models where time dependence, reconfiguration, coverage, or non-additive costs make the walk formulation strictly richer (Wesołowski et al., 2024).

1. Formal definitions and model variants

One general graph-theoretic formalization defines a walk as a finite nonempty alternating sequence w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k with src(ei)=vi\mathrm{src}(e_i) = v_i and tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}; its length is kk (David et al., 2023). In ordinary undirected graphs with nonnegative edge weights, repeated vertices or edges cannot improve the objective, so shortest walks and shortest simple paths coincide (Wesołowski et al., 2024). Outside that regime, the admissible walk and its cost are model dependent.

Setting Feasible object Objective
Polytope skeleton Path on the $1$-skeleton between two vertices Minimize number of edges (Cardinal et al., 2023)
Graph of Convex Sets Walk with per-visit variables and convex edge couplings Minimize cumulative convex cost (Morozov et al., 15 Jul 2025)
Temporal graph Strict temporal walk with waiting constraints Minimize a chosen linear criterion, including λi\sum \lambda_i (Himmel et al., 2019)
RPQ graph database Walk whose label sequence matches an NFA or regular expression Enumerate all distinct minimum-length walks (David et al., 2023)
Temporal exploration Strict walk visiting all vertices within lifetime LL Minimize traversed edges (Balev et al., 9 Apr 2025)

Other formulations alter feasibility rather than the ambient space. Waypoint routing asks for a capacitated walk from ss to tt that visits a prescribed set of waypoints (Amiri et al., 2017). Circuit-walk variants replace edges of a polyhedron by circuits and optimize either the number of maximal circuit steps or their total w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k0-norm length (Borgwardt et al., 2024). Two-player span models seek shortest optimal pairs of walks that maintain a prescribed minimum separation while jointly covering a graph (Dravec et al., 2024). In phylogenetics, the relevant walk is a nearest-neighbor-interchange walk that visits an entire subtree-prune-and-regraft neighborhood (Caceres et al., 2011).

2. Polyhedral, circuit, and reconfiguration formulations

A central polyhedral version of SWP asks: given a polytope w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k1 described by linear inequalities and two vertices w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k2, find a shortest path from w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k3 to w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k4 on the skeleton of w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k5, where length is the number of traversed edges (Cardinal et al., 2023). The most studied class in this context is that of generalized permutohedra, equivalently polymatroid base polytopes, characterized by the property that every edge is parallel to a vector of the form w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k6. Equivalently, there exists a submodular function w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k7 such that

w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k8

This framework captures several classical flip or exchange distances. For matroid bases, vertices correspond to bases and the shortest-path length equals w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k9. For graphical zonotopes, vertices correspond to acyclic orientations and the distance equals the number of differently oriented edges. For Loday’s associahedron, shortest paths coincide with triangulation flip distance, equivalently binary-search-tree rotation distance. For graph associahedra, shortest paths become flip distances between elimination trees. Hypergraphic polytopes generalize these constructions further, with vertices corresponding to acyclic orientations of a hypergraph and adjacency given by pair-flips (Cardinal et al., 2023).

Circuit-walk formulations replace edge directions by circuits of a polyhedron src(ei)=vi\mathrm{src}(e_i) = v_i0. A circuit is a nonzero vector in src(ei)=vi\mathrm{src}(e_i) = v_i1 whose image under src(ei)=vi\mathrm{src}(e_i) = v_i2 is support-minimal; a circuit walk from src(ei)=vi\mathrm{src}(e_i) = v_i3 to src(ei)=vi\mathrm{src}(e_i) = v_i4 is a sequence of maximal feasible steps along circuits. Here “short” has two distinct meanings: few steps, or small total length src(ei)=vi\mathrm{src}(e_i) = v_i5. Sign-compatible variants require the circuit directions to form a conformal sum of src(ei)=vi\mathrm{src}(e_i) = v_i6 with respect to src(ei)=vi\mathrm{src}(e_i) = v_i7, and “facet-picking” variants ask whether a first step can pick up a correct facet of a target vertex. These notions generalize non-revisiting edge walks and are tied to circuit diameter and augmentation theory (Borgwardt et al., 2024).

Both families connect SWP to reconfiguration. In generalized permutohedra, shortest skeleton paths become flip sequences on combinatorial objects. In circuit geometry, shortest walks become minimal augmentations in a direction space strictly larger than the edge graph. This is one reason SWP sits simultaneously in combinatorial optimization, geometric reconfiguration, and linear-programming theory.

3. Graph, routing, label-constrained, and covering walks

Waypoint routing is a direct graph-theoretic SWP variant. The input is an undirected, connected, capacitated, weighted graph src(ei)=vi\mathrm{src}(e_i) = v_i8, a source src(ei)=vi\mathrm{src}(e_i) = v_i9, a destination tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}0, and a waypoint set tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}1. The task is to find a walk from tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}2 to tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}3 that visits all waypoints, respects edge capacities, and minimizes total length tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}4, where tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}5 is the number of traversals of tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}6. The problem admits an exact algorithm in time tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}7 on graphs of treewidth tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}8, and a randomized polynomial-time algorithm tgt(ei)=vi+1\mathrm{tgt}(e_i) = v_{i+1}9 when the number of waypoints is kk0. It is NP-hard on maximum-degree-kk1 families where Hamiltonian Cycle is NP-hard, including grid graphs of maximum degree kk2 and kk3-regular bipartite planar graphs, and remains NP-hard already for kk4 for every fixed kk5 (Amiri et al., 2017).

In graph databases, SWP appears as the Distinct Shortest Walks problem for regular path queries. The input consists of a multi-labeled directed graph database kk6, vertices kk7, and an NFA kk8. One seeks to enumerate all distinct walks of minimum length kk9 from $1$0 to $1$1 whose label set intersects the language of $1$2. The algorithmic challenge is that one walk may induce exponentially many accepted runs because edges may carry multiple labels. An annotation-and-trim procedure yields preprocessing $1$3 and delay $1$4, and $1$5-transitions or regular expressions can be handled at no additional asymptotic cost (David et al., 2023).

Another non-additive variant is the edge information reuse shortest path problem. Here a DAG $1$6 is equipped with a label map $1$7 satisfying $1$8, and the cost of a simple $1$9-λi\sum \lambda_i0 path is the sum of weights of distinct labels used along the path, each counted once. Although the underlying graph is acyclic, the non-additive objective makes the problem NP-complete by reduction from 3SAT. This provides an SWP model in which the main difficulty lies not in cycles or time dependence, but in set-valued cost accumulation (Träff, 2015).

There are also covering and inference variants. In phylogenetics, one considers the graph λi\sum \lambda_i1 whose vertices are the trees in the one-step SPR neighborhood of an unrooted binary phylogenetic tree λi\sum \lambda_i2, with edges given by single NNI moves. The shortest covering walk that visits the entire neighborhood has length λi\sum \lambda_i3, where λi\sum \lambda_i4; the additive λi\sum \lambda_i5 overhead rules out Hamiltonian coverage in general (Caceres et al., 2011). In degree-λi\sum \lambda_i6 inference problems, the input is a label sequence produced by a walk on an unknown path or cycle graph; repeated contraction of λi\sum \lambda_i7 yields the unique λi\sum \lambda_i8-normal form, which is exactly the shortest consistent path in the minimum inferred graph. That normal form can be computed online in λi\sum \lambda_i9 time using a Manacher-style palindrome mechanism (Narisada et al., 2018). Finally, span-constrained models encode two simultaneous walkers by a product graph and then seek the minimum number of moves required for both projections to cover all vertices while maintaining distance at least the graph’s span; the paper gives polynomial-time span computation followed by exponential search for the shortest optimal walk in the filtered product graph (Dravec et al., 2024).

4. Temporal, exploration, and mixed discrete–continuous walks

Temporal SWP replaces a static graph by a time-indexed edge process. In one general model, a temporal graph is a five-tuple LL0, where a time-arc LL1 departs at time LL2, arrives at LL3, and every intermediate waiting time must satisfy

LL4

The framework supports foremost, reverse-foremost, fastest, shortest, cheapest, minimum hop-count, minimum total waiting time, and any nonnegative linear combination of these criteria. “Shortest” in this setting means minimizing LL5. A transformation removes transmission times and minimum waiting constraints by expanding the graph, after which a single-source algorithm based on time-layered modified Dijkstra and reset arcs computes optimal walks in LL6 time (Himmel et al., 2019).

A different temporal variant is the Shortest Temporal Exploration Problem (STEXP). Given an undirected temporal graph LL7 that is connected at each time step, a start vertex, and the full evolution offline, the task is to find a strict temporal walk that visits all vertices, uses at most one edge per time step, finishes by time LL8, and traverses as few edges as possible. Every constantly connected temporal graph with LL9 vertices admits an exploration using ss0 traversals within ss1 time steps. If every snapshot has diameter at most ss2, then there exists an exploration using ss3 edges and ss4 time steps. For temporal cycles with ss5, the worst-case number of traversals is exactly ss6 when ss7, and exactly ss8 when ss9 (Balev et al., 9 Apr 2025).

Graphs of Convex Sets (GCS) provide a mixed discrete–continuous SWP. A GCS is a directed graph in which each vertex carries a convex program tt0 and each edge tt1 carries convex coupling constraints tt2 and a convex edge cost tt3. A walk tt4 may revisit vertices, but each visit has its own decision variable, and the cost is

tt5

The Bellman equation holds for the optimal cost-to-go tt6, and lower bounds tt7 can be synthesized by solving an infinite-dimensional Bellman-inequality LP approximately with piecewise-quadratic functions and semidefinite programming. These bounds guide an incremental lookahead search with backtracking, post-processing, cycle shortcutting, and an a posteriori suboptimality certificate tt8. The problem is NP-hard even on acyclic graphs, but each local subproblem is convex, and the method supports collision-free motion planning, skill chaining, and hybrid-system control (Morozov et al., 15 Jul 2025).

5. Algorithmic paradigms

One influential paradigm is spectral descent. For a fixed target tt9 in a finite, simple, connected, undirected graph, one defines

w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k00

equivalently the smallest eigenvector of the Laplacian minor w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k01. Starting from w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k02, one repeatedly moves to a neighbor minimizing w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k03. The walk strictly decreases w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k04, terminates at w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k05 in at most w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k06 steps, is simple, and on trees equals the unique shortest path. On general graphs the method is often exact but not universally so; the paper reports exact recovery of all pairwise shortest paths on several symmetric graphs and near-optimal behavior on random geometric graphs (Steinerberger, 2020).

A related but more metric-oriented line defines walk distances from the resolvent

w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k07

where w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k08 is the weighted adjacency matrix. After an elementwise logarithm and a centering transform, one obtains a graph-geodetic metric that converges to the shortest-path distance as the parameter approaches the appropriate limit and to the long-walk distance at the opposite end. The long-walk distance equals resistance distance in a transformed graph, and logarithmic forest distances form a subclass of these walk distances on balance-graphs (Chebotarev, 2011). This is not an SWP solver in the algorithmic sense, but it supplies a continuous family interpolating between shortest-path and global connectivity behavior.

Quantum algorithms offer another regime. In the adjacency-list model, and under structural conditions ensuring that the shortest w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k09-w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k10 path is uniquely optimal in an effective-resistance sense, one approach samples a quantum flow state to sparsify the graph and then runs a classical shortest-path routine, with query complexity w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k11 and w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k12 space. A divide-and-conquer alternative uses resistance tests and flow-state sampling to reconstruct the path in w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k13 steps with w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k14 space, or in parallel depth w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k15 with w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k16 space. In undirected graphs with nonnegative weights, the paper explicitly interprets SWP as equivalent to shortest path, so these bounds apply directly to shortest walks in that setting (Wesołowski et al., 2024).

At the opposite end of the algorithmic spectrum, distributed ant-inspired dynamics solve variants of SWP with only local information. Each edge carries pheromone w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k17, ants split proportionally to pheromone, and the update is

w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k18

With constant bidirectional flow and vertex leakage, the dynamics converges to a path of minimum leakage and therefore to the path with the minimum number of vertices under uniform leakage. With zero leakage and increasing flow, it converges to the shortest path. The analysis is proved for two parallel paths, while simulations support the same behavior on random and grid-like graphs. The paper also shows that bidirectional flow and the proportional decision rule are necessary for guaranteed convergence to the shortest path (Garg et al., 2020).

6. Complexity landscape, implications, and open directions

Across formulations, SWP is algorithmically easy only in special structures. For ordinary unweighted graphs it is solved exactly by breadth-first search in w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k19 (Steinerberger, 2020). For RPQ-constrained minimum-length walks, polynomial preprocessing and delay are available (David et al., 2023). For bounded-treewidth waypoint routing there is an exact w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k20 algorithm, and for linear hypergraphs the flip distance between acyclic orientations is computable exactly in polynomial time because the maximum codegree w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k21 is w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k22 (Amiri et al., 2017, Cardinal et al., 2023). In temporal graphs with waiting-time constraints, single-source optimal walks are computable in w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k23 (Himmel et al., 2019). These positive results are structurally narrow.

The hardness results are correspondingly broad. Shortest paths on generalized permutohedra are strongly NP-hard even when the polytope is the intersection of an axis-aligned box with a single hyperplane, hence described by only w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k24 inequalities (Cardinal et al., 2023). Hypergraphic flip distance is APX-hard even when every hyperedge has size at most w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k25 and the hypergraph has bounded maximum degree, and in the oracle model there exists w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k26 such that no w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k27-approximation exists unless w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k28 (Cardinal et al., 2023). On w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k29-network-flow polytopes, deciding whether the circuit distance is at most w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k30, whether a shortest sign-compatible decomposition has at most w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k31 circuits, or whether the minimum total w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k32-norm length of a circuit walk is below a threshold is NP-complete (Borgwardt et al., 2024). Edge-information reuse is NP-complete even on DAGs with weights in w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k33 (Träff, 2015). Waypoint routing is NP-hard already on degree-w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k34 graph classes, and GCS shortest walks are NP-hard even on acyclic graphs (Amiri et al., 2017, Morozov et al., 15 Jul 2025).

These barriers have conceptual consequences. The polymatroid hardness results imply that, unless w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k35, there is no computationally efficient simplex pivoting rule that always reaches an optimum in the minimum number of nondegenerate pivots even when the feasible region is a polymatroid base polytope (Cardinal et al., 2023). Circuit-walk hardness similarly shows that replacing edges by circuits does not remove the essential combinatorial difficulty of constructing globally short augmentations (Borgwardt et al., 2024). Temporal exploration demonstrates that the static intuition “a spanning tree costs w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k36 edges” fails sharply once time-respecting feasibility is imposed (Balev et al., 9 Apr 2025).

Several open problems remain explicit in the cited work. Rotation distance for convex polygons, hence exact shortest paths on the associahedron, remains open, and the flip distance for rectangulations is also open (Cardinal et al., 2023). For spectral descent, characterizing graph classes beyond trees for which greedy w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k37-descent is always exact is open, as are average-case bounds and the role of planar structure (Steinerberger, 2020). In the circuit setting, whether computing circuit diameter is NP-hard is open, and for conformal sums the cases w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k38 remain unresolved (Borgwardt et al., 2024). For ant-inspired dynamics, general-graph convergence proofs remain conjectural (Garg et al., 2020). For temporal exploration, the paper conjectures that constantly connected temporal graphs admit w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k39-time, w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k40-move exploration schedules, improving on the current w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k41-time, w=v0,e0,v1,,ek1,vkw = v_0, e_0, v_1, \dots, e_{k-1}, v_k42-move general bound (Balev et al., 9 Apr 2025).

Taken together, these results present SWP not as a single problem with a single canonical definition, but as a recurring optimization pattern across discrete geometry, graph algorithms, temporal networks, database querying, planning, and reconfiguration. What remains invariant is the central question: when feasibility is encoded by a walk rather than a static path, which structural assumptions make the optimum accessible, and which turn it into a source of hardness?

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Shortest-Walk Problem (SWP).