Blockchain Data · x402

0/1 knapsack solver — exact work-bounded capacity planning and portfolio selection for…

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

by decision-solver.use.x402atlas.com · discovered, not yet claimed by its owner · updated 2026-10-08

Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.

What it does

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

Tags: 0-1-knapsack-solver · optimization · operations-research · bounded-computation · deterministic · bazaar

Use with an agent

  1. Discover. Agents find this listing with GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP tool search_resources, or /discovery/resources.
  2. Inspect. Fetch /resources/28627.json for the price and payment options.
  3. Pay. Call GET https://decision-solver.use.x402atlas.com/knapsack. The provider answers 402 with its payment requirements. An x402 client signs one of the options below and retries with PAYMENT-SIGNATURE.
  4. Execute. The provider returns 200 with the data. Agent Bazaar is not in the request path and never sees your payment.

For humans

You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, Polygon, Arbitrum One, Solana, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.

Pricing & payment

Price
$0.005 / request
Protocol
x402 v2
Auth
No account or API key. Pay per request.
Networks
Base, Polygon, Arbitrum One, Solana
Calls (30d)
5 · 4 unique payers (third-party data from the public x402 Bazaar)

x402 payment requirements

SchemeNetworkAssetAmountPay toTimeout
exactBase
eip155:8453
USDC$0.0050x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2300s
exactPolygon
eip155:137
USDC$0.0050x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2300s
exactArbitrum One
eip155:42161
USDC$0.0050x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2300s
exactSolana
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
USDC$0.005ASt6xvRyQ7ntERsmcYVMdLqZvz1GEN8Fzexzq62tXrNQ300s
accepts[] (raw JSON)
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "5000",
    "amountUsd": 0.005,
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "exact",
    "network": "eip155:137",
    "payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
    "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
    "amount": "5000",
    "amountUsd": 0.005,
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "exact",
    "network": "eip155:42161",
    "payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
    "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "amount": "5000",
    "amountUsd": 0.005,
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "exact",
    "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
    "payTo": "ASt6xvRyQ7ntERsmcYVMdLqZvz1GEN8Fzexzq62tXrNQ",
    "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "5000",
    "amountUsd": 0.005,
    "maxTimeoutSeconds": 300
  }
]

Schemas

