# Relationship between number of nodes, elements and sides in a triangular 2D mesh

Say that N is the number of nodes, E the number of elements and S the number of sides in a triangular 2D mesh. Is there a relationship that links these quantities, possibly taking into account that some nodes are boundary nodes (Nb) and some are interior nodes (Ni)?

The answer can be restricted to Delaunay triangulation.

Yes there is a relationship, the Euler characteristic:

For a 2-dimensional orientable manifold with boundaries embedded in $\mathbb{R}^3$, the Euler characteristic is

$\chi = V - E + F = 2 - 2g - b$

where $V$ is the number of vertices, $E$ is the number of edges, $F$ is the number of faces, $g$ is the genus of the manifold, and $b$ is the number of borders of the manifold.

For example, a disk has no holes, and one border, so its Euler characteristic is $2 - 2(0) - 1 = 1$, thus we know that $V - E + F = 1$.

On a torus, $g = 1$ and $b = 0$, thus $\chi = 2 - 2(1) - 0 = 0$, so $V - E + F = 0$

The point being that this number is independent of the exact triangulation, it only depends on the topology of the manifold.

• So there are two numbers to determine: one is the Euler characteristic that is $\chi = 2 - 2g - b$ and pertains to the general topological features of the manifold in point. Then, there is a relationship $V - E + F = \chi$ that holds for all manifolds (that are 2-dimensional orientable and so forth). Is this understanding grossly right? Could you explain what is the genus of the manifold? – XavierStuvw Jan 17 '17 at 7:38
• Technically I have seen both $\chi = V - E + F$ and $\chi = 2 - 2g - b$ used as the definition of $\chi$, but I think the way that you're thinking about it makes the most sense. The genus is the number of "holes" in the manifold, so a torus (a donut shape) has one hole, this link has a genus two shape en.wikipedia.org/wiki/Genus-2_surface. Note that an annulus does not have genus one, just two borders – rviertel Jan 18 '17 at 14:06
• I also found this other post that addressed the same topic math.stackexchange.com/q/1541125/446004 – XavierStuvw Jun 12 '17 at 11:58