  A scheme is developed which enables one to trace backwards in time the cosmic
density and velocity fields, and to determine accurately the current-epoch
velocity field from the current-epoch density field, or vice versa. The scheme
implements the idea of Giavalisco \etal\ (1993) that the principle of least
action should be used to formulate gravitational instability as a two-point
boundary-value problem. We argue that the Eulerian formulation of the problem
is to be preferred to the Lagrangian one, on grounds of computational
simplicity, of ease of interfacing with observational data, and of internal
consistency at early times. The scheme is successfully tested on an exact
solution in one dimension, and on currently Gaussian fields in one and two
dimensions. The application of the scheme to real observational data appears to
be eminently feasible, though computationally costly.
