  We study n-point tree amplitudes of N=4 super Yang-Mills theory and N=8
supergravity for general configurations of external particles of the two
theories. We construct generating functions for n-point MHV and NMHV amplitudes
with general external states. Amplitudes derived from them obey SUSY Ward
identities, and the generating functions characterize and count amplitudes in
the MHV and NMHV sectors. The MHV generating function provides an efficient way
to perform the intermediate state helicity sums required to obtain loop
amplitudes from trees. The NMHV generating functions rely on the MHV-vertex
expansion obtained from recursion relations associated with a 3-line shift of
external momenta involving a reference spinor |X]. The recursion relations
remain valid for a subset of N=8 supergravity amplitudes which do not vanish
asymptotically for all |X]. The MHV-vertex expansion of the n-graviton NMHV
amplitude for n=5,6,...,11 is independent of |X] and exhibits the asymptotic
behavior z^{n-12}. This presages difficulties for n > 12. Generating functions
show how the symmetries of supergravity can be implemented in the quadratic map
between supergravity and gauge theory embodied in the KLT and other similar
relations between amplitudes in the two theories.
