Graphs - Proof that when all vertices of G have degree <=2, then each component of G is a path or a cycle.

421 Views Asked by At

I am absolutely new to graph theory, so sorry if it seems way basic.

I have been trying to prove it by contradiction, saying that G has a component C that is not a path or a cycle.

In that case, the only possibility is C being a tree? If that's the case, how do I prove that a tree that is not also a path has a vertice with degree >3?

1

There are 1 best solutions below

2
On

First, it's enough to prove that if $G$ is connected and the maximum degree of $G$ is $\le 2$ then $G$ is a path or a cycle. (Or $G$ consists of a single vertex.) First suppose that every vertex is of degree $2$. Then the graph has an Euler circuit. Complete the proof in this case by arguing that the circuit must be a cycle.

Otherwise, consider a path of maximal length in $G$. Say the end vertices are $x$ and $y$. Each of $x$ and $y$ is of degree one, or we could build a longer path. If the path from $x$ to $y$ is all of $G$ we are done, so suppose there is some vertex $z$ not on the path, and deduce a contradiction.