Start
End
Frontier
Settled
Path
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.
Discrete mathematics turns real networks — road maps, circuit boards, exam schedules, computer networks — into graphs: nodes and weighted edges. This simulation builds a random connected graph in 3D and runs two classic algorithms on it live. In shortest path mode, Dijkstra's algorithm expands outward from a start node, settling the closest unvisited node at each step until it reaches the end node and reveals the cheapest route. In graph coloring mode, a greedy algorithm assigns each node the lowest color number that keeps it different from all its already-colored neighbours, approximating the graph's chromatic number. Adjust node count and edge density to see how structure changes both problems.