optimization-computation
October 2, 2025
15 min read

Vehicle Routing Problem (VRP) - Computational Complexity and Quantum Solutions

Deep dive into VRP optimization: why it's computationally hard, what makes it NP-hard, and how quantum computing can provide advantages for large-scale routing problems.

QuantFenix Team
Feature image

The Vehicle Routing Problem (VRP) is one of the most studied combinatorial optimization problems in operations research. It's also one of the most computationally challenging, requiring significant compute power for real-world instances.


What is the Vehicle Routing Problem?

The VRP asks: _Given a fleet of vehicles and a set of customers with known locations and demands, what is the optimal set of routes that minimizes total cost while satisfying all constraints?_

Core Components

  • Depot: Starting and ending point for all vehicles
  • Customers: Locations requiring service with specific demands
  • Vehicles: Fleet with capacity constraints
  • Routes: Sequences of customer visits for each vehicle
  • Objective: Minimize total distance, time, or cost

Real-World Applications

  • E-commerce delivery: Amazon, UPS, FedEx route optimization
  • Field service: Maintenance teams visiting multiple sites
  • Supply chain: Distribution from warehouses to retailers
  • Emergency services: Ambulance and fire truck dispatch
  • Waste collection: Garbage truck route planning

Why VRP is Computationally Hard

NP-Hard Complexity

The VRP is NP-hard, meaning:

  1. Superexponential growth: The search space grows superexponentially. Even the TSP subproblem has approximately \((n-1)!/2\) tours; VRP additionally requires partitioning customers across vehicles and ordering within each route.
  2. No polynomial-time algorithm: No known efficient algorithm for optimal solutions
  3. Combinatorial explosion: Multiple constraints and objectives further expand the space and make exploration harder

Computational Challenges

1. Combinatorial Explosion

The search space increases superexponentially with problem size. Rather than unsupported point estimates, it suffices to note that even the TSP core has approximately \((n-1)!/2\) tours; VRP further adds customer-to-vehicle partitioning and per-route orderings.

2. Multiple Constraints

  • Capacity constraints: Vehicle weight/volume limits
  • Time windows: Customer availability windows
  • Route duration: Maximum driving time per vehicle
  • Precedence: Some customers must be visited before others
  • Compatibility: Certain vehicles can only serve certain customers

3. Multi-Objective Optimization

  • Minimize total distance
  • Minimize total time
  • Minimize number of vehicles
  • Balance workload across vehicles
  • Minimize customer waiting time

Complexity in a nutshell

VRP is NP-hard. Even the TSP core has approximately \((n-1)!/2\) tours. Exact dynamic programming for TSP (Held–Karp) requires time \(\Theta(n^2 2^n)\) and space \(\Theta(n 2^n)\). VRP adds capacity and time-window dimensions, which further increase complexity beyond TSP.


Classical Algorithms and Their Limitations

Exact Algorithms

Branch-and-Bound

  • How it works: Systematically explores solution space
  • Limitations: Exponential-time behavior in the worst case; practical solvable size depends strongly on the VRP variant and instance structure (e.g., capacity, time windows, depot configuration)
  • References: Classical overviews such as Laporte (VRP handbook chapters) and Toth & Vigo discuss branch-and-bound/-cut for VRP

Dynamic Programming

  • How it works: Breaks problem into overlapping subproblems
  • Limitations: Memory/time grow rapidly. For the TSP core, the Held–Karp algorithm runs in time \(\Theta(n^2 2^n)\) and space \(\Theta(n 2^n)\); VRP variants are typically harder due to additional capacity/time-window dimensions and indexing
  • References: Held–Karp (TSP) and VRP surveys (e.g., Laporte; Toth & Vigo)

Heuristic Algorithms

Genetic Algorithms

  • How it works: Evolves solutions through selection, crossover, mutation
  • Advantages: Good solutions for large problems
  • Limitations: No guarantee of optimality, slow convergence

Simulated Annealing

  • How it works: Accepts worse solutions probabilistically to escape local optima
  • Advantages: Can find good solutions
  • Limitations: Requires careful parameter tuning

Tabu Search

  • How it works: Maintains memory of recent moves to avoid cycling
  • Advantages: Effective for many VRP variants
  • Limitations: Can get stuck in local optima

Commercial Solvers

OR-Tools (Google)

  • Capabilities: Handles VRP with time windows, capacity constraints
  • Performance: Can scale to hundreds–thousands of nodes in heuristic/CP models depending on constraints and data
  • Docs: OR-Tools VRP documentation
  • Limitations: Classical algorithms with exponential worst-case; performance is instance-dependent

