The number of edges in a given graph

150 Views Asked by At

For a grid graph of size $n$ in $d$ dimensions, I would like to count the number of edges connecting two vertices at distance $1$ from each other.

I thought it is $nd$ edges but it seems that I mixed it up with the number on a torus, the number on the $d-$dimensional grid should be much more!

Could you kindly help me to understand the difference and to find the number? thanks

1

There are 1 best solutions below

2
On

Let $E(n,d)$ be the number of edges in the $d$-dimensional grid graph $G(n,d)$ with all sides having $n$ vertices. It should be easy to visualise the construction of $G(n,d)$ as $n$ copies of $G(n,d-1)$, and in each of the $n^{d-1}$ sets of $n$ corresponding vertices, $n-1$ edges linking them together. Thus we have $$E(n,d)=nE(n,d-1)+(n-1)n^{d-1}$$ Couple this with the easy $E(n,1)=n-1$, and it should be easy to prove that $E(n,d)=dn^{d-1}(n-1)$.