The decomposition tree has depth because each centroid removal halves the maximum component size. If you start with nodes, after one level you have components of size at most . After two levels, at most . After levels, at most . When the size reaches , you stop. This logarithmic depth is why Centroid Decomposition is efficient. Quiz: For a tree with nodes, what is the maximum depth of the decomposition tree?
Use the formula .
Space complexity is for the data structures used.