If there are h such distinct endpoints, B must contain these h vertices and the vertex introduced at B, for a total size of h + 1 vertices.
the width of T is at least h. The combination of Lemmas 6 and 7 leads to an efficient algorithm for finding the relative treewidth of G with respect to π, reported below.