Network Graph Analyzer

Use this Network Graph Analyzer to enter values, adjust options, and review results in a compact responsive workspace.

Results are calculated automatically as you enter data.

Use Add mode to create nodes, Connect mode to link them, and Move mode to drag. Keyboard: in Add mode press Enter or Space to add a node; in Connect mode use Arrow keys to choose a node and Enter or Space to select each endpoint; in Delete mode use Arrow keys to choose a node and Delete or Backspace to remove it; in Move mode use Home and End to choose a node and Arrow keys to move it. Press Escape to cancel a connection.

▼ See explanations and tips below ▼

What Is Graph Theory Analysis of a Network?

Graph theory analysis studies a network by turning it into a graph: a set of vertices connected by edges. In everyday language, vertices are the things in the network, and edges are the relationships or connections between them.

A graph can represent many kinds of networks:

  • Cities connected by roads or flights
  • People connected by friendships
  • Computers connected by cables
  • Web pages connected by links
  • Tasks connected by dependencies

In an undirected, unweighted graph, each connection works both ways and every edge counts the same. That means an edge from A to B is the same as an edge from B to A, and the analyzer measures paths by counting edges rather than distance, cost, time, or capacity.

This kind of analysis helps answer practical questions such as:

  • How many separate groups does the network have?
  • Which nodes have the most direct connections?
  • What is the shortest route from one node to another?
  • Which edges or nodes are single points of failure?
  • Does the graph contain an Euler path, Euler circuit, or Hamiltonian path?

The visual layout can make the graph easier to understand, but the mathematics depends on connections, not on where the nodes are drawn.


Why Network Graph Analysis Matters

Graph analysis is useful because many real-world systems are better understood by their relationships than by their physical appearance. A road map, a school friendship network, and a computer network may look very different, but they can all be studied with the same basic graph ideas.

For students, graph analysis builds intuition about discrete mathematics, algorithms, and network structure. For educators, it gives a visual way to explain abstract ideas such as connected components, degree, shortest paths, bridges, and spanning trees. For general users, it helps reveal whether a network is robust, centralized, fragmented, or dependent on a few important connections.

For example, a network with one component is fully connected: every node can reach every other node by some path. A network with several components is split into separate groups. A bridge edge or critical node may show where removing one connection or one vertex would make the network less connected.


Key Terms to Know

  • Graph: A mathematical model made of vertices and edges.
  • Vertex or node: A point in the graph, such as a city, person, device, or labeled item.
  • Edge or connection: A link between two vertices.
  • Undirected edge: A connection with no one-way direction. The connection A--B is the same as B--A.
  • Unweighted edge: A connection with no cost, length, time, or priority value. Each edge counts as one step.
  • Simple graph: A graph with no self-loops and no parallel edges between the same pair of vertices.
  • Degree: The number of edges touching a vertex.
  • Connected component: A maximal group of vertices that can all reach each other.
  • Shortest path: A path between two vertices that uses the fewest edges.
  • Breadth-first search: A graph search method that explores vertices one edge away, then two edges away, then three edges away, and so on.
  • Closeness: A centrality score based on how near a node is to other reachable nodes.
  • Bridge: An edge whose removal increases the number of connected components.
  • Articulation point: A vertex whose removal increases the number of connected components.
  • Spanning tree: A tree-shaped subgraph that includes all vertices of a connected graph.
  • Spanning forest: A collection of spanning trees, one for each connected component.
  • Euler path: A route that uses every edge exactly once.
  • Euler circuit: An Euler path that starts and ends at the same vertex.
  • Hamiltonian path: A path that visits every vertex exactly once.

How Undirected, Unweighted Graph Analysis Works

A simple undirected graph is often written as:

$$ G = (V, E) $$

Where:

  • \(G\) is the graph.
  • \(V\) is the set of vertices.
  • \(E\) is the set of edges.

For this analyzer, every edge is undirected and unweighted. That choice affects every result. Shortest paths are measured in edge counts, not in drawn distance. A curved, long-looking edge and a short-looking edge both count as one edge.

Degree

The degree of a vertex is the number of neighboring vertices directly connected to it. If \(\operatorname{adj}(v)\) is the set of vertices adjacent to vertex \(v\), then:

$$ \deg(v) = |\operatorname{adj}(v)| $$

A high-degree node has many direct connections. In a social network, that might represent a person with many direct contacts. In a transportation network, it might represent a hub with many routes.

The maximum degree is the largest degree among all nodes in the graph:

$$ \Delta(G) = \max_{v \in V} \deg(v) $$

This helps identify the most directly connected part of the network.

Connected Components

A connected component is a group of vertices where every vertex can reach every other vertex in that same group. If the graph has exactly one component, the graph is connected. If it has two or more components, the graph is disconnected.

