Windows Forms application for creating graphs and visualizing classic graph algorithms step by step.
The project lets you draw nodes and edges interactively, configure directed/undirected and weighted graphs, then run multiple algorithms with visual feedback.
- Interactive graph editor (add, move, and delete nodes/edges)
- Support for both undirected and directed edges
- Manual edge weight editing
- Random weight generation in a user-defined range
- Start and end node selection
- Algorithm explanation panel
- Step-by-step controls for selected algorithms (
Forward,Backward,Stop) - Save/load graph states to/from XML, with generated image thumbnails
-
Depth-First Search (DFS)
- Traversal starts from the selected start node.
- Supports step-by-step forward/backward replay.
-
Breadth-First Search (BFS)
- Traversal starts from the selected start node.
- Uses forward stepping.
-
Hamiltonian Route (Path)
- Backtracking-based path search.
- Displays animated result if a valid path is found.
-
Dijkstra Shortest Path
- Requires both a start node and an end node.
- Uses edge weights and highlights the shortest path.
- Assumes positive edge weights.
-
Boruvka Minimum Spanning Tree
- Works on weighted, undirected graphs.
- Disabled when directed edges are present.
-
Topological Sort
- Works on directed acyclic graphs (DAGs).
- Blocked if the graph has cycles or undirected edges.
- Windows OS
- .NET 6 SDK or newer with .NET 6 targeting pack
- Click
Add Nodeto place nodes on the canvas. - Click
Add EdgeorAdd Directed Edge, then drag from one node to another. - (Optional) Click
Add Weight, then click an edge and enter a positive integer. - Select a start node with
Select Starting Point. - (For Dijkstra) select an end node with
Select End Point. - Choose an algorithm from the dropdown.
- Click
Start. - Use
Forward/Backward/Stopwhere supported.
Before saving or loading:
- Click
Select Folder. - Choose a directory.
When saving a graph named Example, the app generates:
Example.bmp(graph snapshot)Example nodes.xml(serialized nodes)Example edges.xml(serialized edges)
Loading is done from thumbnail previews generated from the .bmp files in the selected folder.
This project is licensed under the MIT License. See LICENSE for details.