Graph Theory37 sections · 1633 units
Open in Course

Core idea 2 - Walk to Heavy Subtree

(Move toward balance)

Start at the root. If it is a centroid, you are done. If not, exactly one subtree has more than n/2n/2 nodes. Why?

Because the root itself does not qualify, so one side must be heavy. Move into that heavy subtree and repeat. You will eventually reach a node where no subtree is heavy. That is a centroid. The walk cannot go on forever. This works because the heavy subtree keeps getting smaller as you walk deeper. Each step moves you closer to the balance point.