Breadth-first search or depth-first search can be used to find components by starting at an unvisited node, marking everything reachable from it, and then repeating the process for the next unvisited node.

Shortest Paths in an Unweighted Graph

In an unweighted graph, the shortest path between two vertices is the path with the fewest edges. It is not the path that looks shortest on the screen.

For a source vertex \(s\) and target vertex \(t\), the shortest path distance is:

$$ d(s,t) = \min\{\text{number of edges in an } s\text{-}t \text{ path}\} $$

If no path connects \(s\) and \(t\), then there is no finite shortest path between them.

Breadth-first search is well suited for this calculation because it explores the graph by distance from the source. It checks all vertices one edge away before checking vertices two edges away, and so on. When each edge has the same weight, the first time BFS reaches a vertex, it has found a shortest path to that vertex.

Closeness

Closeness is a way to estimate how near a node is to the rest of the nodes it can reach. The idea is simple: a node is more central when it can reach other nodes using fewer steps on average.

This analyzer uses the Wasserman--Faust improved normalization for closeness. Let \(R(v)\) be the set of vertices reachable from \(v\), excluding \(v\) itself, and let \(n=|V|\) be the total number of vertices in the graph. Then the score is:

$$ C_{WF}(v) = \frac{|R(v)|}{n-1}\cdot\frac{|R(v)|}{\sum_{u \in R(v)} d(v,u)} $$

If a node cannot reach any other node, if the total distance is \(0\), or if the graph has fewer than two vertices, its closeness is reported as \(0\). In a connected graph, \(|R(v)|=n-1\), so the first factor is \(1\) and this agrees with the usual reachable-distance formula.

A higher closeness score means the node is closer, on average, to the nodes it can reach. In a disconnected graph, the first factor also scales the score by the share of all other vertices that are reachable, so nodes in smaller components are not treated as if their component were the whole graph.

Bridges and Articulation Points

A bridge is an edge that acts like a bottleneck. If removing the edge increases the number of connected components, that edge is a bridge.

An articulation point, also called a critical node or cut vertex, is a vertex whose removal makes the graph less connected. Removing the vertex also removes all edges incident to that vertex.

These features are important because they reveal single points of failure. In a communication network, a bridge edge might represent a connection whose failure separates two groups. In a road network, an articulation point might represent a junction that many routes depend on.

Efficient bridge and articulation-point detection is commonly done with depth-first search using discovery times and low-link values. In plain language, the algorithm tracks when each node is first discovered and whether a subtree can reach an earlier part of the graph without relying on the parent edge.

Euler Paths and Euler Circuits

Euler analysis asks whether a graph has a route that uses every edge exactly once.

For a connected active graph:

  • If every active vertex has even degree, an Euler circuit exists.
  • If exactly two active vertices have odd degree, an Euler path exists.
  • If more than two active vertices have odd degree, no Euler path exists.

The analyzer applies this rule to active vertices with at least one edge. Isolated nodes still count for components and table calculations, but they are ignored for the active Euler connectivity check.

This matters because Euler paths are about using every edge, not visiting every node. A graph with an isolated node may still have an Euler path through the part of the graph that contains edges.

Hamiltonian Paths

A Hamiltonian path visits every vertex exactly once. This is different from an Euler path, which uses every edge exactly once.

Hamiltonian path checking can become expensive as the number of vertices grows because many possible vertex orders may need to be considered. For that reason, this analyzer searches for a Hamiltonian path only in graphs with \(9\) or fewer nodes. For larger graphs, the Hamiltonian check is skipped rather than giving a slow or misleading result.

Spanning Trees and Spanning Forests

A tree is a connected graph with no cycles. A spanning tree of a connected graph includes every vertex while using enough edges to keep the graph connected without cycles.

For a connected graph with \(n\) vertices, a spanning tree has:

$$ n - 1 $$

edges.

If a graph is disconnected, there is no single spanning tree for the whole graph. Instead, each connected component can have its own spanning tree. Together, those trees form a spanning forest.


Examples of Network Graph Analysis in Practice

Example 1: A Connected Four-Node Network

Suppose a graph has these edges:

  • A--B
  • A--C
  • B--D
  • C--D

The graph has \(4\) vertices and \(4\) edges. Each vertex has degree \(2\):

$$ \deg(A)=2,\quad \deg(B)=2,\quad \deg(C)=2,\quad \deg(D)=2 $$

The shortest path from A to D has length \(2\) because A can reach D through B or C:

$$ A \rightarrow B \rightarrow D $$

or

$$ A \rightarrow C \rightarrow D $$

