We answer the following question: given any n ∈ ℕ , which is the minimum number of endpoints e n of a tree admitting a zero-entropy map f with a periodic orbit of period n ? We prove that e n = s 1 s 2 … s k − ∑ i = 2 k s i s i + 1 … s k , where n = s 1 s 2 … s k is the decomposition of n into a product of primes such that s i ≤ s i + 1 for 1 ≤ i < k . As a corollary, we get a criterion to decide whether a map f defined on a tree with e endpoints has positive entropy: if f has a periodic orbit of period m with e$"> e m > e , then the topological entropy of f is positive.