  There is remarkable relation between self-dual Yang-Mills and self-dual
Einstein gravity in four Euclidean dimensions. Motivated by this we investigate
the Spin(7) and G_2 invariant self-dual Yang-Mills equations in eight and seven
Euclidean dimensions and search for their possible analogs in gravitational
theories. The reduction of the self-dual Yang-Mills equations to one dimension
results into systems of first order differential equations. In particular, the
Spin(7)-invariant case gives rise to a 7-dimensional system which is completely
integrable. The different solutions are classified in terms of algebraic curves
and are characterized by the genus of the associated Riemann surfaces.
Remarkably, this system arises also in the construction of solutions in gauged
supergravities that have an interpretation as continuous distributions of
branes in string and M-theory. For the G_2 invariant case we perform two
distinct reductions, both giving rise to 6-dimensional systems. The first
reduction, which is a complex generalization of the 3-dimensional Euler
spinning top system, preserves an SU(2) X SU(2) X Z_2 symmetry and is fully
integrable in the particular case where an extra U(1) symmetry exists. The
second reduction we employ, generalizes the Halphen system familiar from the
dynamics of monopoles. Finally, we analyze massive generalizations and present
solitonic solutions interpolating between different degenerate vacua.
