Abstract. We give a polynomial-time algorithm of computing the classical Hurwitz numbers Hg,d, which were defined by Hurwitz 125 years ago. We show that the generating series of Hg,d for any fixed g > 2 lives in a certain subring of the ring of formal power series that we call the Lambert ring. We then define some analogous numbers appearing in enumerations of graphs, ribbon graphs, and in the ...