  Topology plays a fundamental role in our understanding of many-body physics,
from vortices and solitons in classical field theory, to phases and excitations
in quantum matter. Topological phenomena are intimately connected to the
distribution of information content - that, differently from ordinary matter,
is now governed by non-local degrees of freedom. However, a precise
characterization of how topological effects govern the complexity of a
many-body state - i.e., its partition function - is presently unclear. In this
work, we show how topology and complexity are directly intertwined concepts in
the context of classical statistical mechanics. In concrete, we present a
theory that shows how the \emph{Kolmogorov complexity} of a classical partition
function sampling carries unique, distinctive features depending on the
presence of topological excitations in the system. We confront two-dimensional
Ising and XY models on several topologies, and study the corresponding
samplings as high-dimensional manifolds in configuration space, quantifying
their complexity via the intrinsic dimension. While for the Ising model the
intrisic dimension is independent of the real-space topology, for the XY model
it depends crucially on temperature: across the
Berezkinskii-Kosterlitz-Thouless (BKT) transition, complexity becomes topology
dependent. In the BKT phase, it displays a characteristic dependence on the
homology of the real-space manifold, and, for $g$-torii, it follows a scaling
that is solely genus dependent. We argue that this behavior is intimately
connected to the emergence of an order parameter in data space, the conditional
connectivity, that displays scaling behavior. Our approach paves the way for an
understanding of topological phenomena from the Kolmogorov complexity
perspective, in a manner that is amenable to both quantum mechanical and
out-of-equilibrium generalizations.
