PPolySim OS

Minimum Spanning Tree

Connect everything for the least cost. A minimum spanning tree links every node with no wasted edges and no loops — the cheapest possible backbone.

Minimum Spanning TreeLive

Controls

Presets

A minimum spanning tree connects every node with the least possible total edge weight and no cycles. Kruskal's algorithm sorts all edges and adds the cheapest that does not form a cycle, using a union-find structure to detect them. It designs efficient road, power, and network layouts that reach everywhere for the lowest cost.

▶ Run in Python

Data Inspector

Nodes9
Tree edges8
Total weight0

Governing equation

Reading this result: A spanning tree over these 9 nodes always uses exactly 8 edges with no cycles — Kruskal keeps adding the cheapest edge that joins two separate groups until every node is connected.

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

or unlock everything with Pro →
★ Sign in to save this setup
Save your tuned setup, or drop this simulation into your own site, docs, or course page.

How it works

Kruskal's algorithm sorts every edge by weight and greedily adds the cheapest that does not create a cycle, using a union-find structure to detect cycles instantly. The result spans all nodes at minimum total cost. It designs efficient road, pipeline, power, and telecom networks, and underlies clustering algorithms.

Ask the AI about this model

The math, the assumptions, real-world uses, or a code translation — explained for this exact simulation.

More Graph Theory simulations

Frequently asked questions

Is this minimum spanning tree Kruskal tool really free?
Yes. Minimum Spanning Tree runs entirely in your browser using your device's own compute, so local use is free forever. You only pay Compute Tokens if you scale a job to the cloud.
Do I need to install anything?
No. Everything runs client-side in a modern browser — no downloads, no license, no account required to start.
Can I save or share my simulation?
Create a free account to save projects, and use a shareable embed or minted DOI to publish a live, interactive version anywhere.
How accurate are the results?
The solver uses established numerical methods, but results are for research and educational purposes and should be validated against experiment or professional review before you rely on them.