1: \begin{abstract}
2: We present an algorithm which takes as input a finite set $X$ of automorphisms of a simplicial tree, and outputs a generating set $X'$ of $\gen{X}$ such that either $\gen{X}$ is purely hyperbolic and $X'$ is a free basis of $\gen{X}$, or $X'$ contains a non-trivial elliptic element. As a special case, the algorithm decides whether a finitely generated group acting on a locally finite tree is discrete and free. This algorithm, which is based on Nielsen's reduction method, works by repeatedly applying Nielsen transformations to $X$ to minimise the generators of $X'$ with respect to a given pre-well-ordering. We use this algorithm to solve the constructive membership problem for finitely generated purely hyperbolic automorphism groups of trees. We provide a \textsc{Magma} implementation of these algorithms, and report its performance.
3: \end{abstract}
4: