Centroid Decomposition — Interactive Visualization

Find the centroid → remove it (color by level) → recurse → build the centroid tree

Tree

Playback

Speed

State

Phaseidle Active size Centroid Level CT height0

Legend

active candidate chosen centroid level 0 level 1 level 2+
Pick a tree and press Step or Run. The size labels show subtree sizes in the current residual component; the centroid is where no piece exceeds half.

Original tree (residual sizes shown)

Centroid tree (built level by level)