{"id":"flow-feasibility-check","version":"1.0.0","description":"Check exact integer edge capacities and flow conservation, returning the first discrepancy.","supported_operations":["check flow feasibility","validate a claimed network flow","find first flow constraint violation","check capacity constraints","check flow conservation","verify feasible capacitated flow"],"unsupported_operations":["compute a maximum flow","repair an infeasible flow"],"semantics":["Nodes and edges retain caller order; parallel edges and self-loops are allowed, and flow[i] corresponds exactly to edges[i].","All capacities and flows are canonical nonnegative decimal strings and arithmetic is exact; no leading zero except \"0\".","Capacity discrepancies are checked by edge index before conservation discrepancies are checked by node index.","A valid flow balances every nonterminal and has equal source outflow and sink inflow.","Reference version: Ford-Fulkerson max-flow/min-cut theorem (Ahuja-Magnanti-Orlin 1993, Sections 6.1-6.5)."],"limits":{"max_nodes":256,"max_edges":4096,"max_integer_digits":78,"max_node_id_bytes":64},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["nodes","edges","source","sink","flow"],"properties":{"nodes":{"type":"array","minItems":2,"maxItems":256,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":64}},"edges":{"type":"array","maxItems":4096,"items":{"type":"object","additionalProperties":false,"required":["from","to","capacity"],"properties":{"from":{"type":"string","minLength":1,"maxLength":64},"to":{"type":"string","minLength":1,"maxLength":64},"capacity":{"type":"string","minLength":1,"maxLength":78,"pattern":"^(0|[1-9][0-9]*)$"}}}},"source":{"type":"string","minLength":1,"maxLength":64},"sink":{"type":"string","minLength":1,"maxLength":64},"flow":{"type":"array","maxItems":4096,"items":{"type":"string","minLength":1,"maxLength":78,"pattern":"^(0|[1-9][0-9]*)$"}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","discrepancy","reference_version"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"]},"discrepancy":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["path","expected","actual"],"properties":{"path":{"type":"string"},"expected":{"type":["string","null"]},"actual":{"type":["string","null"]}}}]},"reference_version":{"type":"string","const":"Ford-Fulkerson max-flow/min-cut theorem (Ahuja-Magnanti-Orlin 1993, Sections 6.1-6.5)"}}},"examples":[{"input":{"nodes":["s","t"],"edges":[{"from":"s","to":"t","capacity":"3"}],"source":"s","sink":"t","flow":["3"]},"output":{"valid":true,"reason":null,"discrepancy":null,"reference_version":"Ford-Fulkerson max-flow/min-cut theorem (Ahuja-Magnanti-Orlin 1993, Sections 6.1-6.5)"}},{"input":{"nodes":["s","t"],"edges":[{"from":"s","to":"t","capacity":"3"}],"source":"s","sink":"t","flow":["4"]},"output":{"valid":false,"reason":"capacity_exceeded","discrepancy":{"path":"flow[0]","expected":"3","actual":"4"},"reference_version":"Ford-Fulkerson max-flow/min-cut theorem (Ahuja-Magnanti-Orlin 1993, Sections 6.1-6.5)"}}],"execute_url":"/v1/tools/flow-feasibility-check/versions/1.0.0/execute"}