Skip to content
Algorithmics · FIB-UPC

Graph Phase Transitions

Explore how random graphs transition from connected to disconnected as you remove nodes or edges. Generate binomial (Erdős–Rényi), geometric, or grid graphs, apply percolation, and watch the phase transition happen in real time.

📊
Phase Transitions in Random Graphs

Generate random graphs and apply percolation (random removal of nodes or edges) to observe phase transitions — the sharp change from connected to disconnected as the retention probability drops. Each connected component is shown in a different color.

Graph family:
Grid side:10×10 = 100 nodes
Percolation:
Retention probability:1.00
Phase transition curve:Sweeps retention probability 0→1, measuring P(connected) and P(all complex) over multiple trials.

About this project

Originally a Python project for the Algorithmics course at FIB-UPC, studying phase transitions in random graphs using NetworkX. This full-stack web app wraps the original Python/NetworkX logic in a FastAPI backend with a Lit (Web Components) + Canvas + D3.js frontend for interactive graph visualization and Monte Carlo phase transition charts.