PPolySim OS
For Educators · Graph Coloring

Graph Coloring for a subway map

Built for educators teaching it to a class. Drop a live demo into a lecture or assign it as a shareable link — no lab installs. Simulate a subway map live below — adjust the inputs and watch it respond, right in your browser.

Graph ColoringLive

Controls

Presets

Graph coloring assigns colors to nodes so that no edge connects two of the same color, using as few colors as possible. The greedy algorithm colors nodes in order, picking the lowest color not used by a neighbor. It models scheduling exams, assigning radio frequencies, and register allocation in compilers — all cases where conflicting items must be separated.

▶ Run in Python

Data Inspector

Nodes10
Colors used0
Methodgreedy

Governing equation

Reading this result: Two colors suffice here, which means the graph has no odd cycle — it is bipartite, the easiest case to schedule with zero conflicts.

Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.

or unlock everything with Pro →

More with Graph Coloring

Frequently asked questions

Is this good for educators?
Yes — this version of "Graph Coloring for a subway map" is framed for educators teaching it to a class. Drop a live demo into a lecture or assign it as a shareable link — no lab installs.
Do I need to install anything?
No. It runs in any modern browser, free, with no account required.