Graph Theory37 sections · 1633 units
Open in Course

Quiz: Counting Paths Through Centroid

Knowledge check

Check Your Understanding

When counting paths of length kk 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?

  1. A.Those paths do not pass through the centroid, so they are invalid
  2. B.Those paths were counted in a previous recursion level
  3. C.Those paths are always shorter than kk
  4. D.The centroid node itself is not part of any valid path
Start the roadmap to answer the quizzes and solve the challenges