  Current models of galaxy formation applied to understanding the large-scale
structure of the universe have two parts. The first is an accurate solution of
the equations of motion for the dark matter due to gravitational clustering.
The second consists of making physically reasonable approximations to the
behavior of baryons inside dark matter halos. The first uses large,
computationally intensive, $n$-body simulations. We argue that because the
second step is, at least at present, uncertain, it is possible to obtain
similar galaxy distributions without solving the first step exactly. We
describe an algorithm which is several orders of magnitude faster than n-body
simulations, but which is, nevertheless, rather accurate. The algorithm
combines perturbation theory with virialized halo models of the nonlinear
density and velocity fields. For two- and three-point statistics the resulting
fields are exact on large scales, and rather accurate well into the nonlinear
regime, particularly for two-point statistics in real and redshift space. We
then show how to use this algorithm to generate mock galaxy distributions from
halo occupation numbers. As a first application, we show that it provides a
good description of the clustering of galaxies in the PSCz survey. We also
discuss applications to the estimation of non-Gaussian contributions to error
bars and covariance matrix of the power spectrum, in real and redshift space,
for galaxies and dark matter. The results for the latter show good agreement
with simulations, supporting the use of our method to constrain cosmological
parameters from upcoming galaxy surveys.