Output schema (JSON Schema)
{
  "properties": {
    "example": {
      "additionalProperties": false,
      "properties": {
        "_atlas": {
          "additionalProperties": false,
          "description": "Atlas documentation and related-route metadata added after deployment",
          "properties": {
            "docs": {
              "description": "Documentation URL for this bridge",
              "format": "uri",
              "maxLength": 512,
              "type": "string"
            },
            "related": {
              "description": "Bounded related Atlas routes",
              "items": {
                "additionalProperties": false,
                "description": "One related Atlas route",
                "properties": {
                  "bridge": {
                    "description": "Related bridge name",
                    "maxLength": 64,
                    "type": "string"
                  },
                  "docs": {
                    "description": "Related bridge documentation URL",
                    "format": "uri",
                    "maxLength": 512,
                    "type": "string"
                  },
                  "summary": {
                    "description": "Short capability summary",
                    "maxLength": 256,
                    "type": "string"
                  },
                  "url": {
                    "description": "Related route URL",
                    "format": "uri",
                    "maxLength": 512,
                    "type": "string"
                  }
                },
                "required": [
                  "bridge",
                  "url",
                  "docs",
                  "summary"
                ],
                "type": "object"
              },
              "maxItems": 3,
              "type": "array"
            }
          },
          "required": [
            "docs"
          ],
          "type": "object"
        },
        "algorithm_version": {
          "const": "knapsack-01-dp-v1",
          "description": "Pinned deterministic algorithm and transcript contract",
          "type": "string"
        },
        "evidence": {
          "additionalProperties": false,
          "description": "Reproducible transcript evidence that detects final-DP drift but does not prove optimality",
          "properties": {
            "dp_capacity": {
              "description": "Maximum capacity index in the final DP transcript",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            },
            "dp_items": {
              "description": "Number of item rows incorporated into the final dynamic program",
              "maximum": 512,
              "minimum": 0,
              "type": "integer"
            },
            "optimality_proof": {
              "const": false,
              "description": "Always false: the digest alone is not an optimality proof",
              "type": "boolean"
            },
            "transcript_encoding": {
              "const": "dpValue[0..capacity] as signed int64 two's-complement, 8-byte big-endian, no prefix",
              "description": "Exact byte encoding hashed; dimensions are carried separately and are not part of the digest",
              "type": "string"
            },
            "transcript_sha256": {
              "description": "Lowercase SHA-256 digest of the encoded final DP values; this is non-proof evidence",
              "maxLength": 64,
              "minLength": 64,
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            },
            "verification": {
              "const": "recompute the bounded dynamic program; the digest detects transcript drift but is not an optimality proof",
              "description": "Independent verification instruction; recomputation is required to verify optimality",
              "type": "string"
            }
          },
          "required": [
            "dp_items",
            "dp_capacity",
            "transcript_encoding",
            "transcript_sha256",
            "optimality_proof",
            "verification"
          ],
          "type": "object"
        },
        "objective": {
          "const": "maximum_total_value",
          "description": "The solver maximizes total selected value within capacity",
          "type": "string"
        },
        "objective_value": {
          "description": "Proven maximum total value",
          "maximum": 512000000000,
          "minimum": 0,
          "type": "integer"
        },
        "operation": {
          "const": "knapsack",
          "description": "Stable route operation name",
          "type": "string"
        },
        "optimal": {
          "const": true,
          "description": "True because the bounded dynamic program computes the exact optimum",
          "type": "boolean"
        },
        "solution": {
          "additionalProperties": false,
          "description": "Selected item set and capacity accounting",
          "properties": {
            "remaining_capacity": {
              "description": "Capacity minus selected weight",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            },
            "selected": {
              "description": "Selected items in input order; [] is valid when no positive-value item fits",
              "items": {
                "additionalProperties": false,
                "description": "One selected item",
                "properties": {
                  "id": {
                    "description": "Input item identifier",
                    "maxLength": 64,
                    "minLength": 1,
                    "pattern": "^[ -~]+$",
                    "type": "string"
                  },
                  "original_index": {
                    "description": "Zero-based input index",
                    "maximum": 511,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "value": {
                    "description": "Input item value",
                    "maximum": 1000000000,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "weight": {
                    "description": "Input item weight",
                    "maximum": 1000000000,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "id",
                  "original_index",
                  "weight",
                  "value"
                ],
                "type": "object"
              },
              "maxItems": 512,
              "type": "array"
            },
            "used_capacity": {
              "description": "Total selected weight",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "selected",
            "used_capacity",
            "remaining_capacity"
          ],
          "type": "object"
        },
        "warnings": {
          "description": "Always empty for this exact solver; non-proof semantics are carried in evidence",
          "items": {
            "description": "Human-readable warning",
            "type": "string"
          },
          "maxItems": 0,
          "type": "array"
        },
        "work_units": {
          "description": "Item count times (capacity+1), the declared dynamic-program work units",
          "maximum": 2000000,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "operation",
        "algorithm_version",
        "objective",
        "objective_value",
        "optimal",
        "solution",
        "work_units",
        "evidence",
        "warnings"
      ],
      "type": "object"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "type"
  ],
  "type": "object"
}
Example shape — generated from the schema, not a captured live response
{
  "example": {
    "_atlas": {
      "docs": "https://example.com",
      "related": [
        {
          "bridge": "string",
          "docs": "https://example.com",
          "summary": "string",
          "url": "https://example.com"
        }
      ]
    },
    "algorithm_version": "string",
    "evidence": {
      "dp_capacity": 0,
      "dp_items": 0,
      "optimality_proof": true,
      "transcript_encoding": "string",
      "transcript_sha256": "string",
      "verification": "string"
    },
    "objective": "string",
    "objective_value": 0,
    "operation": "string",
    "optimal": true,
    "solution": {
      "remaining_capacity": 0,
      "selected": [
        {
          "id": "string",
          "original_index": 0,
          "value": 0,
          "weight": 0
        }
      ],
      "used_capacity": 0
    },
    "warnings": [
      "string"
    ],
    "work_units": 0
  },
  "type": "string"
}

Examples

curl
curl "https://decision-solver.use.x402atlas.com/knapsack"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://decision-solver.use.x402atlas.com/knapsack");
if (res.status === 402) {
  const { accepts } = await res.json();
  // pay one of accepts[] via an x402 client, then retry with the payment header
}
Python
import httpx
res = httpx.get("https://decision-solver.use.x402atlas.com/knapsack")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Details

Provider
decision-solver.use.x402atlas.com
Endpoint
https://decision-solver.use.x402atlas.com/knapsack
Machine-readable
/resources/28627.json