  We study the interplay between chip-firing games and potential theory on
graphs, characterizing reduced divisors ($G$-parking functions) on graphs as
the solution to an energy (or potential) minimization problem and providing an
algorithm to efficiently compute reduced divisors. Applications include an
"efficient bijective" proof of Kirchhoff's matrix-tree theorem and a new
algorithm for finding random spanning trees. The running times of our
algorithms are analyzed using potential theory, and we show that the bounds
thus obtained generalize and improve upon several previous results in the
literature. We also extend some of these considerations to metric graphs.
