Graph Theory37 sections · 1633 units
Open in CourseQuiz: Counting Paths Through Centroid
Knowledge check
Check Your Understanding
When counting paths of length through a centroid, you compute distances from the centroid to all nodes. Why must you subtract paths where both endpoints are in the same subtree?
- A.Those paths do not pass through the centroid, so they are invalid
- B.Those paths were counted in a previous recursion level
- C.Those paths are always shorter than
- D.The centroid node itself is not part of any valid path