  We present a complete solution to the so-called tennis ball problem, which is
equivalent to counting lattice paths in the plane that use North and East steps
and lie between certain boundaries. The solution takes the form of explicit
expressions for the corresponding generating functions. Our method is based on
the properties of Tutte polynomials of matroids associated to lattice paths. We
also show how the same method provides a solution to a wide generalization of
the problem.
