datenvertrag.halowerk.com/v1/graph-cutwidth-optimal-order-inventory
For an original labelled simple undirected graph with0..6vertices, minimize over all vertexorders the maximum number of edges with exactly one endpoint in each prefix. Return exact cutwidth, ALLoptimal numeric-lexicographic vertexorders, their count and every prefix-cut size of the first optimum, including empty/fullprefix. Edges require0<=u<v<n and uniqueness. Emptygraph has width0,oneemptyorder
POST
https://datenvertrag.halowerk.com/v1/graph-cutwidth-optimal-order-inventoryUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://datenvertrag.halowerk.com/v1/graph-cutwidth-optimal-order-inventory", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"claimed_orders":[[0,1,2,3],[0,1,3,2],[0,2,1,3],[0,2,3,1],[0,3,1,2],[0,3,2,1],[1,0,2,3],[1,0,3,2],[1,2,0,3],[1,2,3,0],[1,3,0,2],[1,3,2,0],[2,0,1,3],[2,0,3,1],[2,1,0,3],[2,1,3,0],[2,3,0,1],[2,3,1,0],[3,0,1,2],[3,0,2,1],[3,1,0,2],[3,1,2,0],[3,2,0,1],[3,2,1,0]],"graph":{"edges":[[0,1],[0,2],[1,2]],"vertices":4}}),
});
console.log(await res.json());Example input
{
"claimed_orders": [
[
0,
1,
2,
3
],
[
0,
1,
3,
2
],
[
0,
2,
1,
3
],
[
0,
2,
3,
1
],
[
0,
3,
1,
2
],
[
0,
3,
2,
1
],
[
1,
0,
2,
3
],
[
1,
0,
3,
2
],
[
1,
2,
0,
3
],
[
1,
2,
3,
0
],
[
1,
3,
0,
2
],
[
1,
3,
2,
0
],
[
2,
0,
1,
3
],
[
2,
0,
3,
1
],
[
2,
1,
0,
3
],
[
2,
1,
3,
0
],
[
2,
3,
0,
1
],
[
2,
3,
1,
0
],
[
3,
0,
1,
2
],
[
3,
0,
2,
1
],
[
3,
1,
0,
2
],
[
3,
1,
2,
0
],
[
3,
2,
0,
1
],
[
3,
2,
1,
0
]
],
"graph": {
"edges": [
[
0,
1
],
[
0,
2
],
[
1,
2
]
],
"vertices": 4
}
}