Help me demonstrate this or there is a counterexample?

Let $T(V,E)$ be a tree with $|T| \geq 2$ and a path $P{(u_0,u_1,u_2,...,u_n)}$. The longest path in a tree has $d(u_0) = d(u_n) = 1$.

  • $\begingroup$ Assume this isn't true, where $d(u_0) > 1$ or $d(u_n) > 1$, then you can add at least one more to the length of the path with $P(u_{-1}, u_0, . . . , u_n)$ or $P(u_0, . . . , u_n, u_{n+1})$. $\endgroup$ May 3, 2017 at 1:29

1 Answer 1


I'm guessing that $d(v)$ is the degree of $v$, in which case this is fairly straightforward to prove. Here's some intuition: the longest path cannot end with a vertex of degree 2 or more, because then the extra neighbor could be used to lengthen the path. I'll leave the specifics of the proof to you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.