  In this paper we present efficient algorithms for the computation of several
invariant objects for Hamiltonian dynamics. More precisely, we consider KAM
tori (i.e diffeomorphic copies of the torus such that the motion on them is
conjugated to a rigid rotation) both Lagrangian tori (of maximal dimension) and
whiskered tori (i.e. tori with hyperbolic directions which, together with the
tangents to the torus and the symplectic conjugates span the whole tangent
space). In the case of whiskered tori, we also present algorithms to compute
the invariant splitting and the invariant manifolds associated to the
splitting. We present them both for the case of discrete time and for
differential equations. The algorithms are based on a Newton method to solve an
appropriately chosen functional equation that expresses invariance. The
algorithms are efficient: if we discretize the objects by $N$ elements, one
step of the Newton method requires only O(N) storage and $O(N \ln(N))$
operations. Furthermore, if the object we consider is of dimension $\ell$, we
only need to compute functions of $\ell$ variables, independently of what is
the dimension of the phase space. The algorithms do not require that the system
is presented in action-angle variables nor that it is close to integrable. The
algorithms are backed up by rigorous \emph{a-posteriori} bounds which state
that if the equations are solved with a small residual and some explicitly
computable condition numbers are not too big, then, there is a true solution
which is close to the computed one. The algorithms apply both to primary (i.e
non-contractible) and secondary tori (i.e. contractible to a torus of lower
dimension, such as islands). They have already been implemented. We will report
on the technicalities of the implementation and the results of running them
elsewhere.
