  We present an algorithm for the following problem. Given a triangulated
3-manifold M and a (possibly non-simple) closed curve on the boundary of M,
decide whether this curve is contractible in M. Our algorithm runs in space
polynomial in the size of the input, and (thus) in exponential time. This is
the first algorithm that is specifically designed for this problem; it
considerably improves upon the existing bounds implicit in the literature for
the more general problem of contractibility of closed curves in a 3-manifold.
The proof of the correctness of the algorithm relies on methods of 3-manifold
topology and in particular on those used in the proof of the Loop Theorem. As a
byproduct, we obtain an algorithmic version of the Loop Theorem that runs in
polynomial space, and (thus) in exponential time.
