Graph theory proof problem



Hi,

I'm trying to prove the following:

For a graph G having average degree d(G) and girth (min. length of a
cycle in G) g(G), prove that the number of vertices in G is equal to:

1 + d * sum_{0}^{r-1} (d-1)^{i} if g(G) = 2*r+1 (odd)
2*sum_{0}^{r-1} (d-1)^{i} if g(G) = 2*r (even)

Thanks,
Vinay

.