Let p(m) (respectively, q(m)) be the maximum number k such that any tree with m edges can be transformed by contracting edges (respectively, by removing vertices) into a caterpillar with k edges. We derive closed-form expressions for p(m) and q(m) for all m≥1. The two functions p(n) and q(n) can also be interpreted in terms of alternating paths among n disjoint line segments in the plane, whose 2n endpoints are in convex position.
@article{arxiv.2109.05630,
title = {Caterpillars and alternating paths},
author = {Rain Jiang and Kai Jiang and Minghui Jiang},
journal= {arXiv preprint arXiv:2109.05630},
year = {2021}
}