CalcDomain

Adjacency List Graph Adjacency List Generator Paste your edges, choose whether the graph is directed/undirected and weighted/unweighted, and we’ll build the adjacency list for you. We also show a JSON version and an adjacency matrix so you can compare different graph representations. 1. Graph input Accepted edge formats (one per line): A B , A,B , A B 5 (weighted), 1 2 , node_1 node_2 1.25 . We auto-detect separators. A B A C B D C D 2 D E Directed graph Weighted edges Sort nodes Generate Adjacency list JSON Adjacency matrix No graph generated yet. {"A": ["B","C"], "B":["D"], "C":["D"], "D":["E"]} Adjacency list vs adjacency matrix For a graph \( G = (V, E) \): Adjacency list: store, for every vertex \(v\), the list of neighbors it connects to. Space is \(O(|V| + |E|)\). Adjacency matrix: store a full \( |V|\times|V| \) table. Space is \(O(|V|^2)\), but lookups are \(O(1)\). When to use which Use an adjacency list for sparse graphs, typical interview problems, and traversals like BFS/DFS. Use an adjacency matrix when you need instant edge existence checks or when the graph is dense. Weighted edges If you tick “weighted”, neighbors will be shown as node(weight) , e.g. C(2) , so you can directly feed it to Dijkstra or Prim implementations. Related Graph Tools Graphing & Visualization Core Math & Algebra Adjacency List (this page) Logistic Regression Tips Keep node names consistent (use either letters or numbers). For directed graphs, remember that edge A→B does not imply B→A.

Calculators in Adjacency List Graph Adjacency List Generator Paste your edges, choose whether the graph is directed/undirected and weighted/unweighted, and we’ll build the adjacency list for you. We also show a JSON version and an adjacency matrix so you can compare different graph representations. 1. Graph input Accepted edge formats (one per line): A B , A,B , A B 5 (weighted), 1 2 , node_1 node_2 1.25 . We auto-detect separators. A B A C B D C D 2 D E Directed graph Weighted edges Sort nodes Generate Adjacency list JSON Adjacency matrix No graph generated yet. {"A": ["B","C"], "B":["D"], "C":["D"], "D":["E"]} Adjacency list vs adjacency matrix For a graph \( G = (V, E) \): Adjacency list: store, for every vertex \(v\), the list of neighbors it connects to. Space is \(O(|V| + |E|)\). Adjacency matrix: store a full \( |V|\times|V| \) table. Space is \(O(|V|^2)\), but lookups are \(O(1)\). When to use which Use an adjacency list for sparse graphs, typical interview problems, and traversals like BFS/DFS. Use an adjacency matrix when you need instant edge existence checks or when the graph is dense. Weighted edges If you tick “weighted”, neighbors will be shown as node(weight) , e.g. C(2) , so you can directly feed it to Dijkstra or Prim implementations. Related Graph Tools Graphing & Visualization Core Math & Algebra Adjacency List (this page) Logistic Regression Tips Keep node names consistent (use either letters or numbers). For directed graphs, remember that edge A→B does not imply B→A..

Adjacency List Calculator
/adjacency-list