CPLEX (IBM)

  • Capabilities: Mixed-integer programming solver
  • Performance: Excellent for medium-sized problems
  • Limitations: Expensive, classical algorithms

Why Quantum Computing Can Help

Quantum Advantage Scenarios

1. Quantum Annealing (D-Wave)

  • Principle: Uses quantum effects to find low-energy states
  • VRP mapping: Routes as qubits, constraints as interactions
  • Advantages: Natural handling of constraints, parallel exploration
  • Current status: Limited qubit count, noise issues

2. Variational Quantum Algorithms (QAOA)

  • Principle: Hybrid classical-quantum optimization
  • VRP mapping: Quantum circuit encodes problem structure
  • Advantages: Can incorporate problem structure; hybrid optimization can be noise-tolerant
  • Current status: Active research; no general complexity guarantees for VRP

3. Quantum Machine Learning

  • Principle: Quantum neural networks for route optimization
  • Advantages: Can learn from historical data
  • Current status: Early-stage research; no robust production gains demonstrated yet

Quantum Speedup Potential

Theoretical Advantages

  • Superposition: Explore multiple solutions simultaneously
  • Entanglement: Correlate decisions across routes
  • Interference: Amplify good solutions, cancel bad ones

Practical Considerations

  • Noise: Current quantum computers have significant error rates
  • Coherence: Quantum states decay quickly
  • Scaling: Limited number of qubits (50-1000 currently)

Quantum speedup: what's realistic today?

In today's NISQ era there are no broadly accepted demonstrations of practical quantum advantage for VRP on real hardware. Variational methods (e.g., QAOA) and quantum annealing show promising prototype results on small to medium instances, but robust dominance over strong classical heuristics has not been established.

Qubit needs (order-of-magnitude)

  • Common QUBO encodings for the TSP core use \(O(n^2)\) binary variables (logical qubits)
  • VRP typically requires at least \(O(n^2)\) and often more due to vehicle and time/index variables; physical qubits depend on embedding and hardware topology

Computational Requirements

Memory Requirements

Classical (reference points)

Held–Karp (TSP): time Θ(n^2 2^n), space Θ(n 2^n)
VRP exact/DP: typically larger than TSP due to capacity/time-window dimensions (formulation-dependent)
Heuristics (e.g., GA): O(population_size × n) memory

Quantum (order-of-magnitude)

Typical QUBO encodings for the TSP core require O(n^2) binary variables (logical qubits)
VRP often requires ≥ O(n^2) due to vehicle and time/index variables; physical qubits depend on embedding/topology

Time Complexity

Classical Algorithms

Exact methods: exponential-time in the worst case (e.g., Held–Karp for TSP runs in Θ(n^2 2^n))
Heuristics: typically polynomial-time per iteration (e.g., O(n^2)–O(n^3)), no optimality guarantees
Commercial solvers: worst-case exponential; practical performance is instance-dependent

Quantum Algorithms

There is no proven general polynomial-time algorithm or established speedup for VRP with current NISQ approaches (e.g., QAOA, annealing). Performance depends on encoding, embedding, hardware topology, and hybrid optimization heuristics.


Real-World Performance Benchmarks

Problem Sizes and Solutions

Small Problems (≤50 customers)

  • Classical: Optimal solutions in seconds
  • Quantum: No advantage yet
  • Recommendation: Use OR-Tools or CPLEX

Medium Problems (50-200 customers)

  • Classical: Good solutions in minutes
  • Quantum: Hybrid heuristics are interesting to explore; no robust evidence of production quantum advantage
  • Recommendation: Explore hybrid classical–quantum heuristics alongside strong classical baselines

Large Problems (200+ customers)

  • Classical: Classical heuristics dominate; long runs may be required
  • Quantum: Methods are studied experimentally; results are instance- and hardware-dependent
  • Recommendation: Prioritize strong classical/heuristic pipelines; evaluate quantum backends experimentally

Cost Analysis

Provider Pricing Notes

  • OR-Tools (local): Open source and free. Local runs are effectively $0 compute cost (excluding your own hardware/electricity).
  • AWS Braket: Pricing is per-task (e.g., $0.30 per task) plus per-shot fees that vary by QPU; program sets can reduce overhead. See the official pricing page: AWS Braket pricing.
  • IBM Quantum: Tiers include Open (small free quota, e.g., ~10 min/28 days), Pay-As-You-Go (published around $96/min), Flex (around $72/min with minimum commitments), and Premium (around $48/min). Check current details: IBM Quantum pricing and plan docs.
  • D-Wave Leap: Trial credits and hybrid solver services available; production access typically via subscriptions/quotes (no public $/min list). See: D-Wave Leap.

