Graph Theory37 sections · 1633 units
Open in Course

Finding the Center

Peeling leaves iteratively

Start with all leaves (nodes with degree 11). Remove them. The remaining nodes form a smaller tree. Repeat: find the new leaves, remove them. Keep going until 11 or 22 nodes remain. Those are the centers.

This is like peeling an onion. The center is what is left at the core.

Implementation: use BFS-like layer removal, tracking degrees. When a node's degree drops to 11, add it to the next removal layer.