Because all vertices have even degree and the graph is connected, an Euler circuit exists. There are no bridge edges, because every edge lies on a cycle. The graph also has Hamiltonian paths, such as:

$$ B \rightarrow A \rightarrow C \rightarrow D $$

Example 2: A Disconnected Network

Suppose a graph has these edges:

  • A--B
  • B--C
  • D--E

This graph has \(5\) vertices, \(3\) edges, and \(2\) connected components:

  • Component 1: A, B, C
  • Component 2: D, E

There is a shortest path from A to C:

$$ A \rightarrow B \rightarrow C $$

The path length is \(2\) edges.

But there is no path from A to E because A and E are in different components. In this case, the shortest path result should be interpreted as “not connected,” not as a very large distance.

This graph is also fragile. Edge A--B is a bridge, edge B--C is a bridge, and edge D--E is a bridge. Vertex B is an articulation point because removing B separates A and C.


Example 3: An Isolated Node Edge Case

Suppose a graph has these edges:

  • A--B
  • B--C

And suppose there is also an isolated node D with no edges.

The graph has \(4\) vertices, \(2\) edges, and \(2\) components. Node D has degree \(0\) and cannot reach any other node, so its closeness score is \(0\).

The active part of the graph with edges is A--B--C. Vertices A and C have odd degree, while B has even degree:

$$ \deg(A)=1,\quad \deg(B)=2,\quad \deg(C)=1,\quad \deg(D)=0 $$

The active edge-containing part has exactly two odd-degree vertices, so an Euler path exists through the edges:

$$ A \rightarrow B \rightarrow C $$

This example shows why isolated nodes need careful interpretation. They affect component counts and node metrics, but the analyzer’s Euler status focuses on vertices that have at least one edge.


How to Interpret the Result

The analyzer’s output describes the structure of the graph currently shown on the canvas.

  • Vertices: The number of nodes in the graph.
  • Edges: The number of undirected connections between nodes.
  • Components: The number of separate connected groups.
  • Connected status: Whether every node can reach every other node.
  • Max degree: The largest number of direct connections attached to any one node.
  • Shortest path: The fewest-edge route between the selected source and target.
  • Closeness: A normalized node score based on distances to reachable nodes and the share of the graph they can reach.
  • Bridges: Edges whose removal would increase disconnection.
  • Critical nodes: Articulation points whose removal would make connectivity worse.
  • Euler result: Whether the active graph has an Euler path, Euler circuit, no Euler path, no edges, or is disconnected for Euler analysis.
  • Hamiltonian check: Whether a Hamiltonian path is found, not found, skipped for size, or impossible because there are no nodes.

A low vertex or edge count means the graph is small. A high edge count often means there are more alternate routes, although structure matters more than edge count alone. A high max degree identifies a direct hub, but a high-degree node is not always the most central by shortest-path distance.

A higher closeness score means the node is closer to other reachable nodes on average and can reach a larger share of the graph. The score is displayed to \(3\) decimal places, so very small differences may reflect rounding.

Bridge and critical-node results are especially useful for understanding vulnerability. They do not mean an edge is physically long or a node is visually central. They mean the graph becomes more disconnected if that edge or node is removed.


Common Mistakes and Misconceptions

Mistake 1: Treating Visual Distance as Path Length

The shortest path is based on the number of edges, not on the drawn distance between nodes. Moving nodes around on the canvas changes the visual layout, but it does not change graph-theory measurements unless the connections themselves change.

Mistake 2: Assuming Edges Are Directed or Weighted

This analyzer treats every edge as undirected and equal in weight. It does not model one-way streets, capacities, travel times, costs, probabilities, or distances.

Mistake 3: Confusing Euler Paths with Hamiltonian Paths

An Euler path uses every edge exactly once. A Hamiltonian path visits every vertex exactly once. A graph can have one, both, or neither.

For example, a graph may have an Euler circuit because all degrees are even, but still not have a Hamiltonian path that visits every vertex exactly once in a valid order.

Mistake 4: Expecting Multiple Edges Between the Same Nodes

The graph is simple. If two nodes are already connected, connecting them again removes the existing edge instead of creating a parallel edge. This prevents duplicate edges from changing degrees or Euler results.

Mistake 5: Comparing Closeness Across Disconnected Components Too Strongly

The closeness score uses reachable-node distances and is scaled by the share of all other vertices that are reachable. Use components and reachability along with closeness before drawing conclusions about the whole network.

Mistake 6: Expecting Hamiltonian Results for Large Graphs

Hamiltonian path checking is intentionally limited. If the graph has more than \(9\) nodes, the analyzer skips the Hamiltonian search. A skipped result does not mean there is no Hamiltonian path; it means the graph is outside the calculator’s search limit.


When to Use Network Graph Analysis

