  We describe a canonical decomposition of the cohomology of the Dani-Mainkar
metabelian Lie algebras associated with graphs. As applications, we obtain
explicit formulas for the third cohomology of any Dani-Mainkar Lie algebra and
for the cohomology in all degrees of Lie algebras associated with arbitrary
star graphs. We also describe a procedure to reduce the calculation of the
cohomology of solvable Lie algebras associated with graphs through the
Grantcharov-Grantcharov-Iliev construction to the cohomology of Dani-Mainkar
Lie algebras.
