# Pareto front find

`pareto-front-find` · version 1.0.0 · Optimization & voting · free, no key needed

Find stable nondominated row indices and a domination witness for every excluded row using exact rational criteria.

**Use when you need to: find the pareto front · find nondominated alternatives · filter dominated rows.**

## Decide before calling

Read the [versioned contract](/v1/tools/pareto-front-find/versions/1.0.0) and the supported scope below. Reuse `pareto-front-find@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 `pareto-front-find@1.0.0` for find the pareto front. 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

- find the pareto front
- find nondominated alternatives
- filter dominated rows
- compare mixed objectives exactly
- return pareto domination witnesses
- optimize minimize and maximize criteria
- compute a skyline over rational values

## Not supported

- rank alternatives into a total order or choose one preferred row
- approximate floating-point, missing, infinite, or nonnumeric criterion values
- compute Pareto layers beyond the first nondominated front

## Behavior

- Canonical rationals are 0, signed base-10 integers without leading zero, or reduced p/q with a positive denominator greater than 1; -0, zero fractions, and /1 are invalid.
- A row dominates another when it is no worse on every criterion and strictly better on at least one, respecting minimize and maximize directions.
- Equal and duplicate rows do not dominate each other; duplicates of a nondominated point all remain nondominated.
- Indices and excluded records follow input order; dominated_by is the lowest input index that directly dominates the excluded row.
- Exact BigInt cross multiplication is used with bounded O(rows squared times criteria) work; no approximation is performed.

## Input

- `criteria` (array of object, required): min items 1; max items 16
- `rows` (array of array of string, required): min items 1; max items 128; each min items 1; each max items 16; each each min length 1; each each max length 128; each each pattern `^(0|-?[1-9][0-9]*(/[1-9][0-9]*)?)$`

## Output

- `nondominated_indices` (array of integer, required): max items 128; each min 0; each max 127
- `excluded` (array of object, required): max items 128

## Limits

- max rows: 128
- max criteria: 16
- max rational bytes: 128
- max dominance checks: 16256

## Example

Request input:

```json
{
  "criteria": [
    {
      "direction": "minimize"
    },
    {
      "direction": "maximize"
    }
  ],
  "rows": [
    [
      "1",
      "1"
    ],
    [
      "2",
      "3"
    ],
    [
      "3",
      "2"
    ],
    [
      "2",
      "1"
    ]
  ]
}
```

Response:

```json
{
  "result": {
    "nondominated_indices": [
      0,
      1
    ],
    "excluded": [
      {
        "index": 2,
        "dominated_by": 1
      },
      {
        "index": 3,
        "dominated_by": 0
      }
    ]
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "pareto-front-find",
  "version": "1.0.0",
  "input": {
    "criteria": [
      {
        "direction": "minimize"
      },
      {
        "direction": "maximize"
      }
    ],
    "rows": [
      [
        "1",
        "1"
      ],
      [
        "2",
        "3"
      ],
      [
        "3",
        "2"
      ],
      [
        "2",
        "1"
      ]
    ]
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/pareto-front-find/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"criteria":[{"direction":"minimize"},{"direction":"maximize"}],"rows":[["1","1"],["2","3"],["3","2"],["2","1"]]}'
```

The machine-readable contract is at [/v1/tools/pareto-front-find/versions/1.0.0](/v1/tools/pareto-front-find/versions/1.0.0).

### CLI

```sh
node cli.mjs run pareto-front-find 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Knapsack 01 solve](/tools/knapsack-01-solve): Solve bounded 0/1 knapsack exactly and return the optimum value, weight, and lexicographically smallest index list.
- [Assignment hungarian solve](/tools/assignment-hungarian-solve): Solve a bounded rectangular integer minimum-cost assignment with explicit unmatched costs.
- [Vote condorcet winner](/tools/vote-condorcet-winner): Compute weighted pairwise counts, a strict Condorcet winner, and the generalized Smith set.
- [Rank borda aggregate](/tools/rank-borda-aggregate): Aggregate weighted complete or partial rankings into exact Borda scores, rank groups, and audit contributions.
- [Round robin schedule generate](/tools/round-robin-schedule-generate): Generate a deterministic single or double round-robin schedule with ordered rounds, home/away assignments, and byes.
