Counting Holes

A surface with g holes carries exactly 2g independent loops that cannot be shrunk away. Draw loops on doughnuts and pretzels, slide them, add them, and find the 2g loops a computer picks out

Counting Holes

The holes of a shape are detected by loops that cannot be shrunk to a point without leaving the surface. On a surface with g holes there are exactly 2g independent such loops, and every other loop is a combination of them. This count is the first ingredient of the Hodge conjecture.

Loops That Will Not Shrink

Click points on a surface to draw a loop and read its class: how many times it goes round each tube and each hole. Then try the loop that separates two holes, which cannot be shrunk to a point yet has class 0.

a-loops: round a tubeb-loops: round a holeyour loop
…
class of the loop in the standard basis
—
rounding error: distance from whole numbers
124
edges in the loop
Finding the 4 harmonic forms that detect the holes… 0%

The class is computed, not guessed: the 4 harmonic forms (lessons 3 to 5 explain them) are integrated round your loop and round each standard loop, and the integrals solved for the coefficients. A flow with no swirl gives the same integral round any two loops of the same class, exactly, on this mesh as in theory, so the coefficients come out whole numbers to within rounding. The loop that separates two holes cannot be shrunk to a point, yet its class is 0: that is the difference between deforming loops (homotopy) and the coarser counting by classes (homology), and the Hodge conjecture is about classes.

Go deeper:Loops up to deformation, and up to boundaries

Classes of loops. Two loops are in the same homology class when one can be deformed into the other, or more generally when together (one of them reversed) they make up the boundary of a piece of the surface. Loops can be added by going round one and then the other, so the classes form a group, the first homology group H1. For the closed surface with g holes it is ℤ2g: every loop has a class n1a1 + m1b1 + … + ngag + mgbg with whole numbers ni, mi, and these 2g loops are independent. Its rank, 2g, is the first Betti number b1.

The standard basis. The loops ai (round the tube of the i-th ring) and bi (round the i-th hole) meet in a pattern that is the same for every g: ai crosses bi once and misses everything else. Counted with signs, ai·bj = δij (1 if i = j, 0 otherwise) and ai·aj = bi·bj = 0. The third demo computes these signed counts on a torus.

Homotopy is finer than homology. The waist between two holes cuts the surface into two pieces, each a torus with a disc removed, and it is the edge of either piece. So its class is 0. But it cannot be shrunk to a point: deforming loops without cutting keeps more information (the fundamental group, which for g ≥ 2 is not even commutative). The Hodge conjecture, like the integrals of the next lesson, sees only classes.

History. Henri Poincaré introduced homology and the Betti numbers in “Analysis Situs” (1895), naming the numbers after Enrico Betti. The demo finds classes with integrals of flows rather than by cutting and gluing; why that works is the subject of Integrals That See Holes. See also: Homology in the Algebraic Topology module, for homology of any complex built from triangles.

Euler’s Count

Choose the number of holes and the fineness of the mesh, then press Play to grow two trees on it. The edges left over always number 2g, the same answer Euler’s V − E + F gives, however V, E and F change.

a1b1a1−1b1−1a2b2a2−1b2−1
8 edges, glued in pairs arrow to arrow; all 8 corners become one point.
tree of vertices (1401 of V − 1)tree of faces, across edges (2807 of F − 1)edges left over (4 of 4)the loop each one closes (one colour each)
1402
vertices V
4212
edges E
2808
faces F
−2
V − E + F
2
g from V − E + F = 2 − 2g
4
edges left over: E − (V − 1) − (F − 1)
Euler’s route: (2 − (−2)) / 2 = 2, so 2g = 4. Tree route: 4212 − 1401 − 2807 = 4 edges left over, closing 4 loops. The two counts agree, and they keep agreeing as the fineness changes V, E and F.

Press Play to grow the trees: first a tree through every vertex (V − 1 edges, no loops), then a tree through every face that crosses only edges the first tree missed (F − 1 edges). What is left over is exactly 2g edges, and each one closes a loop through the first tree. These loops are a computer’s choice of 2g loops, valid but jagged; any 2g independent loops would do. The polygon beside shows the same count another way: its 4g edges, glued in pairs, make the surface.

Go deeper:Euler’s formula, and why the trees leave 2g edges

