A characterisation of virtually free groups
  We prove that a finitely generated group $G$ is virtually free if and only if there exists a generating set for $G$ and $k > 0$ such that all $k$-locally geodesic words with respect to that generating set are geodesic. 
Robert H. Gilman, S. Hermiller, Derek F. Holt and Sarah Rees
math.GR