# Bounded Decision Solver **Bounded Decision Solver** is an independently documented x402 Atlas bridge at https://decision-solver.use.x402atlas.com. This document describes only this bridge; it does not aggregate routes, schemas, or content from any other bridge. ## How payment works Paid operations use the [x402 payment protocol](https://x402.org) and settle in USDC. Atlas supports deployments on Base, Polygon, and Arbitrum, plus configured Solana networks. This bridge currently advertises Arbitrum One (`eip155:42161`), Base (`eip155:8453`), Polygon (`eip155:137`), Solana mainnet (`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`). 1. Send the HTTP request without a payment signature. 2. Read the `402 Payment Required` response. Its `accepts` entries are the authoritative network, asset, amount, and recipient options for that call. 3. Select an option, sign it with an x402-compatible wallet or SDK, and repeat the request with the `PAYMENT-SIGNATURE` header. The successful response is returned after verification and settlement. TypeScript clients can automate the challenge, signing, and retry flow with [`x402-fetch`](https://www.npmjs.com/package/x402-fetch) or [`x402-axios`](https://www.npmjs.com/package/x402-axios). Fund a dedicated wallet only with the working USDC balance it needs and keep that key separate from treasury accounts. ## Pricing Atlas route prices start at $0.005 per successful call. This bridge's fallback price is $0.005; operations below state their exact configured price in `x-x402` and `x-payment-info`. The live `402` challenge remains authoritative. ## Worked payment example Request one documented operation without a signature to inspect its live terms: ```bash curl -i --request POST 'https://decision-solver.use.x402atlas.com/assignment' --header 'Content-Type: application/json' --data '{ "costs": [ [ 4, 1, 3 ], [ 2, 0, 5 ], [ 3, 2, 2 ] ] }' # HTTP/1.1 402 Payment Required # Read accepts[].network, asset, amount, and payTo from this response. ``` Sign one accepted option and repeat the identical request with the `PAYMENT-SIGNATURE` header. Do not invent or cache payment terms; read them from the current challenge. ## Use this API - Interactive reference: https://decision-solver.use.x402atlas.com/docs - OpenAPI 3.1 specification: https://decision-solver.use.x402atlas.com/openapi.json - Agent-readable route corpus: https://decision-solver.use.x402atlas.com/llms.txt - Endpoint index: https://decision-solver.use.x402atlas.com/index.json Use the operation schemas and examples below to construct requests. Copy the server URL, path, method, parameters, and request body from the operation you want to call. Path and query examples are concrete and can be used directly. ## Atlas response metadata Successful JSON responses include an additive top-level `_atlas` block, kept separate from the bridge's data fields. `_atlas.docs` links this bridge's `/llms.txt` corpus. `_atlas.related` suggests adjacent APIs, each with a callable `url`, its own `docs` link, and a short `summary`. Suppress this block by sending `X-Atlas-Meta: none` or by adding `?_atlas=0` to the request. ## Errors and compatibility Validation failures use HTTP `400`. Paid operations may return `402` before dispatch. Upstream and internal failures use the documented `5xx` responses. Clients should rely on documented fields and tolerate additive response fields, including `_atlas` unless they explicitly opt out. ## Protocol reference - x402 protocol and SDKs: https://x402.org ## Bounded Decision Solver Docs: https://decision-solver.use.x402atlas.com/docs · OpenAPI: https://decision-solver.use.x402atlas.com/openapi.json ### POST /assignment Assignment solver — exact minimum-cost worker-to-task matching for resource allocation, with deterministic choices and a primal/dual optimality certificate. Minimize the total cost of assigning every worker to one distinct task with the exact Hungarian algorithm. Rectangular matrices, negative costs, deterministic tie handling, and a complete primal/dual optimality certificate are supported within the documented limits. **Price:** $0.005 per call. Body fields: - `costs` (required, array) — Rectangular worker-by-task cost matrix; workers <= tasks and each worker receives one distinct task; minItems: `1`, maxItems: `64` Request body (`application/json`): ```json { "costs": [ [ 4, 1, 3 ], [ 2, 0, 5 ], [ 3, 2, 2 ] ] } ``` Example: ```sh curl --request POST 'https://decision-solver.use.x402atlas.com/assignment' --header 'Content-Type: application/json' --data '{"costs":[[4,1,3],[2,0,5],[3,2,2]]}' ``` Response example: ```json { "operation": "assignment", "algorithm_version": "hungarian-min-v1", "objective": "minimum_total_cost", "objective_value": 5, "optimal": true, "solution": { "assignments": [ { "worker_index": 0, "task_index": 1, "cost": 1 }, { "worker_index": 1, "task_index": 0, "cost": 2 }, { "worker_index": 2, "task_index": 2, "cost": 2 } ] }, "work_units": 24, "certificate": { "padded_assignment": [ 1, 0, 2 ], "row_potentials": [ 3, 2, 2 ], "column_potentials": [ 0, -2, 0 ] }, "warnings": [] } ``` ### POST /bin-pack Bin-packing heuristic — deterministic best-fit-decreasing capacity planning for placing items into bins, with feasibility evidence and an honest volume bound. Pack bounded positive-size items with deterministic best-fit decreasing. The response proves conservation, capacity feasibility, and the volume lower bound. It is heuristic: a nonzero optimality_gap_upper_bound is only an upper bound on the unknown gap, never the actual gap. Optimality is claimed only when the packing matches the volume lower bound. **Price:** $0.005 per call. Body fields: - `capacity` (required, integer) — Capacity of every produced bin; minimum: `1`, maximum: `1000000000` - `items` (required, array) — Unique-ID positive-size items; every size must be no greater than capacity; minItems: `1`, maxItems: `1000` Request body (`application/json`): ```json { "capacity": 10, "items": [ { "id": "a", "size": 8 }, { "id": "b", "size": 7 }, { "id": "c", "size": 6 }, { "id": "d", "size": 5 }, { "id": "e", "size": 4 } ] } ``` Example: ```sh curl --request POST 'https://decision-solver.use.x402atlas.com/bin-pack' --header 'Content-Type: application/json' --data '{"capacity":10,"items":[{"id":"a","size":8},{"id":"b","size":7},{"id":"c","size":6},{"id":"d","size":5},{"id":"e","size":4}]}' ``` Response example: ```json { "operation": "bin-pack", "algorithm_version": "best-fit-decreasing-v1", "objective": "minimum_bin_count", "objective_value": 4, "optimal": false, "optimality_gap_upper_bound": 1, "solution": { "bins": [ { "index": 0, "load": 8, "remaining": 2, "items": [ { "id": "a", "original_index": 0, "size": 8 } ] }, { "index": 1, "load": 7, "remaining": 3, "items": [ { "id": "b", "original_index": 1, "size": 7 } ] }, { "index": 2, "load": 10, "remaining": 0, "items": [ { "id": "c", "original_index": 2, "size": 6 }, { "id": "e", "original_index": 4, "size": 4 } ] }, { "index": 3, "load": 5, "remaining": 5, "items": [ { "id": "d", "original_index": 3, "size": 5 } ] } ], "bin_count": 4 }, "work_units": 10, "certificate": { "algorithm": "best-fit-decreasing-v1", "item_count": 5, "total_size": 30, "capacity": 10, "volume_lower_bound": 3, "item_conservation": true, "capacity_feasible": true }, "warnings": [ "Best-fit decreasing is a heuristic; a nonzero reported bound is only an upper bound on the unknown optimality gap." ] } ``` ### POST /interval-schedule Weighted interval scheduling solver — exact maximum-weight compatible job scheduling with half-open intervals and a complete dynamic-programming certificate. Select a maximum-weight compatible subset of half-open intervals with exact O(n log n) dynamic programming. Adjacent intervals are compatible, ties exclude the current sorted interval, and the response includes the full predecessor and DP certificate. **Price:** $0.005 per call. Body fields: - `intervals` (required, array) — Unique-ID weighted intervals to optimize; adjacent half-open intervals are compatible; minItems: `1`, maxItems: `1000` Request body (`application/json`): ```json { "intervals": [ { "id": "a", "start": 0, "end": 3, "weight": 5 }, { "id": "b", "start": 1, "end": 4, "weight": 6 }, { "id": "c", "start": 3, "end": 5, "weight": 5 } ] } ``` Example: ```sh curl --request POST 'https://decision-solver.use.x402atlas.com/interval-schedule' --header 'Content-Type: application/json' --data '{"intervals":[{"id":"a","start":0,"end":3,"weight":5},{"id":"b","start":1,"end":4,"weight":6},{"id":"c","start":3,"end":5,"weight":5}]}' ``` Response example: ```json { "operation": "interval-schedule", "algorithm_version": "weighted-interval-dp-v1", "objective": "maximum_total_weight", "objective_value": 10, "optimal": true, "solution": { "selected": [ { "id": "a", "original_index": 0 }, { "id": "c", "original_index": 2 } ] }, "work_units": 8, "certificate": { "sorted_original_indices": [ 0, 1, 2 ], "predecessors": [ -1, -1, 0 ], "dp_values": [ 0, 5, 6, 10 ] }, "warnings": [] } ``` ### POST /knapsack 0/1 knapsack solver — exact work-bounded capacity planning and portfolio selection for maximum value, with deterministic ties and reproducible DP evidence. Choose a maximum-value 0/1 item subset within capacity using an exact work-bounded dynamic program. Equal values prefer lower used weight and then exclusion. Evidence includes a reproducible SHA-256 final-DP transcript digest, which detects drift but is not an optimality proof; independent verification requires recomputing the bounded DP. **Price:** $0.005 per call. Body fields: - `capacity` (required, integer) — Maximum total selected weight; item count times (capacity+1) must not exceed 2,000,000 work units; minimum: `1`, maximum: `100000` - `items` (required, array) — Unique-ID 0/1 items; each item is considered at most once; minItems: `1`, maxItems: `512` Request body (`application/json`): ```json { "capacity": 7, "items": [ { "id": "camera", "weight": 3, "value": 4 }, { "id": "battery", "weight": 4, "value": 5 }, { "id": "tripod", "weight": 5, "value": 6 } ] } ``` Example: ```sh curl --request POST 'https://decision-solver.use.x402atlas.com/knapsack' --header 'Content-Type: application/json' --data '{"capacity":7,"items":[{"id":"camera","weight":3,"value":4},{"id":"battery","weight":4,"value":5},{"id":"tripod","weight":5,"value":6}]}' ``` Response example: ```json { "operation": "knapsack", "algorithm_version": "knapsack-01-dp-v1", "objective": "maximum_total_value", "objective_value": 9, "optimal": true, "solution": { "selected": [ { "id": "camera", "original_index": 0, "weight": 3, "value": 4 }, { "id": "battery", "original_index": 1, "weight": 4, "value": 5 } ], "used_capacity": 7, "remaining_capacity": 0 }, "work_units": 24, "evidence": { "dp_items": 3, "dp_capacity": 7, "transcript_encoding": "dpValue[0..capacity] as signed int64 two's-complement, 8-byte big-endian, no prefix", "transcript_sha256": "ec9c54475ee83fff14d13c4bc4728d2d22b27125fcf88ed76782a0425e758ecf", "optimality_proof": false, "verification": "recompute the bounded dynamic program; the digest detects transcript drift but is not an optimality proof" }, "warnings": [] } ```