Maxflow certificate check
maxflow-certificate-check · version 1.0.0 · Numbers & math · free, no key needed
Check an exact max-flow/min-cut certificate and return the first deterministic discrepancy.
Use when you need to: check max flow certificate · validate max flow min cut proof · check claimed maximum flow.
Decide before calling
Read the versioned contract and the supported scope below. Reuse maxflow-certificate-check@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use maxflow-certificate-check@1.0.0 for check max flow certificate. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- check max flow certificate
- validate max flow min cut proof
- check claimed maximum flow
- verify minimum cut witness
- audit flow optimality certificate
- find first maxflow certificate discrepancy
Not supported
- compute a maximum flow
- choose or repair a cut partition
Behavior
- The claimed flow is checked for feasibility first, then source value, then source-side membership, cut capacity, and crossing-edge equality conditions.
- source_side is an unordered duplicate-free list naming the cut side containing source and excluding sink; omitted nodes are on the sink side.
- Cut capacity sums original capacities of edges directed from source_side to its complement; parallel edges count separately.
- All numeric fields are canonical nonnegative decimal strings and arithmetic is exact.
- By max-flow/min-cut equality, a feasible flow whose value equals this cut capacity is maximum and the cut is minimum.
- Reference version: Ford-Fulkerson max-flow/min-cut theorem (Ahuja-Magnanti-Orlin 1993, Sections 6.1-6.5).
Input
nodes(array of string, required): min items 2; max items 256; each min length 1; each max length 64edges(array of object, required): max items 4096source(string, required): min length 1; max length 64sink(string, required): min length 1; max length 64flow(array of string, required): max items 4096; each min length 1; each max length 78; each pattern^(0|[1-9][0-9]*)$claimed_value(string, required): min length 1; max length 78; pattern^(0|[1-9][0-9]*)$source_side(array of string, required): min items 1; max items 256; each min length 1; each max length 64
Output
valid(boolean, required)reason(string or null, required)discrepancy(null or object, required)reference_version(constant "Ford-Fulkerson max-flow/min-cut theorem (Ahuja-Magnanti-Orlin 1993, Sections 6.1-6.5)", required)
Limits
- max nodes: 256
- max edges: 4096
- max integer digits: 78
- max node id bytes: 64
Example
Request input:
{
"nodes": [
"s",
"t"
],
"edges": [
{
"from": "s",
"to": "t",
"capacity": "3"
}
],
"source": "s",
"sink": "t",
"flow": [
"3"
],
"claimed_value": "3",
"source_side": [
"s"
]
}
Response:
{
"result": {
"valid": true,
"reason": null,
"discrepancy": null,
"reference_version": "Ford-Fulkerson max-flow/min-cut theorem (Ahuja-Magnanti-Orlin 1993, Sections 6.1-6.5)"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "maxflow-certificate-check",
"version": "1.0.0",
"input": {
"nodes": [
"s",
"t"
],
"edges": [
{
"from": "s",
"to": "t",
"capacity": "3"
}
],
"source": "s",
"sink": "t",
"flow": [
"3"
],
"claimed_value": "3",
"source_side": [
"s"
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/maxflow-certificate-check/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"nodes":["s","t"],"edges":[{"from":"s","to":"t","capacity":"3"}],"source":"s","sink":"t","flow":["3"],"claimed_value":"3","source_side":["s"]}'
The machine-readable contract is at /v1/tools/maxflow-certificate-check/versions/1.0.0.
CLI
node cli.mjs run maxflow-certificate-check 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Maximum flow certificate check: Check a claimed max flow with a min-cut certificate or residual search; reports the first failure or augmenting path.
- Network cut capacity check: Check a claimed s-t cut: source-side membership, the edges crossing it and its capacity, with exact integers.
- Bipartite coloring check: Check a complete 0/1 coloring witness for graph bipartiteness and report the first certificate discrepancy.
- Flow value check: Check a feasible exact integer flow and its claimed source value, returning the first discrepancy.
- Join inner result check: Check a claimed ordered inner join index result and report its first discrepancy.
- Join left result check: Check a claimed ordered left join index result and report its first discrepancy.