  We investigate an algebraic problem related to the determination of the
fundamental group of a class of spaces of configurations on surfaces. The
configuration spaces are spaces of points grouped into colors. Whether two
points are allowed to collide is determined by a graph, whose vertices are the
colors. In an earlier paper, the fundamental group of such graphs was described
as solutions to linear Diophantine equations.
  In this paper, the problem of describing the set of solution is reformulated
using a new type of cohomology groups of graphs. The dependence of the solution
on the number of points of each color is studied. The answer is formulated in
terms of graph theoretical properties.
