Network cut capacity check

network-cut-capacity-check · version 1.0.0 · Numbers & math · free, no key needed

Check a claimed s-t cut: source-side membership, the edges crossing it and its capacity, with exact integers.

Use when you need to: check the capacity of an s-t cut · verify which edges cross a cut · validate a claimed minimum cut partition.

Decide before calling

Read the versioned contract and the supported scope below. Reuse network-cut-capacity-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 network-cut-capacity-check@1.0.0 for check the capacity of an s-t cut. 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

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "nodes": [
    "s",
    "v1",
    "v2",
    "v3",
    "v4",
    "t"
  ],
  "edges": [
    {
      "from": "s",
      "to": "v1",
      "capacity": 16
    },
    {
      "from": "s",
      "to": "v2",
      "capacity": 13
    },
    {
      "from": "v2",
      "to": "v1",
      "capacity": 4
    },
    {
      "from": "v1",
      "to": "v3",
      "capacity": 12
    },
    {
      "from": "v3",
      "to": "v2",
      "capacity": 9
    },
    {
      "from": "v2",
      "to": "v4",
      "capacity": 14
    },
    {
      "from": "v4",
      "to": "v3",
      "capacity": 7
    },
    {
      "from": "v3",
      "to": "t",
      "capacity": 20
    },
    {
      "from": "v4",
      "to": "t",
      "capacity": 4
    }
  ],
  "source": "s",
  "sink": "t",
  "claim": {
    "source_side": [
      "s",
      "v1",
      "v2"
    ],
    "capacity": 26,
    "crossing_edges": [
      3,
      5
    ]
  }
}

Response:

{
  "result": {
    "valid": true,
    "reason": null,
    "first_discrepancy": null,
    "cut_capacity": "26",
    "reference_version": "CLRS 4th ed. (2022) ch. 24 Maximum Flow: flow networks, cuts, residual networks, max-flow min-cut theorem; r55-flow-certificate-verifiers@1.0.0"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "network-cut-capacity-check",
  "version": "1.0.0",
  "input": {
    "nodes": [
      "s",
      "v1",
      "v2",
      "v3",
      "v4",
      "t"
    ],
    "edges": [
      {
        "from": "s",
        "to": "v1",
        "capacity": 16
      },
      {
        "from": "s",
        "to": "v2",
        "capacity": 13
      },
      {
        "from": "v2",
        "to": "v1",
        "capacity": 4
      },
      {
        "from": "v1",
        "to": "v3",
        "capacity": 12
      },
      {
        "from": "v3",
        "to": "v2",
        "capacity": 9
      },
      {
        "from": "v2",
        "to": "v4",
        "capacity": 14
      },
      {
        "from": "v4",
        "to": "v3",
        "capacity": 7
      },
      {
        "from": "v3",
        "to": "t",
        "capacity": 20
      },
      {
        "from": "v4",
        "to": "t",
        "capacity": 4
      }
    ],
    "source": "s",
    "sink": "t",
    "claim": {
      "source_side": [
        "s",
        "v1",
        "v2"
      ],
      "capacity": 26,
      "crossing_edges": [
        3,
        5
      ]
    }
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/network-cut-capacity-check/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"nodes":["s","v1","v2","v3","v4","t"],"edges":[{"from":"s","to":"v1","capacity":16},{"from":"s","to":"v2","capacity":13},{"from":"v2","to":"v1","capacity":4},{"from":"v1","to":"v3","capacity":12},{"from":"v3","to":"v2","capacity":9},{"from":"v2","to":"v4","capacity":14},{"from":"v4","to":"v3","capacity":7},{"from":"v3","to":"t","capacity":20},{"from":"v4","to":"t","capacity":4}],"source":"s","sink":"t","claim":{"source_side":["s","v1","v2"],"capacity":26,"crossing_edges":[3,5]}}'

The machine-readable contract is at /v1/tools/network-cut-capacity-check/versions/1.0.0.

CLI

node cli.mjs run network-cut-capacity-check 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.