Euler and L’Huilier. Leonhard Euler stated in the 1750s that a polyhedron with V corners, E edges and F faces has V − E + F = 2. In 1813 Simon L’Huilier noticed that polyhedra with tunnels through them break the rule, and that the corrected formula is V − E + F = 2 − 2g for a surface with g holes. The number V − E + F, the Euler characteristic, does not depend on how the surface is cut into triangles, which is why the counts in the demo stay put while the mesh is refined.

Tree and cotree. A tree through all V vertices has V − 1 edges and no loops; shrinking it to a point loses nothing. A tree through all F faces, crossing only edges the first tree missed, has F − 1 edges; gluing the triangles along those edges builds one disc, a polygon. What is left is the polygon’s boundary with its edges glued in pairs and all its corners pulled to the single point the vertex tree became: a bouquet of circles joined at one point. Counting edges, E − (V − 1) − (F − 1) = 2 − (V − E + F) = 2g circles, one loop for each leftover edge.

One polygon per surface. Every closed orientable surface is one polygon with its edges glued in pairs, and it can be brought to the standard form beside the surface: 4g edges read a1b1a1−1b1−1 … agbgag−1bg−1 (and a a−1 for the sphere). This is the classification of closed orientable surfaces: two of them are the same, up to stretching, exactly when they have the same genus.

A count that comes back. The colours are chosen for a reason. The split E = (V − 1) + (F − 1) + 2g is the same count as the split of a flow on the mesh into a gradient part (one number per vertex, less a constant), a rotation part (one number per face, less one) and a harmonic part of dimension 2g, which Splitting a Flow in Three computes. See also: Building Spaces in the Algebraic Topology module.

Adding Loops

Set the classes of two straight loops on a flat torus and compare the crossings counted on the picture with the formula. Bend the second loop to add crossings, then press Play to join the two loops and straighten them into their sum.

first loopsecond looptheir sum (0, 3), dashed until Playcrossing +crossing −
The first loop, class (1, 1)
m₁1
n₁1
The second loop, class (−1, 2)
m₂−1
n₂2
3
crossings counted on the picture
3
|m₁n₂ − m₂n₁|
3
crossings counted with sign
3
m₁n₂ − m₂n₁
Counted on the picture: 3 crossings, all of sign +. The formula gives |m₁n₂ − m₂n₁| = |1·2 − −1·1| = 3.

Opposite sides of the square are glued (the matching arrows), so a line leaving one side comes back on the other; the faint copies around it show the neighbouring squares. A loop of class (m, n) goes m times across and n times up before it closes. A crossing is + (green) when the second loop crosses the first from its right to its left, − (rose) otherwise. Play joins the two loops at a crossing into one loop and slides it, through closed loops all the way, to the straight loop of the sum (it joins the straight versions, so it ignores any bend): classes add like vectors.

Go deeper:Classes add like vectors, and cross like a determinant

The lattice of loops. On the torus, a loop that goes m times across and n times up has class (m, n), and going round one loop and then another adds their classes. So the classes of loops on a torus are the lattice ℤ², and the straight loop of class (m, n) is the one that crosses the square in the direction (m, n). A class (m, n) with a common factor k is k times a primitive class, and its straight loop is a simple loop traversed k times.

The intersection number. Two straight loops of classes (m1, n1) and (m2, n2) cross exactly |m1n2 − m2n1| times, the area of the parallelogram they span, and always in the same direction. Counted with signs, the number m1n2 − m2n1 does not change when either loop is deformed: a bend can only create or remove crossings in pairs of opposite sign. So it is a function of the classes, bilinear and antisymmetric.

On any surface. On the surface with g holes the same signed count gives a pairing on ℤ2g with ai·bi = 1, bi·ai = −1 and every other pair of basis loops 0: a symplectic form. It returns in Integrals That See Holes as Riemann’s bilinear relation, which writes the integral of a product of two flows as a sum of products of their periods round ai and bi, and in Why Integers Are Not Enough, where whole-number classes behave differently from fractional ones.

Key Takeaways

  • A loop’s class records how it winds round the holes; loops that bound a piece of the surface have class 0.
  • A closed surface with g holes has exactly 2g independent loop classes, a₁, b₁, …, ag, bg.
  • Euler’s V − E + F = 2 − 2g and the 2g edges a tree and a cotree leave over give the same count on every mesh.
  • Classes add like vectors, and two classes cross m₁n₂ − m₂n₁ times counted with sign, however the loops are bent.

Spot a mistake or have an idea?

Search