{"id":"knapsack-01-solve","version":"1.0.0","description":"Solve bounded 0/1 knapsack exactly and return the optimum value, weight, and lexicographically smallest index list.","supported_operations":["solve zero one knapsack exactly","find the best bounded knapsack subset","maximize item value under capacity","exact knapsack dynamic programming","choose optimal indexed items by weight","canonical knapsack solution with tie breaking","compute maximum value subset under weight limit"],"unsupported_operations":["fractional knapsack","unbounded or repeated-item knapsack","multiple capacity constraints","approximate solutions above the hard limits"],"semantics":["Each item may be selected zero or one time; selected_indices are zero-based and strictly increasing.","Feasible subsets have total weight at most capacity; maximize the exact sum of signed item values.","Among equal optimum values, the lexicographically smallest selected_indices list wins; a proper prefix is smaller than the longer list.","The empty subset is feasible, so the optimum value is never negative.","Work equals items.length * (capacity + 1), is capped explicitly, and no approximation or unsafe-integer arithmetic is allowed."],"limits":{"max_items":100,"max_capacity":5000,"max_work_units":500000,"max_abs_item_value":1000000000000},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["items","capacity"],"properties":{"items":{"type":"array","minItems":0,"maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["weight","value"],"properties":{"weight":{"type":"integer","minimum":0,"maximum":5000},"value":{"type":"integer","minimum":-1000000000000,"maximum":1000000000000}}}},"capacity":{"type":"integer","minimum":0,"maximum":5000}}},"output_schema":{"type":"object","additionalProperties":false,"required":["optimum_value","total_weight","selected_indices"],"properties":{"optimum_value":{"type":"integer","minimum":0,"maximum":100000000000000},"total_weight":{"type":"integer","minimum":0,"maximum":5000},"selected_indices":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"integer","minimum":0,"maximum":99}}}},"examples":[{"input":{"items":[{"weight":2,"value":3},{"weight":3,"value":4},{"weight":4,"value":5}],"capacity":5},"output":{"optimum_value":7,"total_weight":5,"selected_indices":[0,1]}},{"input":{"items":[{"weight":1,"value":5},{"weight":1,"value":5}],"capacity":1},"output":{"optimum_value":5,"total_weight":1,"selected_indices":[0]}}],"execute_url":"/v1/tools/knapsack-01-solve/versions/1.0.0/execute"}