{
  "slug": "graph-algorithms",
  "name": "gizza-ai/graph-algorithms",
  "version": "0.1.0",
  "title": "Graph Algorithms — BFS, DFS, Shortest Path, Topological Sort & Cycle Detection — gizza.ai",
  "description": "Run graph algorithms on your own edge list — BFS, DFS, Dijkstra shortest path, topological sort, and cycle detection. Free, private, in your browser.",
  "tags": [
    "graph algorithms",
    "bfs",
    "dfs",
    "shortest path",
    "dijkstra",
    "topological sort",
    "cycle detection",
    "edge list",
    "directed graph",
    "weighted graph"
  ],
  "category": "math",
  "urls": {
    "page": "https://gizza.ai/tools/graph-algorithms/",
    "markdown": "https://gizza.ai/tools/graph-algorithms/index.md",
    "descriptor": "https://gizza.ai/tools/graph-algorithms/tool.json",
    "deep_link_example": "https://gizza.ai/tools/graph-algorithms/?edges=a%20-%3E%20b%0Aa%20-%3E%20c%0Ab%20-%3E%20d&algorithm=bfs&directed=true&weighted=true&start=a&end=d"
  },
  "cli": "gizza tool graph-algorithms \"a -> b\na -> c\nb -> d\"",
  "tool": {
    "description": "Run a classic graph algorithm on a user-supplied edge list. Provide `edges` (one edge per line, e.g. `a -> b`, `a - b`, `a,b`, or weighted `a -> b : 3`), choose `algorithm` = bfs | dfs | shortest-path | topological-sort | cycle-detection, and set `directed`/`weighted` as needed. bfs/dfs/shortest-path need a `start` node; shortest-path also needs `end`. Returns a human-readable report (visit order, shortest path + distance, topological order, or an example cycle).",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "algorithm": {
          "default": "bfs",
          "description": "Which algorithm to run.",
          "enum": [
            "bfs",
            "dfs",
            "shortest-path",
            "topological-sort",
            "cycle-detection"
          ],
          "type": "string"
        },
        "directed": {
          "default": false,
          "description": "Treat edges as directed.",
          "type": "boolean"
        },
        "edges": {
          "description": "The graph as an edge list, one edge per line.",
          "type": "string"
        },
        "end": {
          "description": "End node for shortest-path.",
          "type": "string"
        },
        "start": {
          "description": "Start node for bfs, dfs, and shortest-path.",
          "type": "string"
        },
        "weighted": {
          "default": false,
          "description": "Parse a trailing number on each edge as its weight.",
          "type": "boolean"
        }
      },
      "required": [
        "edges"
      ],
      "type": "object"
    }
  }
}