  The discrete logarithm problem in a finite group is the basis for many
protocols in cryptography. The best general algorithms which solve this problem
have time complexity of $\mathcal{O}(\sqrt{N})$, where $N$ is the order of the
group. If the order $N$ is unknown, an easy modification of such algorithms
gives a complexity of $\mathcal{O}(\sqrt{N}\log N)$. These algorithms require
the inversion of some of the group elements, and so are not directly applicable
to a semigroup, where inverses are not available. For semigroups, probabilistic
algorithms with similar time complexity have been proposed. The main result of
this paper is a deterministic algorithm for solving the discrete logarithm
problem in a semigroup. Specifically let $x$ be an element in a semigroup
having finite order $N_x$. If $y\in \langle x \rangle $ is given the paper
provides an algorithm having time complexity $O(\sqrt{N_x}\log N_x)$ to find
all natural numbers m with $x^m=y$. The paper also give an analysis of the
success rates of the existing probabilistic algorithms, which were so far only
conjectured or stated loosely.
