Assignment hungarian solve

assignment-hungarian-solve · version 1.0.0 · Optimization & voting · free, no key needed

Solve a bounded rectangular integer minimum-cost assignment with explicit unmatched costs.

Use when you need to: solve minimum cost assignment · run Hungarian assignment · assign rows to columns.

Decide before calling

Read the versioned contract and the supported scope below. Reuse assignment-hungarian-solve@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 assignment-hungarian-solve@1.0.0 for solve minimum cost assignment. 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:

{
  "costs": [
    [
      4,
      1
    ],
    [
      2,
      3
    ]
  ],
  "unmatched_row_cost": 9,
  "unmatched_column_cost": 9
}

Response:

{
  "result": {
    "assignments": [
      {
        "row": 0,
        "column": 1,
        "cost": 1
      },
      {
        "row": 1,
        "column": 0,
        "cost": 2
      }
    ],
    "unmatched_columns": [],
    "total_cost": 3
  }
}

How to call it

MCP

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

{
  "id": "assignment-hungarian-solve",
  "version": "1.0.0",
  "input": {
    "costs": [
      [
        4,
        1
      ],
      [
        2,
        3
      ]
    ],
    "unmatched_row_cost": 9,
    "unmatched_column_cost": 9
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/assignment-hungarian-solve/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"costs":[[4,1],[2,3]],"unmatched_row_cost":9,"unmatched_column_cost":9}'

The machine-readable contract is at /v1/tools/assignment-hungarian-solve/versions/1.0.0.

CLI

node cli.mjs run assignment-hungarian-solve 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.