Chomology for kids, part 2: computing homology groups
Before we get to the fun, let me thank everybody who gave feedback, of which there has been a lot. And important criticism from people who know much better than me. My short list of homotopy groups of the sphere was completely borked (twitter, twitter). Thanks Yuhang Chen, and Rogier Brussee!
and the homotopy groups of the 2-torus commute, so they are the same as as the homology groups (twitter). Thanks Ward Beullens!
and my claim that homology and torsion classify manifolds lead much deeper (twitter) than I had expected. Also: I was quite wrong. I seem to have conflated Whitehead's theorem with Hurewicz' theorem, and imagined something too nice to be true. Special thanks to John C. Baez, Daniel Litt, and Rogier Brussee for their help!
I will look into these things and see if I can put them in shape for the next installment. Some links:
Join the discussion on twitter, maybe here: twitter. Questions welcome!
Computing the homology of a graph
The following example is from a 2-part video lecture by Norman Wildberger, "An introduction to homology". He does all computations slowly and in full detail. My notes follow his account rather closely, but all errors are mine. (youtube, youtube)
Cycles and boundaries
We will be obsessing over cycles and boundaries, because they produce closed surfaces. Let's first introduce a hierarchy of labels for vertices , edges , surfaces , and so on. Maybe like this:
Any formal linear combination of symbols from one of these sets is called a chain. Here's an example chain made of edges:
'Formal' means that we won't actually fill in numbers for the symbols, as these summands aren't variable names standing for numbers, but symbols to label geometric objects! But they will behave very much like sums of variables, there's a zero element, and we have commutativity:
Next, we package all the information on how all those simplices fit together as a family of functions, called boundary operators . For any collection of edges it should be able to produce a formal linear combination of vertices, for any face chain an edge chain, and for any n-simplex chain an (n-1)-simplex chain.
There's some wiggle room left. As we will see later, we want some things to sum up to zero, and for that we need minus signs! Remember the meaning of all this, we want to grab the simplex by its boundary, so a triangle should be mapped to the sum of its edges . Tracing out the edges of a triangle puts them in order, tracing them backwards should give almost the same expression, but with minus signs.
To do that, we need to decide which sign each element gets, and then we're good to go! You can think of these signs as orientations, like putting arrowheads on the edges, picking front and back for every face, and so on. We will be summing over everything in the end, so it doesn't matter which way we put the orientations, and we also don't need to match up, say, faces' and edges' orientations, which may impossible anyhow.
Puzzle: Find a triangulation for a physical surface where all the edge's orientations match with all the face's orientations. Find one where that's impossible.
Get the pattern? Edges are always like 'head minus tail', and I've labeled the blue and red cycles A and B. Now, if we substitute the edges into, say, the sum it all adds up to zero! That's a general pattern: the boundary of a boundary is zero. That's because it is a cycle! And this is what will allow us to search for cycles using linear algebra: by solving systems of linear equations!
Definition: A chain in is a cycle when its boundary is zero.
In general, an edge chain is a linear combination or weighted sum of edge names. Using greek letters for the weights which are actually numbers it looks like this :
One cool thing about is that it is a linear operator! It means, we can rewrite the above to:
And now we can expand the 's, rearrange for clarity, and set to zero:
We have no reason to assume that the latin labels for vertices could collude to become zero, so this can only be true if all summands become zero, which we can write like so:
Now there's our system of linear equations, and it's underspecified! So the solution will be a subspace (called null space)!
It is two dimensional, and has a basis:
And and are integer parameters. That's the reason why we say that the first homology group is the two-dimensional group .
Is the same as ?
You may wonder why the cycles as a group are often denoted as while the homology group is stated . This is confusing, why aren't these groups written as cartesian product, like ?
Well, that sign means direct sum, and in the context of abelian groups it's the same as the direct product. And the direct product turns out to be a cartesian product. (Thanks to Carles Sáez on twitter)
Cycles over boundaries
So far I have only told you how to compute the singular homology of a graph. To fix that, let's look at what happens when we fill in a face bounded by one of our cycles . Because the new face plugs a hole, we should expect that we get fewer cycles. After all, the boundary of our face could be homotopically shrunk to a point.
So we need to remove all boundaries of faces! At the moment, there's just one, it's named and its boundary is . Now all places on this boundary should be mapped on top of each other, glued together to a single point. So we simply need to redo our computation with an extra equation saying ! Let's see this en jargon:
Forcing a set of things to be equal is called taking a quotient. Further, a kernel is the name for those elements that maps to zero. So it's an instructive way to speak about cycles. And the image is a name for the the set of elements that appear as the boundary of some element in .
Take a surface, apply once and get its boundary, apply it twice and get zero. The following neat way to say just this is called a short exact sequence:
Anyways, for our example it all means that the first homology becomes:
Computing with spanning trees
As I also learned from Wildberger's lecture, there's a much simpler way to compute the homology of a graph using spanning trees. It goes like this:
Put any spanning tree on a graph. Then there will be as many cycles as there are edges not covered by the spanning tree. Because any spanning tree has edges, if a graph has edges, then there is a basis made of cycles.
If that's all that can happen, why not use numbers to signify the dimensions of the null spaces or homology groups, for a much simpler description? That's what Betti numbers are about, and it's where we'll start next time!