Search for alternative paths to edge (1, 6) (dotted arrow), i.e., v
s = 1 and v
t = 6. Solutions to subproblems are managed in a two dimensional solution array indexed by path weight w
i and vertex number v
j. Solutions are calculated iteratively over w
i (rows) and v
j (columns). (A) Solution matrix after first iterative step (subproblem ): There are two edges leading to vertex 2 of which only edge (1, 2) yields a valid solution by pointing to an earlier solved subproblem (green box), whereas edge (5, 2) has a weight of 7 leading to a negative difference in weights i − w
(5,2) (red box) for which no earlier solution exists; (B) Solution matrix after third iterative step : Here, no valid solution exists (none of the arrows leading to vertex 2 are part of a path with summed weight 1); (C) Solution array after iteration over all vertices v
j for w
i = 1 (all vertices have been checked for a path of weight 1, originating from the start vertex 1); (D) Solution to subproblem : edge (4, 6) together with the solution form a valid path, whereas edge (5, 6) is not part of a valid solution as is empty; (E) The algorithm terminates after iteration over all vertices v
j and path weights up to w
(vs, vt) + θ, where θ is a user defined threshold of 1. Backtracking is conducted for all entries in the reconstruction interval w
(vs, vt) ± θ (entries marked blue); (F) Reconstructed alternative path by backtracking of subproblems.