Manuscript Offprint
arXiv:2609.05590Size-Sensitive Padded Decompositions for Faster Deterministic Negative-Weight Shortest Paths
Abstract
We give a deterministic algorithm for single-source shortest paths in directed graphs with integral edge weights at least . Its running time is
This improves the previous fastest deterministic bound of Li [Li26] by a factor of .
1 Introduction
The negative-weight single-source shortest-path problem admits randomized near-linear-time algorithms through the scaling framework of Bernstein, Nanongkai, and Wulff-Nilsen [BNWN25]. Bringmann, Cassis, and Fischer [BCF23] reduced the polylogarithmic overhead, and Li, Mowry, and Rao [LMR26] obtained
These algorithms rely on randomized directed low-diameter decompositions (LDDs). Deterministic near-linear-time algorithms were later obtained by Haeupler, Jiang, and Saranurak [HJS26] and by Li [Li26]. Li's faster algorithm uses overlapping padded decompositions and runs in
We improve on this bound.
Theorem 1.1. Let be a directed graph with vertices and edges and integral edge weights satisfying . There is a deterministic algorithm that either reports a negative-weight cycle or computes single-source shortest paths in
time.
Our algorithm follows the usual scaling framework [Gol95, BNWN25]. Each scale is solved with BF-DIJKSTRA [DI17, BCF23]; our contribution is a padded decomposition whose overlap budget depends on the size of each recursive piece.
2.1 Notation and potentials
We may assume that parallel edges have been reduced to the minimum-weight edge with the same ordered endpoints, so . For a directed graph with nonnegative edge lengths, write for directed distance. For , its weak diameter is
where the witnessing paths may leave . For and , write
A potential is a function ; the reduced weight of is
A potential is valid if all reduced weights are nonnegative.
2.2 Standard primitives
Scaling. Goldberg's scaling reduction repeatedly improves the lower bound on the reduced edge weights. We use the following formulation [Gol95, BNWN25].
Lemma 2.1 (Scaling). Suppose a graph has integral weights at least . It suffices in one scaling step to either find a negative cycle or find a potential whose reduced weights are all at least . Repeating such a step times, followed by one nonnegative SSSP computation, yields exact shortest paths.
We assume , since is an ordinary nonnegative SSSP instance. Fix one scale, let denote its root graph, and define
We have . For any potential ,
Thus a valid potential for gives the required lower bound for . Write
for the fixed clipped graph of the current scale. The recursive weak-diameter invariant is measured in this ambient graph. If is odd, we implement the scale using weights and lengths , double every diameter parameter, and divide the returned potential by two. Thus all priority-queue keys are integral; below we retain the unscaled notation.
BF-Dijkstra. Within each scale, we use BF-DIJKSTRA. Its running time depends on the number of negative edges allowed on a comparison path [DI17, BCF23, LMR26].
Lemma 2.2 (BF-Dijkstra). For any directed weighted graph , source , and integer , there is a deterministic algorithm running in
that returns either exact shortest-path distances from , or a path from to some vertex that is strictly shorter than every path containing at most negative-weight edges.
2.3 Work measure
The decomposition may copy boundary vertices, so ordinary vertex and edge counts do not add across recursive calls. We handle bounded-size graphs directly. For one scaling step on the root graph , assign each vertex weight
and define the mass of a recursive set by
Here is total incident degree, ignoring edge orientation. Each copy of retains weight , so shared boundary vertices are counted once in each child. The degree term covers both outward and inward edge scans, and covers priority-queue operations. Thus a Dijkstra search over total mass takes time with an integer priority queue [Tho03].
At the root,
We fix for the whole scaling step.
2.4 Recursive scaling step
We recursively solve instances . The goal is to either return a valid potential for on or return a negative cycle in the original graph . The root instance is
An internal instance decomposes the clipped graph into overlapping children. Every child either makes constant-factor mass progress and keeps parameter , or has weak diameter at most in and receives parameter . After recursively obtaining child potentials, we merge them by the ordered construction of section 4.
The base case is . If has no negative edge on , the zero potential is valid for and therefore gives reduced -weights at least . Otherwise, a negative -edge can be closed by the weak-diameter invariant proved in section 5, yielding a negative cycle in .
2.5 Main techniques
The decomposition uses size-sensitive padding, and the merge uses ordered reconstruction.
Size-sensitive padding. Instead of using one padding budget for every core, we give a core of mass inside a parent of mass a budget proportional to
This choice is inspired by Seymour's size-dependent loss tradeoff [Sey95]. Over disjoint cores, the sum of these budgets is the drop in the potential , so it pays for the boundary vertices duplicated by padding. Adaptive ball growing then gives padding width
Ordered reconstruction. We keep light pieces in peeling order. A directed walk of clipped length at most can cross from an earlier piece to a later one only times. After the children are solved, scalar shifts make every transition in the opposite direction nonnegative. A linear-size prefix/suffix gadget represents the remaining transitions, allowing BF-DIJKSTRA to merge the child potentials.
An entropy potential bounds the total mass over the recursion by . The next two sections prove the decomposition and reconstruction guarantees.
3 Padded decomposition
Fix a sufficiently small universal constant . All other constants in this section are independent of the input.
3.1 Adaptive thin shells
Lemma 3.1 (Adaptive thin shell). Let be a nonnegatively weighted residual graph contained in a recursive parent of mass . Fix a source , a direction , and a radius budget . There is a universal constant such that, for
within radius one can find either
(i) a ball of mass at least , for a fixed constant , or
(ii) a radius r such that, writing and ,
The search takes time in case (ii), and in case (i).
Proof. Discretize radii as and let
Suppose neither outcome occurs. Then and every step violates the desired shell bound, so
Consequently
where the final inequality holds for sufficiently small fixed , since . Initially . Hence after unsuccessful steps, , contradicting . Choosing sufficiently small ensures .
Monotone Dijkstra exploration scans only edges and vertices covered by the explored ball's mass, which gives the stated running time.
The factor measures logarithmic size progress: smaller cores are allowed proportionally more padding. For disjoint core masses summing to M,
which is the size-potential drop used to pay for duplication.
For the remainder of this section, let denote the clipped graph of the current recursive instance.
3.2 Light peeling
Set
Maintain two unions and of already accepted cores. While both have mass below , choose a vertex . Apply Lemma 3.1 outward in the residual graph and inward in , time-slicing the two searches by elementary work. If at least one search returns a light shell, accept such a core into the corresponding union. If both searches become heavy, switch to the heavy case of the next subsection.
Alternate between the two searches after each edge scan or priority-queue operation. If a light search finishes after work, the other search has used only work. Its padded ball satisfies by Lemma 3.1, so both searches cost . If one search becomes heavy, pause it; the other either pays the work with a light core of comparable mass or also becomes heavy, in which case both searches cost . Since accepted cores of either orientation are disjoint, the total explored padded mass, and hence all light-search work, is .
Assume the + orientation first reaches mass . Let its accepted cores, in peeling order, be
and let be the corresponding padded residual ball. Define the final core and child by
The cores partition X. Every accepted core has mass below and, by Lemma 3.1,
The winning union has mass in , so the final residual has mass in . Hence, for a fixed (say ) and sufficiently small ,
Moreover,
3.3 Ordered walk crossings
The useful guarantee is asymmetric. Define the residual graph in which core was grown by
Then
and every later core , lies in .
Take a directed walk of -length at most . Assign each vertex occurrence to a child greedily. Whenever the current occurrence lies in core , activate child and keep assigning child until the first subsequent occurrence outside ; then activate the unique core containing that new vertex.
Consider one active -interval whose next core is with . All occurrences before the endpoint lie in , and the endpoint lies in the later core . Hence the entire interval is a walk in . It starts in and ends outside , so its length is strictly greater than . Active intervals are disjoint portions of the traversal of . Therefore
No analogous bound is possible for : the earlier core was absent from and may be entered at zero metric cost. If the winning orientation is inward, the same argument is applied backwards along the traversal of and the child order is reversed.
3.4 Heavy case
Suppose both residual searches from some reach mass within radius . Then the full-graph balls and also have mass at least .
Starting from radius , grow each full-graph ball through the interval . Since the initial ball already has constant-fraction mass, ordinary multiplicative ball growing finds radii with shell thickness
and total shell mass . Let
and define
Disjoint cores are , , and .
For , there is a path of length at most , hence
Both side children omit a ball of mass at least , so . The only duplicated mass lies in the two thin shells, hence
Finally, take a directed walk of length . Scan it forward, coloring yellow upon reaching and remaining yellow until leaving ; color green until the next occurrence in . Yellow occurrences lie in , and green occurrences lie in . Each completed yellow interval consumes more than length, so there are yellow intervals and yellow-green transitions.
Scan each yellow interval backward, coloring red upon reaching and remaining red until leaving ; color blue until the next occurrence in . A red occurrence is in and hence in , while a blue occurrence is outside and hence in . If the yellow intervals have lengths , this introduces
further transitions. Thus every walk of length at most admits a child assignment with total transitions.
These constructions give the decomposition used by the recursion.
Theorem 3.2 (Ordered entropy-padded decomposition). For every recursive instance of mass , one can deterministically construct in time either:
(a) an ordered light family with disjoint cores partitioning , every child of mass at most , satisfying equation (1), such that every directed walk of -length at most admits an assignment of each occurrence to a child containing its vertex with increasing child transitions; or
(b) an ordered family of at most three heavy children with disjoint cores partitioning X, one child of weak diameter at most d/2 in the clipped parent graph H, the others of mass at most , and total duplicated mass , such that every directed walk of -length at most d admits such an assignment with total child transitions.
4 Ordered potential merge
Let be either ordered family returned by Theorem 3.2, and let be the valid potential returned for . Let be an integer upper bound such that every -short directed walk admits a child assignment with at most increasing transitions. We may take for a light family and for a heavy family. The same ordered construction merges both kinds of family.
4.1 Making backward transitions nonnegative
Adding a scalar constant to an entire child potential does not change its internal reduced edge weights. We choose constants and set
Process . Before processing i, maintain
when the set is nonempty. Choose
Then update for .
Lemma 4.1. For every original edge and memberships with ,
The offsets are computed in O(I) time, where
Proof. The case follows from validity of . For , equation (3) gives
The computation scans every original incident edge once per source-child membership, which is paid by inherited mass.
Only increasing child transitions can remain negative.
4.2 Compact transition graph
For each original edge and pair of memberships , , the transition should have weight
Materializing all membership pairs may be quadratic. We represent them with monotone prefix/suffix chains. For each original vertex v, write its child memberships as
Define prefix and suffix maxima
Create a copy node and chain nodes .
For the prefix chain add
For an original edge and source copy , let be the last index with and add
This connector is nonnegative by Lemma 4.1. For every , the route down the prefix chain has total weight exactly equation (4) and uses only nonnegative edges.
For the suffix chain add
For an original edge and source copy , let be the first index with and add
This first connector may be negative; every later suffix edge is nonnegative. For every , the route through the suffix chain again has total weight equation (4). A decreasing/equal transition contributes no negative auxiliary edge; an increasing transition contributes at most one.
Add a source s and direct source edges to every copy and chain node. Define an original-vertex projection and scalar by
and give weight .
Every chain edge satisfies and has weight . Every connector associated with original edge has weight
Thus every auxiliary path, including one that switches between chains, has the following interpretation.
Lemma 4.2 (Projection identity). Every auxiliary path projects, by retaining only connector edges, to an original walk ending at , and
Conversely every conceptual transition equation (4) has an auxiliary route of exactly the same weight. Every auxiliary closed walk C projects to an original closed walk with .
Proof. Every non-connector leaves unchanged and contributes a difference of values; every connector traverses one actual original edge and contributes that edge weight plus a difference of values. The terms telescope with the source edge on a source path and telescope to zero around a closed walk.
The chains can therefore be shared by all incoming edges: after a connector enters a v-chain, the path remains at original vertex v until it takes another connector.
4.3 Few negative edges on short lifts
Let be the increasing-transition bound of the ordered family. A -short original directed walk can be lifted according to the assignment of its occurrences. Equal or decreasing transitions use the prefix gadget and contribute no negative edges; each increasing transition contributes at most one negative suffix connector; the initial source edge contributes at most one. Hence the lift has at most negative edges. In both cases .
For the failure guarantee of BF-DIJKSTRA, we require the same statement for an arbitrary auxiliary endpoint.
Lemma 4.3 (Target-preserving short lift). Let be any auxiliary path, and let be its projected original walk. If , then either there is a path with and at most negative edges, or the algorithm can return a negative cycle in .
Proof. If has no original edge, use the direct source edge . Otherwise let be the last original edge of , and let the final connector of leave copy . Remove from , obtaining a walk . Since , Theorem 3.2 gives an assignment of its occurrences with at most increasing transitions.
Force the final occurrence of to use child ; this changes only the last child transition and adds at most one increasing transition. lifts to with at most negative edges, including its source edge. Append exactly the final connector and gadget tail of , adding at most one further negative edge. The resulting auxiliary walk projects to the same and ends at the same , so Lemma 4.2 gives
Cycle-erase . If every removed cycle has nonnegative weight, the remaining path has and no more negative edges. Otherwise, a removed negative cycle projects by Lemma 4.2 to an original closed walk with . Since , this closed walk has negative original weight and therefore contains a negative cycle.
4.4 Merge theorem
Theorem 4.4 (Ordered potential merge). Given recursively valid child potentials for an ordered decomposition with increasing-transition bound , one can construct in time an auxiliary graph with
such that BF-DIJKSTRA with either returns a valid parent potential or a path that yields a negative cycle.
Proof. Let be the number of children containing and . The auxiliary graph has copy and chain vertices. Since every membership contributes inherited mass at least ,
There are connectors because every original incident edge is scanned once per source membership. Hence .
Run BF-DIJKSTRA with . If exact distances are returned, define for any copy
By Lemma 4.2 and exact representation of conceptual transitions, this equals the minimum -weight of an original walk ending at , independent of . Hence for every original edge, so is valid.
If BF-DIJKSTRA returns a witness , the direct source edge has at most one negative edge, hence
By Lemma 4.2, its projection has . If , Lemma 4.3 either returns a negative cycle or gives a path to the same endpoint of weight at most with at most negative edges, contradicting the BF-DIJKSTRA guarantee. Therefore, unless a negative cycle has already been returned, every failure witness satisfies
Section 5 uses these two inequalities to extract a negative cycle.
5 Correctness and running time
5.1 Weak-diameter invariant and negative-cycle witnesses
Lemma 5.1 (Weak-diameter invariant). For every recursive instance with ,
Proof. On the root-to- recursion path, consider the first instance whose parameter equals . It was created as a diameter child from a parent of parameter , and its construction supplied paths of length at most in the clipped parent graph. That graph is a subgraph of , so the same child has weak diameter at most in . Every later same- descendant is a subset of this child, and weak diameter in the fixed ambient metric cannot increase when the vertex set shrinks.
If Theorem 4.4 fails, we obtain an original walk with and . Let
Since , we have . For a negative -edge, and
while for a nonnegative c-edge, . Therefore
If , Lemma 5.1 supplies a return path between the endpoints of of -length, and hence original weight, at most . We recover this path by one Dijkstra search in . The resulting closed walk has negative original weight and therefore contains a negative cycle.
At the root diameter , the preceding inequality gives . Repeatedly remove directed cycles from until a simple path remains. If every removed cycle had nonnegative weight, then . On the other hand, has at most edges, each of weight at least , so
Since , we have and hence
This is a contradiction, so one of the removed cycles has negative weight.
For the base case , if contains a negative edge , then . By Lemma 5.1, a Dijkstra search in finds a return path of -length less than , and hence original weight less than . Together they give a negative closed walk. Otherwise the zero potential is valid for and gives reduced -weights at least .
The extra Dijkstra search is performed only when the algorithm terminates with a witness and costs . A negative closed walk can be decomposed into simple directed cycles in linear time, at least one of which has negative weight.
Every recursive call therefore returns a valid potential or a genuine negative cycle.
5.2 Entropy potential for recursive work
Define the recursion potential
for a sufficiently large constant . Every generated recursive node satisfies ; the first node below is immediately a base case. Hence . At the root,
and throughout the recursion
since and .
Consider a light node with disjoint core masses . Before padding, all children retain parameter d, so
The winning peeled mass lies between and , so even after grouping all peeled cores together, . By equation (1), total duplicated mass is at most
Since one unit of duplicate mass increases by at most , padding consumes only . Choosing the universal sufficiently small leaves a net decrease .
At a heavy node with disjoint core masses , the central core receives parameter and the side cores retain . Before padding, the potential drop equals
If is not a constant fraction of , the two side-size constraints force ; otherwise . Heavy padding is only mass, hence costs only potential. Again the net decrease is .
Lemma 5.2. The sum of inherited masses over all internal recursive instances in one scaling step is
Moreover, the sum over all parent-child incidences of child masses is also .
Proof. At every internal node, the sum of child potentials is at most the parent potential minus for a universal . Summing over the recursion tree telescopes and gives the first claim. In both light and heavy decompositions, total child mass is at most , giving the second.
5.3 One scale and the main theorem
At a merge whose children have total inherited mass , Theorem 4.4 and Lemma 2.2 give running time
By Lemma 5.2, summing over all merges gives
The decomposition work at each recursive node contributes only . Therefore one scaling step takes
Applying the scaling steps of Lemma 2.1 proves Theorem 1.1.
References
[BCF23] Karl Bringmann, Alejandro Cassis, and Nick Fischer. Negative-weight single-source shortest paths in near-linear time: Now faster! In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 515–538. IEEE, 2023.
[BNWN25] Aaron Bernstein, Danupon Nanongkai, and Christian Wulff-Nilsen. Negative-weight single-source shortest paths in near-linear time. Communications of the ACM, 68(2):87–94, 2025.
[DI17] Yefim Dinitz and Rotem Itzhak. Hybrid Bellman–Ford–Dijkstra algorithm. Journal of Discrete Algorithms, 42:35–44, 2017.
[Gol95] Andrew V. Goldberg. Scaling algorithms for the shortest paths problem. SIAM Journal on Computing, 24(3):494–504, 1995.
[HJS26] Bernhard Haeupler, Yonggang Jiang, and Thatchaphol Saranurak. Deterministic negative-weight shortest paths in nearly linear time via path covers. In Proceedings of the 58th Annual ACM Symposium on Theory of Computing (STOC), 2026.
[Li26] Jason Li. Deterministic padded decompositions and negative-weight shortest paths. In Proceedings of the 58th Annual ACM Symposium on Theory of Computing (STOC), 2026.
[LMR26] Jason Li, Connor Mowry, and Satish Rao. Faster negative-weight shortest paths and directed low-diameter decompositions. In Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2824–2845. SIAM, 2026.
[Sey95] Paul D. Seymour. Packing directed circuits fractionally. Combinatorica, 15(2):281–288, 1995.
[Tho03] Mikkel Thorup. Integer priority queues with decrease key in constant time and the single source shortest paths problem. In Proceedings of the 35th Annual ACM Symposium on Theory of Computing (STOC), pages 149–158, 2003.