Catalog/workflow-transitive-reduction

Workflow

DAG transitive reduction API

Removes edges implied by longer paths to produce the minimal edge set with identical reachability, listing kept and removed edges. Answers 'Which dependency edges are redundant?', 'What is the minimal equivalent DAG?'.

Price$0.03per request
MethodPOST
Route/v1/workflow/transitive-reduction
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
transitive-reductiondagminimaledgesgraphredundantsimplifyworkflow
API URLhttps://x402.hexl.dev/v1/workflow/transitive-reduction
Integration docs
Example request
{
  "nodes": [
    "a",
    "b",
    "c"
  ],
  "edges": [
    [
      "a",
      "b"
    ],
    [
      "b",
      "c"
    ],
    [
      "a",
      "c"
    ]
  ]
}
Example response
{
  "edges": [
    {
      "from": "a",
      "to": "b"
    },
    {
      "from": "b",
      "to": "c"
    }
  ],
  "removedEdges": [
    {
      "from": "a",
      "to": "c"
    }
  ],
  "keptCount": 2,
  "removedCount": 1,
  "interpretation": "Removed 1 redundant edge(s); 2 edge(s) form the minimal equivalent DAG."
}
Input schema
{
  "type": "object",
  "required": [
    "nodes",
    "edges"
  ],
  "properties": {
    "nodes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "examples": [
        [
          "a",
          "b",
          "c"
        ]
      ]
    },
    "edges": {
      "type": "array",
      "examples": [
        [
          [
            "a",
            "b"
          ],
          [
            "b",
            "c"
          ],
          [
            "a",
            "c"
          ]
        ]
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}