Shortest Unweighted Path Finder
Breadth-first shortest path between two nodes of an unweighted graph given as an adjacency map; reports the hop count and node sequence, or no path.
Description
Breadth-first shortest path between two nodes of an unweighted graph given as an adjacency map; reports the hop count and node sequence, or no path.
Shortest Unweighted Path Finder is a focused tool for the following task. Breadth-first shortest path between two nodes of an unweighted graph given as an adjacency map; reports the hop count and node sequence, or no path. It reports Distance, Found, Path from the values you provide rather than inventing measurements, coefficients, or professional judgment that are not part of the input.
When to use Shortest Unweighted Path Finder
Use this graph algorithm when node identity, edge direction, edge weights, traversal ordering, and reachability semantics match the supplied representation.
- Graph
- Required object. Adjacency object mapping node names to neighbor arrays.
- Source
- Required string. Node where the search starts.
- Target
- Required string. Node to reach.
- Directed
- Optional boolean. Treat edges as directed when true; undirected by default.
The cited overview of Graph theory supplies background for the terminology and domain context used by this tool.1
How Shortest Unweighted Path Finder works
Breadth-first shortest path between two nodes of an unweighted graph given as an adjacency map; reports the hop count and node sequence, or no path. Inputs are interpreted exactly in the displayed units and the calculation returns the following fields without presentation rounding.
- Distance
- Returned integer. Edge count of the shortest path; -1 when unreachable.
- Found
- Returned boolean. True when the target is reachable from the source.
- Path
- Returned list. Nodes along the discovered shortest path, source first.
Limitations and assumptions
- Invalid weights, duplicate edges, disconnected components, cycles, tie-breaking, and graph size can change correctness, determinism, or resource use depending on the algorithm.
- Use finite inputs in the displayed units, preserve source measurements and assumptions, and independently verify consequential decisions.
Alternative or Complementary approaches
Visualize and test a small graph with known answers, then use a mature graph library when scale, negative weights, persistence, or advanced diagnostics matter.
References
-
Graph theory — Wikipedia contributors
Similar or alternative tools
- Graph Degree Calculator
Count each node's degree, in-degree, and out-degree over an adjacency map.
- Dijkstra Shortest Path Calculator
Find shortest paths from a start node over non-negative weighted directed edges given as [from, to, weight] rows.
- Graph Adjacency List to Matrix Converter
Convert an adjacency map into a square 0/1 matrix with sorted node order.