Planning & Search in Rust
Esc

Loading…

↑↓ move ↵ open Esc close
Colour theme
All algorithms

FPTAS for constrained shortest path

Also known as FPTAS

optimization multiobjective-search

An FPTAS (fully polynomial-time approximation scheme) gives an answer within a factor 1 + ε of the optimum, in time polynomial in the input size and in 1 / ε. This one solves the constrained shortest path: the lowest first cost among paths whose second cost is within a budget. It runs n − 1 Bellman-Ford rounds over the n reachable states, and each state keeps at most one path per box of first costs: the one with the smallest second cost. The boxes grow by the factor 1 + ε / (2 (n − 1)), so the path it returns fits the budget and has a first cost at most 1 + ε times the optimum (ε is capped at 2, and ε = 0 is exact). Use it when exact search keeps too many labels, because the number of labels here stays polynomial.

Pseudocode

algorithm FPTAS-constrained(s₀, goal, b, ε)input: start s₀, goal test goal, budget b, tolerance ε (capped at 2)output: a path with second cost ≤ b and first cost ≤ (1 + ε) · optimum, or failuren ← number of states reachable from s₀        ▷ goals are not expandedδ ← ε / (2 (n − 1))                           ▷ box k holds first costs in [t_k, t_(k+1))BOX[s₀][box(0)] ← ⟨s₀, (0, 0)⟩                ▷ t_(k+1) = max(t_k + 1, ⌊t_k (1 + δ)⌋)FRONTIER ← {⟨s₀, (0, 0)⟩}for round in 1, …, n − 1 do                  ▷ Bellman-Ford roundsNEXT ← ∅for each label ⟨s, g⟩ in FRONTIER with not goal(s) dofor each (s′, c) in successors(s) dog′ ← g + ck ← box(g′₁)if g′₂ ≤ b and (BOX[s′][k] is empty or g′₂ < g₂ of BOX[s′][k]) thenBOX[s′][k] ← ⟨s′, g′⟩                 ▷ one label per box: the least second costNEXT ← NEXT ∪ {⟨s′, g′⟩}if NEXT = ∅ thenbreakFRONTIER ← NEXTif no goal state has a label thenreturn failurereturn path-to(the lexicographically least label in BOX over all goal states)

In the crates

Lineage

Comes from

builds on Bellman-Ford

Led to

Nothing on this site.

Papers

  1. Approximation of Pareto Optima in Multiple-Objective, Shortest-Path Problems Arthur Warburton · 1987· Operations Research introduces doi 10.1287/opre.35.1.70
  2. Multiobjective Optimization: Improved FPTAS for Shortest Paths and Non-Linear Objectives with Applications George Tsaggouris, Christos Zaroliagis · 2009· Theory of Computing Systems extends doi 10.1007/s00224-007-9096-4
  3. Multiobjective Path Problems and Algorithms in Telecommunication Network Design—Overview and Trends José Craveirinha, João Clímaco, Rita Girão-Silva, Marta Pascoal · 2024· Algorithms survey doi 10.3390/a17060222