A solution to the tennis ball problem

We present a complete solution to the so-called tennis ball problem, which is equivalent to counting the number of 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.