I encountered the following problem:
Let $G(V, E)$ be a finite undirected graph with $2n$ vertices, in which every connected component has an even number of vertices. Given that exactly $n$ of the vertices of $G$ have a degree at least $3$, prove that $G$ is cyclic.
My solution to the problem goes as follows:
Let $C$ denote the set of all connected components $G_i(V_i, E_i)$ of $G$ and $|C| = k$.
Let's assume that $G$ is acyclic. That means that every $G_i$ is a tree. Then, by adding exactly $k-1$ edges to $G$, we can connect all connected components in such a way (root of one to another one's leaf, ordering them in a sequence that way) that we obtain a tree $G'(V', E')$, where $V'= V$ and $|E'| = |E| + k - 1$.
But since $G'$ is a tree, that means that $$|E'| = |V'| - 1 = |V| - 1 = 2n - 1$$
By the handshake lemma we also know that $$2|E'| = \sum_{v\in V'}\deg v \ge \underbrace{3n}_{\substack{\text{atleast $n$}\\ \text{with degree $\ge$ 3}}} + \underbrace{n}_{\substack{\text{G' is connected}\\\text{$\Rightarrow$ the remaining $n$ have $\deg\ge 1$}}}$$
Thus we obtain that $$2(2n-1) \ge 4n \Leftrightarrow -1 \ge 0$$ which is a contradiction, hence $G$ can't be acyclic and contains a cycle.
Now, what bothered me about that is that I never used the given fact, that every $G_i$ had an even number of vertices, so I felt like I was missing something huge or my solution is flawed in a fundamnetal way... and I really banged my head against the wall hard enough, but was nonetheless unable to figure out what was wrong. So my question would be: am I missing something or is the mentioned statement in the problem simply redundant? And if it is redundand, how would one go about proving it? I really got stuck somewhere about there.
Many thanks in advance!
It seems even a little simpler than that, once we can show:
Lemma: Any tree has more leaf nodes than degree-3 and higher nodes.
Proof: Let a graph $G$ be a tree on $n$ vertices with $\ell$ leaf nodes and $h$ vertices of degree $3$ or more. Then $G$ has $n{-}1$ edges and by handshaking we know:
$2(n-1) = \sum d(v_i) \; \geq \; \ell + 2(n-\ell-h) + 3h = 2n-\ell+h,\quad$ so $\ell-2\geq h$ as required.
So the fact that half the nodes are degree $3$ or more shows that not all components are trees; i.e. that $G$ contains cycles. We could join components into a tree but it isn't really needed.
(thanks to jlammy for a compact statement of the lemma proof)