  Recently Csikv\'ari \cite{csik} proved a conjecture of Nikiforov concerning
the number of closed walks on trees. Our aim is to extend his theorem to all
walks. In addition, we give a simpler proof of Csikv\'ari's result and answer
one of his questions in the negative. Finally we consider an analogous question
for paths rather than walks.
