Let $f$ be a discrete function on $M$ whose derivative vanishes. For any two points $i$ and $j$ in the same connected component we have a path $\gamma$ from $i$ to $j$ and
$\displaystyle f(j)-f(i) = \int_\gamma df = 0$
Thus $f$ is constant on each connected component. Conversely, we can choose different constants $c_1, \ldots, c_k$ corresponding to the various connected components $M_1, \ldots, M_k$ of $M$ and define a function $f$ that assumes the value $c_\alpha$ on all vertices in $M_\alpha$. Such a function is called locally constant and has zero derivative. Thus the kernel
$H^0(M) := \ker d$
of the linear map
$d: \Omega_0(M) \rightarrow \Omega_1(M)$
consists of the locally constant functions. Its dimension
$\beta_0(M):= \dim \ker d$
is also called the zeroth betti number of $M$ and equals the number of connected components of $M$.