Could anyone give a counter example for that theorem :
A graph G has exactly one vertex of degree $1$, then it contains a cycle.
I am so confused. I wonder that may I give a counter example which considers trees.
Could anyone give a counter example for that theorem :
A graph G has exactly one vertex of degree $1$, then it contains a cycle.
I am so confused. I wonder that may I give a counter example which considers trees.
The counter example does not exist.
Let $v_1$ be a vertex of $G$ with degree $1$. Then, let $v_2$ be its neighbor. Because the degree of $v_2$ is more than $1$, $v_2$ has a neighbor that is not $v_1$. Let that neighbor be $v_3$.
Now, $v_3$ has a neighbor that is not $v_2$ (because the degree of $v_3$ is at least $2$) and is not $v_1$ (because $v_1$ has degree $1$). Let that neighbor be $v_4$.
Now, $v_4$ has a neighbor that is not $v_3$ or $v_1$. If the neighbor is $v_2$, then $v_2,v_3,v_4$ is a cycle. Otherwise the neighbor is $v_5$ and repeat until a cycle is found.