# 0/1 Knapsack Solver — Exact DP Capacity Planning

> 0/1 Knapsack Solver — Exact DP Capacity Planning is a paid API for AI agents from decision-solver.use.x402atlas.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Solves the 0/1 knapsack problem exactly using dynamic programming, selecting items to maximize total value within a weight/capacity constraint with deterministic tie-breaking and reproducible evidence.

## Facts

- Endpoint: POST https://decision-solver.use.x402atlas.com/knapsack
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/0-1-knapsack-solver-exact-dp-capacity-planning-047ab47c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h0KC3yTnnvzkkcOS9NBSB

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 0-1-knapsack-solver-exact-dp-capacity-planning-047ab47c -d '<json body>'
```

Example prompt: I have 8 projects with different costs and estimated ROI values, and my total budget is $50,000 — use the 0/1 knapsack solver to tell me exactly which projects to fund to maximize total return without going over budget.

## When to prefer this

Choose this endpoint when you need an exact optimal solution to a 0/1 knapsack problem (each item selected at most once) with full DP evidence and deterministic tie-breaking. Prefer it over heuristic bin-packing when correctness and reproducibility matter more than speed at large scale. Use it for budget/capacity planning, portfolio selection, or any scenario where you must maximize value under a hard capacity constraint and need a provably optimal, auditable answer.

## Known failure modes

- Items list is empty or malformed — returns validation error
- Capacity value is zero or negative — returns error or trivially empty selection
- Very large item counts or capacities may exceed work bounds and return a bounded-work error
- Weights or values contain non-numeric or negative entries — returns input validation error
- Missing required fields in request body — returns 400-level error

## How this service works

0/1 knapsack solver — exact work-bounded capacity planning and portfolio selection for maximum value, with deterministic ties and reproducible DP evidence.

## Output

Returns the exact optimal subset of items selected, their combined value and weight, a deterministic selection when ties exist, and reproducible dynamic programming evidence (typically the DP table or traceback path) confirming the solution.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/0-1-knapsack-solver-exact-dp-capacity-planning-047ab47c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from decision-solver.use.x402atlas.com](https://www.zero.xyz/host/decision-solver.use.x402atlas.com/llms.txt)
