Explore layered graph searches with flexible controls. Track visit order, depths, and parent links precisely. Build cleaner paths, validate graphs, and understand traversal behavior.
Enter node labels and edges. Use commas or new lines for nodes, and one edge per line such as A-B or A->B.
This sample shows a small graph and the expected BFS layering from start node A.
| Node | Connected To | Level from A | Parent | Visit Order |
|---|---|---|---|---|
| A | B, C | 0 | Root | 1 |
| B | A, D, E | 1 | A | 2 |
| C | A, F | 1 | A | 3 |
| D | B | 2 | B | 4 |
| E | B, G | 2 | B | 5 |
| F | C, H | 2 | C | 6 |
| G | E | 3 | E | 7 |
| H | F | 3 | F | 8 |
Breadth first search expands the graph level by level using a first-in, first-out queue. The calculator uses these core relationships for every reachable node.
Because the queue processes older discoveries first, every node is visited in the smallest possible number of unweighted edges from the chosen start node.
It runs breadth first search on a custom graph, then reports visit order, levels, parent links, shortest unweighted path, reachable nodes, and queue activity.
Breadth first search is ideal for layer-based exploration. It finds the minimum edge count path in unweighted graphs and helps inspect connectivity clearly.
Yes. Choose the directed option when edge direction matters. In that mode, A->B does not automatically create B->A.
When a target is provided and reachable, the calculator traces parent links from the target back to the start node, then reverses that chain.
Max depth limits expansion beyond a chosen layer. Nodes deeper than that boundary remain unvisited, which is useful for controlled local searches.
Traversal order depends on the arrangement of each node’s neighbors. Sorting ascending, descending, or preserving input order can produce different valid BFS sequences.
Yes. Any listed node without connecting edges still appears in the node table and will be marked unreachable unless it is the selected start node.
The exports include the main summary, per-node metrics, and queue progression. That makes the output convenient for teaching notes, debugging, and documentation.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.