Help showing that every walk of length $k$ from $x$ to $y$ in a graph is a path.

696 Views Asked by At

If I were to suppose $x$ and $y$ are two vertices in the same connected component of a graph, and let $k$ be the distance between them, how would I prove that every walk of length $k$ from $x$ to $y$ in the graph is a path?

I am looking over my course notes but I am getting really confused between the different types of graphs and walks.

So, suppose $G$ is a graph which contains a unique path between any two vertices. G is clearly connected. $G$ cannot contain a cycle, because a cycle contains two distinct paths between any pair of vertices in it.

2

There are 2 best solutions below

0
On

Hint: if you have not proved this already, try to show that every $u$-$v$ walk in a graph contains a $u$-$v$ path. Given this, consider your walk from $x$ to $y$ of length $k$. This walk contains a path. If the path is not equal to the entire walk, what can you say about the length of the path? How might this contradict $d(x,y)=k$?

0
On

Hint: If a walk is not a path, there is a repeated vertex: Something like this: $x,a,b,...,i,...,i,...y$. But then the segment $i...i$ can be removed and replaced by a single $i$ giving a shorter walk from $x$ to $y$.