# Efficient Algorithms for Computing a Minimal Homology Basis

## Abstract

Efficient computation of shortest cycles which form a homology basis under \(\mathbb {Z}_2\)-additions in a given simplicial complex \(\mathcal {K}\) has been researched actively in recent years. When the complex \(\mathcal {K}\) is a weighted graph with *n* vertices and *m* edges, the problem of computing a shortest (homology) cycle basis is known to be solvable in \(O(m^2n/\log n+ n^2m)\)-time. Several works [1, 2] have addressed the case when the complex \(\mathcal {K}\) is a 2-manifold. The complexity of these algorithms depends on the rank *g* of the one-dimensional homology group of \(\mathcal {K}\). This rank *g* has a lower bound of \(\varTheta (n)\), where *n* denotes the number of simplices in \(\mathcal {K}\), giving an \(O(n^4)\) worst-case time complexity for the algorithms in [1, 2]. This worst-case complexity is improved in [3] to \(O(n^\omega + n^2g^{\omega -1})\) for general simplicial complexes where \(\omega < 2.3728639\) [4] is the matrix multiplication exponent. Taking \(g=\varTheta (n)\), this provides an \(O(n^{\omega +1})\) worst-case algorithm. In this paper, we improve this time complexity. Combining the divide and conquer technique from [5] with the use of annotations from [3], we present an algorithm that runs in \(O(n^\omega +n^2g)\) time giving the first \(O(n^3)\) worst-case algorithm for general complexes. If instead of minimal basis, we settle for an approximate basis, we can improve the running time even further. We show that a 2-approximate minimal homology basis can be computed in \(O(n^{\omega }\sqrt{n \log n})\) expected time. We also study more general measures for defining the minimal basis and identify reasonable conditions on these measures that allow computing a minimal basis efficiently.

## Notes

### Acknowledgements

This works is partially supported by National Science Foundation (NSF) under grants CCF-1526513, 1740761 and 1733798.

## Supplementary material

## References

- 1.Borradaile, G., Chambers, E.W., Fox, K., Nayyeri, A.: Minimum cycle and homology bases of surface-embedded graphs. J. Comput. Geom.
**8**(2), 58–79 (2017)MathSciNetzbMATHGoogle Scholar - 2.Erickson, J., Whittlesey, K.: Greedy optimal homotopy and homology generators. In: Proceedings of the Sixteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1038–1046. Society for Industrial and Applied Mathematics (2005)Google Scholar
- 3.Busaryev, O., Cabello, S., Chen, C., Dey, T.K., Wang, Y.: Annotating simplices with a homology basis and its applications. In: Fomin, F.V., Kaski, P. (eds.) SWAT 2012. LNCS, vol. 7357, pp. 189–200. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31155-0_17 CrossRefGoogle Scholar
- 4.Le Gall, F.: Powers of tensors and fast matrix multiplication. In: Proceedings of the 39th International Symposium on Symbolic and Algebraic Computation, pp. 296–303. ACM (2014)Google Scholar
- 5.Kavitha, T., Mehlhorn, K., Michail, D., Paluch, K.: A faster algorithm for minimum cycle basis of graphs. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP 2004. LNCS, vol. 3142, pp. 846–857. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-27836-8_71 CrossRefGoogle Scholar
- 6.de Pina, J.C.: Applications of shortest path methods. Ph.D. thesis, University of Amsterdam (1995)Google Scholar
- 7.Horton, J.D.: A polynomial-time algorithm to find the shortest cycle basis of a graph. SIAM J. Comput.
**16**(2), 358–366 (1987)MathSciNetCrossRefzbMATHGoogle Scholar - 8.Mehlhorn, K., Michail, D.: Minimum cycle bases: faster and simpler. ACM Trans. Algorithms (TALG)
**6**(1), 8 (2009)MathSciNetzbMATHGoogle Scholar - 9.Dey, T.K., Sun, J., Wang, Y.: Approximating loops in a shortest homology basis from point data. In: Proceedings of the Twenty-Sixth Annual Symposium on Computational Geometry, pp. 166–175. ACM (2010)Google Scholar
- 10.Chen, C., Freedman, D.: Measuring and computing natural generators for homology groups. Comput. Geom.
**43**(2), 169–181 (2010)MathSciNetCrossRefzbMATHGoogle Scholar - 11.Hatcher, A.: Algebraic Topology. Cambridge University Press, Cambridge (2002)zbMATHGoogle Scholar
- 12.Kavitha, T., Mehlhorn, K., Michail, D.: New approximation algorithms for minimum cycle bases of graphs. In: Thomas, W., Weil, P. (eds.) STACS 2007. LNCS, vol. 4393, pp. 512–523. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-70918-3_44 CrossRefGoogle Scholar
- 13.Gleiss, P.M.: Short cycles: minimum cycle bases of graphs from chemistry and biochemistry. Ph.D. thesis, Universität Wien, Austria (2001)Google Scholar
- 14.Guskov, I., Wood, Z.J.: Topological noise removal. In: 2001 Graphics Interface Proceedings, Ottawa, Canada, p. 19 (2001)Google Scholar
- 15.Wood, Z., Hoppe, H., Desbrun, M., Schröder, P.: Removing excess topology from isosurfaces. ACM Trans. Graph. (TOG)
**23**(2), 190–208 (2004)CrossRefGoogle Scholar - 16.Chen, C., Freedman, D.: Hardness results for homology localization. In: Proceedings of the Twenty-First Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1594–1604. Society for Industrial and Applied Mathematics (2010)Google Scholar
- 17.Edelsbrunner, H., Harer, J.: Persistent homology-a survey. Contemp. Math.
**453**, 257–282 (2008)MathSciNetCrossRefzbMATHGoogle Scholar - 18.Chen, C., Freedman, D.: Quantifying homology classes. In: LIPIcs-Leibniz International Proceedings in Informatics, vol. 1. Schloss Dagstuhl-Leibniz-Zentrum für Informatik (2008)Google Scholar
- 19.Hartvigsen, D., Mardon, R.: The all-pairs min cut problem and the minimum cycle basis problem on planar graphs. SIAM J. Discret. Math.
**7**(3), 403–418 (1994)MathSciNetCrossRefzbMATHGoogle Scholar - 20.Wulff-Nilsen, C.: Minimum cycle basis and all-pairs min cut of a planar graph in subquadratic time. arXiv preprint arXiv:0912.1208 (2009)