Network Graph Visualization Online: Keep the Isolated Node

Five edges mention only five nodes, but the inventory contains F too. Keep the node list separate from the edge list, then calculate the path instead of reading distance from the picture.

The graph inspector validates the six-node source, computes adjacency, degrees, components and alphabetical breadth-first paths, and keeps F as an isolated node. Delete B–D to recalculate A–C–D–E at three hops. A layout-only control moves D without changing the answers, because drawn distance is not hop cost.

Network Graph Visualization Online: Keep the Isolated Node
Network Graph Visualization Online: Keep the Isolated Node
Open the full example ↗

Preserve the complete node inventory

Use an undirected, unweighted simple graph with nodes A, B, C, D, E and F. Its five edges are A–B, A–C, B–D, C–D and D–E. F is an explicitly supplied isolated node, not an import error or a record to omit.

Graph Online presents edge-list and adjacency inputs. Here, enter the five supplied edge pairs and calculate their neighbors, degrees and paths. Keep F in the node list even though it appears in none of the pairs.

Node Alphabetically sorted neighbors Degree
A B, C 2
B A, D 2
C A, D 2
D B, C, E 3
E D 1
F None 0

Each undirected edge contributes one neighbor entry at each endpoint. The degree sum is 2 + 2 + 2 + 3 + 1 + 0 = 10, twice the five-edge count. That reconciliation helps catch a missing reciprocal edge or a duplicate counted twice.

Follow one deterministic breadth-first trace

Start at A, visit neighbors alphabetically and mark each node discovered when it enters the queue. Marking only on removal can enqueue D twice through B and C.

Processed node Newly discovered nodes Queue afterward
A B, C at level 1 B, C
B D at level 2, parent B C, D
C None; D already discovered D
D E at level 3, parent D E
E None Empty

A is level 0. B and C are level 1, D level 2 and E level 3. F is unreachable from A; its result is not zero hops. Zero hops belongs to A's path to itself.

The alphabetical tie order is this inspector’s explicit policy, not a property of every graph implementation.

Show a shortest path without calling it unique

The chosen parent records produce A → B → D → E, three edges. A → C → D → E also has three edges. Alphabetical discovery selects one representative path but does not make the other longer.

Keep path length in hops separate from the drawn line lengths. The Move D button changes its drawn position only. It leaves the edge list and hop count unchanged.

The original graph has two connected components: A, B, C, D and E form one group; F forms the other. F still counts as a component even though its degree is zero.

Inspect an edge deletion as a new graph

Press Delete B–D, then Calculate graph. The remaining route A → C → D → E is still three hops. B stays connected through A–B; removing one edge did not isolate it.

The new degrees are A: 2, B: 1, C: 2, D: 2, E: 1 and F: 0. Their sum is 8 for four edges. The alphabetical BFS order from A is still A, B, C, D, E, but D's discovery parent changes to C. A traversal order alone therefore cannot prove the adjacency was unchanged.

Use Reset to restore the original five edges before trying another comparison. Source edits clear old adjacency, path and trace outputs until a valid recalculation. Layout-only moves keep those semantic records unchanged.

Inspect the editable graph

The node field must contain each of A through F once. Enter undirected edges as one pair per line, then choose source and destination and press Calculate graph. Reverse-order duplicates such as A B and B A, self-edges and unknown endpoints are rejected. The original graph gives degree sum ten for five edges and two connected components.

Change the destination to F and calculate again: the result is Unreachable, not zero hops. Use A as both source and destination to see the legitimate zero-hop path. Every source edit clears stale derived answers. The Move D button changes only its displayed coordinate; Reset restores original nodes, edges, layout, source A and destination E with calculation pending.

Copy this prompt

Create a graph explorer for the explicit nodes A, B, C, D, E and F. Use an undirected, unweighted simple graph with five initial edges: A B, A C, B D, C D and D E. Keep F visible as an isolated node.

Place editable node and edge fields beside a responsive SVG drawing. Provide source and destination inputs, initially A and E, plus Calculate graph, Delete B–D, Move D and Reset buttons. Require every A through F node exactly once. Each nonblank edge line must contain two known distinct endpoints. Reject reverse duplicates such as A B and B A.

Calculate alphabetically sorted adjacency, degrees, components and a breadth-first search. Mark nodes discovered when enqueued. For the original graph, degrees are 2, 2, 2, 3, 1 and 0. Show their sum of 10 as twice five edges and count two components. From A, the levels are 0 for A, 1 for B and C, 2 for D, 3 for E, and Unreachable for F.

Display the alphabetical queue trace and representative path A to B to D to E, three hops. Explain that A to C to D to E is equally short. A to A has zero hops; A to F is unreachable, not zero.

Delete B–D edits the edge source and clears old results until recalculation. The new path to E goes through C and still takes three hops. Move D changes drawing coordinates only. All source edits clear derived answers; Reset restores the original source and leaves calculation pending. Return one self-contained HTML file with readable text results alongside the drawing.

Separate a moved node from a removed edge

Calculate the original graph and move D. The picture changes while the three-hop path stays the same. Then delete B–D and calculate again: the representative path now runs through C. NOS can render the HTML explorer for this comparison. Finish by choosing F as the destination and explain why unreachable differs from A's zero-hop path to itself.

Keep reading