A general direct method, alternative to KAM theory, apt to deal with s
mall divisor problems in the real-analytic category, is presented and
tested on several small divisor problems including the construction of
maximal quasi-periodic solutions for nearly-integrable non-degenerate
Hamiltonian or Lagrangian systems and the construction of lower dimen
sional resonant tori for nearly-integrable Hamiltonian systems. The me
thod is based on an explicit graph theoretical representation of the f
ormal power series solutions, which allows to prove compensations amon
g the monomials forming such representation.