Faa' di Bruno's formula, lattices, and partitions

The coefficients of g(s) in expanding the rth derivative of the composite function g ○ f by Faa di Bruno's formula, is determined by a Diophantine linear system, which is proved to be equivalent to the problem of enumerating partitions of a finite set of integers attached to r and s canonically.