Let $G$ be a graph where every vertex has degree 1 or 3. Let $X$ be the set of all vertices of degree 1. Suppose there exists a set of edges $Y$ such that by removing these edges from $G$, each component of the remaining graph is a tree which contains exactly one vertex in $X$. Determine $|Y|$ in terms of $|V(G)|$.
I really can't think of how to do this problem. Surely there are graphs that fulfill the requirements and both have the same $|V(G)|$ but different $|Y|$s? How can $|Y|$ be written solely in terms of $|V(G)|$?