Note: Prices are indicative and can change; always verify with provider documentation.

Performance Trade-offs

  • Quality: Quantum may find better solutions
  • Speed: Quantum may be faster for large problems
  • Cost: Quantum currently more expensive
  • Reliability: Classical more mature and stable

QuantFenix Approach to VRP

Hybrid Optimization Strategy

1. Problem Analysis

  • Size assessment: Determine if quantum advantage is possible
  • Constraint analysis: Identify problem complexity
  • Cost estimation: Calculate expected compute costs

2. Backend Selection

  • Small problems: OR-Tools (local, free)
  • Medium problems: Hybrid classical-quantum
  • Large problems: Quantum-optimized algorithms

3. Continuous Optimization

  • Canary runs: Test multiple backends
  • Performance monitoring: Track solution quality and cost
  • Adaptive routing: Switch backends based on results

Expected Results

Measurement Goals

  • Objective: Quantified savings via dual-canary runs (classical baseline vs. alternative backend) with audit-ready reports and full traceability
  • Caveat: Actual figures depend on data and constraints and are validated per customer instance; no fixed KPIs are promised a priori

Quality Improvements

  • Higher solution quality for complex constraints
  • More balanced routes across vehicles
  • Better customer satisfaction through optimized time windows

Implementation Considerations

Data Requirements

Input Format

customer_id,latitude,longitude,demand,time_window_start,time_window_end
1,59.3293,18.0686,10,09:00,17:00
2,59.3326,18.0649,15,10:00,16:00
...

Vehicle Specifications

vehicle_id,capacity,max_duration,start_time,end_time
1,100,480,08:00,18:00
2,100,480,08:00,18:00
...

Note: Realistic travel times and distances may require external distance-matrix APIs or historical traffic data (e.g., weekday/time-of-day effects). OR-Tools examples commonly use precomputed distance matrices.

Configuration Example

QuantFenix YAML

problem:
  type: vrp
  objective: minimize_distance
  constraints:
    - capacity
    - time_windows
    - max_duration

backends:
  - name: ortools
    type: classical
    cost_weight: 0.6
  - name: aws_braket
    type: quantum
    cost_weight: 0.4

policy:
  cost_weight: 0.6
  quality_weight: 0.3
  latency_weight: 0.1

Future Outlook

Quantum Computing Evolution

Near-term (1-3 years)

  • Improved qubit count: 1000+ qubits
  • Better error correction: Reduced noise
  • Hybrid algorithms: Classical-quantum optimization

Medium-term (3-5 years)

  • Fault-tolerant quantum computers: Reliable quantum computation
  • Quantum advantage: Clear speedup for VRP
  • Commercial availability: Quantum VRP solvers

Long-term (5+ years)

  • Large-scale quantum computers: 100,000+ qubits
  • Potential performance breakthroughs: Quantum systems may outperform classical methods on specific tasks
  • New algorithms: Quantum-native optimization methods

Industry Impact

Logistics Companies

  • Route optimization: Better delivery efficiency
  • Cost reduction: Lower fuel and time costs
  • Customer satisfaction: More reliable delivery windows

E-commerce Platforms

  • Last-mile delivery: Optimized package routing
  • Dynamic routing: Real-time route adjustments
  • Sustainability: Reduced carbon footprint

Conclusion

The Vehicle Routing Problem represents a perfect storm of computational challenges: exponential solution space, multiple constraints, and real-world complexity. While classical algorithms have served us well, they hit fundamental limits as problem sizes grow.

Quantum computing offers a promising path forward, with potential speedups and better solutions for some large-scale VRP instances. However, we are still in the early stages, and practical advantage depends on problem size, constraints, and cost.

QuantFenix's hybrid approach provides the best of both worlds: reliable classical solutions for smaller problems and quantum-optimized approaches for larger, more complex routing challenges. As quantum computing matures, this hybrid strategy will become increasingly powerful and cost-effective.

The future of logistics optimization lies in intelligent backend selection, continuous performance monitoring, and adaptive algorithms that leverage both classical and quantum computing resources.


References

Get Started with VRP Optimization

Ready to optimize your vehicle routing problems? QuantFenix provides:

  • Multi-backend optimization across classical and quantum solvers
  • Cost-aware approach with target savings shown in benchmarks
  • Audit-ready reports for full traceability
  • Easy integration via API, CLI, or web interface

_Upload your customer and vehicle data to get instant optimization results with detailed cost analysis and performance metrics._

Ready to optimize your quantum costs?

Put these insights into practice. Upload your optimization problem and see the cost savings.