[Math] Does there exist a path of even length between two vertices of a connected non-bipartite graph

bipartite-graphsgraph theory

Suppose $G$ is an undirected graph which is non-bipartite and is connected.

Is there a way to show that given two vertices $a$ and $b$, there exists a path of even length between the two ?

I tried to use the fact that there exist odd length cycles in a non-bipartite graph but couldn't use it to prove above statement .

Best Answer

Assuming a path allows crossing the same edges and vertices:

We are given vertices $a$ and $b$. We know that the graph contains a cycle of odd length. Let $c$ be a vertex on that cycle. Further, since the graph is connected, there exist paths $a\rightarrow c$ and $c\rightarrow b$. If the total length of the path $a\rightarrow c \rightarrow b$ is even, we are done. If not then consider the path $a\rightarrow c \rightarrow (\text{odd cycle back to $c$}) \rightarrow b$.