Baker and Norine introduced a graph-theoretic analogue of the Riemann-Roch
theory. A central notion in this theory is the rank of a divisor. In this paper
we prove that computing the rank of a divisor on a graph is NP-hard.
The determination of the rank of a divisor can be translated to a question
about a chip-firing game on the same underlying graph. We prove the NP-hardness
of this question by relating chip-firing on directed and undirected graphs