# Computing simplicial homology via Smith Normal Form over Rings

I am not sure whether this is the right forum to ask such a question, if not please let me know.

In the context of my masters thesis, I am working on writing a program to compute simplicial homology of certain spaces $X$. The idea is to give the program the differentials $\partial_k:C_k \rightarrow C_{k-1}$ as (quite large) matrices, and compute the homology $\frac{kern\partial_k}{im \partial_{k+1}}$ by bringing both matrices in Smith Normal Form. For integral coefficients one can then use $$H(X; \mathbb{Z}) = \mathbb{Z}^{r-t} \oplus_{i=1}^{t} \mathbb{Z}/{s_i}\mathbb{Z},$$ with $s_i$ the diagonal entries in the SNF of $\partial_{i+1}$ and $r = rankC_i - rank(\partial_i)$ .

As the computation with integral coefficients is too computationally expensive, the idea is to compute $H(X,\mathbb{Z}/ d\mathbb{Z})$ for some $d$ to get the torsion parts of the integral homology using the Universal Coefficient Theorem.

As $\mathbb{Z}/ d\mathbb{Z}$ contains zero divisors, the kernel of $\partial_i$ may be a torsion module, if the $s_i$ in the SNF of $\partial_i$ are not units (e.g. not 1). Thus one should keep track of the basis change while computing the SNF to exactly know how the image of $\partial_{i+1}$ lies in the kernel of $\partial_{i}$ to get the homology in the form torsion part + free part as above.

How do I do that? I somehow have to compute the SNFs simultaneously, and I do not see how that can work. Maybe I am missing something trivial, but I seem to be stuck here.

Thank you!

• I'm rusty with the use of UCT, so take this with a generous dash of skepticism. Could you not simply start with $d$ ranging over a bunch of primes. The $s_i$ will then be units unless divisible by the prime $p$, and the homology groups will be vector spaces over $\Bbb{F}_p$. If you get the same dimension for all the primes in your test set, then homology is (may be) torsion free. If there is variation among the dimensions, then that is a sign of torsion terms showing up. Then you need to start worrying about what happens when $d$ is a power of prime. – Jyrki Lahtonen Jul 6 '15 at 21:37
• Yes, that is exactly the point where I am stuck. The calculation of homology for finite fields is already implemented. – berndibus Jul 7 '15 at 7:36
• As a general scheme, I don't think this will work: the number of primes which can be involved in the torsion of a simplicial complex grows exponentially with the number of vertices. If you want to implement a different algorithm for computing simplicial homology, there are several in the literature; for example, see the paper by Dumas, Heckenbach, Saunders, and Welker: link.springer.com/chapter/10.1007/978-3-662-05148-1_10. – John Palmieri Feb 26 at 15:45