Use this type of graph analysis when you want to understand the connection structure of a simple network.

It is especially useful for:

  • Learning graph theory concepts visually
  • Checking whether a network is connected or fragmented
  • Finding shortest fewest-edge paths
  • Identifying hubs by degree
  • Comparing local centrality through closeness
  • Finding bridge edges and critical nodes
  • Exploring Euler path and Euler circuit rules
  • Testing small graphs for Hamiltonian paths
  • Demonstrating BFS, spanning trees, and spanning forests

It is less suitable when the network needs direction, edge weights, repeated edges, self-loops, or large-scale optimization.


Limitations and Things to Keep in Mind

This analysis is exact for the graph you draw, but it is only as meaningful as the graph model you choose.

Important limitations include:

  • Edges are undirected.
  • Edges are unweighted.
  • Self-loops are not supported.
  • Parallel edges between the same pair of nodes are not supported.
  • Shortest paths count edges only.
  • Node positions affect the drawing but not the calculations.
  • Closeness is displayed to \(3\) decimal places.
  • Isolated nodes are included in component and node-table results.
  • Isolated nodes are ignored in the active Euler connectivity check.
  • Hamiltonian path search is skipped for graphs with more than \(9\) nodes.
  • Custom numeric coordinates, custom labels, directed edges, and edge weights are not part of the visible calculator inputs.

For classroom exploration, these limitations keep the graph model simple and easier to reason about. For professional network design, transportation planning, cybersecurity, engineering, or operations research, a simple unweighted graph may be only a first approximation. When decisions affect money, safety, infrastructure, or official records, verify the graph model and consult a qualified professional or domain-specific method.


How to Use This Calculator

  1. Load an example graph, or start with the default graph shown on the canvas.
  2. Choose an editing mode: move nodes, add nodes, connect nodes, or delete nodes.
  3. Use the canvas to adjust the network structure.
  4. Select a source vertex and target vertex for shortest-path analysis.
  5. Review the graph summary, metric cards, shortest path, Euler status, Hamiltonian status, and node table.
  6. Use the action buttons to highlight the shortest path, animate BFS, highlight a spanning tree or forest, or clear the graph.
  7. Download the current graph visual as a PNG if you need an image of the network.

Frequently Asked Questions

Does the shortest path use the drawn distance between nodes?

No. The shortest path uses the number of edges between the selected source and target. A visually long edge and a visually short edge both count as one edge.


What does it mean if there is no path between two vertices?

It means the selected source and target are in different connected components, or one of the selected vertices is missing. In that case, the graph does not contain any route from one selected vertex to the other.


What does a high closeness score mean?

A high closeness score means the node can reach other reachable nodes using fewer edges on average while also reaching a larger share of the graph. In disconnected graphs, the Wasserman--Faust factor prevents a small component from being treated as a complete global ranking.


What is the difference between a bridge and a critical node?

A bridge is an edge whose removal increases the number of connected components. A critical node, also called an articulation point, is a vertex whose removal increases the number of connected components.


Why does the Euler result ignore isolated nodes?

Euler paths and Euler circuits are about using edges exactly once. An isolated node has no edge to use, so the analyzer checks Euler status on the active part of the graph that contains edges.


Why is the Hamiltonian check skipped for more than 9 nodes?

Hamiltonian path search can require checking many possible orders of vertices. The analyzer limits the exact search to small graphs so the tool stays responsive. A skipped result does not prove that a Hamiltonian path does or does not exist.


Sources and References

Books and Textbooks

  1. Robert Sedgewick and Kevin Wayne. Algorithms. 4th ed., Addison-Wesley, 2011. Section 4.1, “Undirected Graphs.” Booksite accessed July 4, 2026. https://algs4.cs.princeton.edu/41graph/
  2. Jay Abramson, et al. Contemporary Mathematics. OpenStax, 2023. Chapter 12, “Graph Theory,” especially sections 12.1, 12.5, 12.6, 12.10, and Chapter 12 Key Concepts. Accessed July 4, 2026. https://openstax.org/books/contemporary-mathematics/pages/12-1-graph-basics
  3. Joy Morris. Combinatorics. Mathematics LibreTexts. Section 13.2, “Hamilton Paths and Cycles.” Accessed July 4, 2026. https://math.libretexts.org/Bookshelves/CombinatoricsandDiscreteMathematics/Combinatorics%28Morris%29/03%3AGraphTheory/13%3AEulerandHamilton/13.02%3AHamiltonPathsand_Cycles

Online and Technical Documentation

  1. NetworkX Developers. “closeness_centrality.” NetworkX 3.6.1 Documentation. Accessed July 4, 2026. https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.centrality.closeness_centrality.html