Find cut vertex in tree with constraint on the size of largest component I have a connected and undirected graph without cycles (i.e. a tree), and I am trying to find a single cut vertex that, when removed, disconnects the graph into a set of connected components. The largest of these components should not have size greater than some threshold. So if one such cut vertex exists, I need to find an algorithm that returns it (possibly in linear time). The only approach I could think of is the following:


remove from the graph all vertices that have only one outgoing edge (i.e. one neighbour); these are the leaves of the tree
on the resulting graph, repeat the process until only one vertex remains; this should be the cut vertex
take back the original graph and remove the cut vertex. Check the size of the largest connected component


This algorithm should run in linear time, but I am not sure it will work in any situation. What's your opinion? The other thing I could think of is that the cut vertex should always be in the minimum vertex cover of the graph, although I don't really know where to go from here...
Your algorithm may not work. What you describe, in fact, is an algorithm for computing the center of the tree. The following is a brief theory behind this algorithm.
The distance, denoted by $dist(v,u)$, between two vertices $u$ and $v$ is defined as the shortest path between $u$ and $v$. The eccentricity of a vertex $v$ is defined as
$$ \epsilon(v)=\max_{u \in V}\{dist(v,u)\}$$
In simple words $\epsilon(v)$ is the maximum among all distances from the $v$ to a vertex $u$.
We define the center of a graph $G$ is the set of vertices with minimum eccentricity. Observe that step-by-step leaf removal in your algorithm does not change the eccentricity of the center.
Your algorithm essentially computes the center of the tree but the following is a counterexample. This tree

has the center $v_c$. Your algorithm will return $v_c$ as the cut vertex. But if your threshold is $3$ then the optimal cut vertex would be the vertex $u$.