{"id":"flow-value-check","version":"1.0.0","description":"Check a feasible exact integer flow and its claimed source value, returning the first discrepancy.","supported_operations":["check claimed flow value","validate network flow value","compare flow against claimed value","check source net outflow","verify exact integer flow total","find first flow value discrepancy"],"unsupported_operations":["compute a maximum flow","infer or repair missing edge flows"],"semantics":["Feasibility is checked first in edge then node order; the value claim is checked only after feasibility succeeds.","Flow value is total source outflow minus total source inflow, including parallel and antiparallel edges.","Capacities and edge flows are canonical nonnegative decimal strings; claimed_value is a canonical signed decimal string. Arithmetic is exact.","A false claim is reported and never replaced or silently repaired.","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","claimed_value"],"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]*)$"}},"claimed_value":{"type":"string","minLength":1,"maxLength":79,"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":"5"}],"source":"s","sink":"t","flow":["4"],"claimed_value":"4"},"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":"5"}],"source":"s","sink":"t","flow":["4"],"claimed_value":"5"},"output":{"valid":false,"reason":"flow_value_mismatch","discrepancy":{"path":"claimed_value","expected":"4","actual":"5"},"reference_version":"Ford-Fulkerson max-flow/min-cut theorem (Ahuja-Magnanti-Orlin 1993, Sections 6.1-6.5)"}}],"execute_url":"/v1/tools/flow-value-check/versions/1.0.0/execute"}