This probably a more advanced answer than you're looking for, but one answer is the cohomology of a variety called a "hypertoric variety" constructed from the graph in a slightly subtle way. You can read more about this in papers by [Hausel and Sturmfels][1] and [Proudfoot and myself][2]. You should be warned at all those papers talk about hyperplane arrangments; you should turn a graph into a hyperplane arrangment by taking a variable for each vertex, and a hyperplane for each edge given by equating the variables at opposite ends. One problem with this approach is that you can only see one variable at a time; T(x,1) is the Poincare polynomial of one variety (I think the graphical hypertoric variety) and T(1,y) is the Poincare polynomial for another (the cographical hypertoric variety). [1]: http://front.math.ucdavis.edu/0203.5096 [2]: http://front.math.ucdavis.edu/0411.5350