Kirchhoff's rules (or laws) of electrotechnics can be restated in homological terms. In more detail, a (branched) electrical circuit is represented by a graph, or a simplicial 1-complex, $\Gamma,$ so that there is a constant electrical current $I_i$ flowing through each edge. After arbitrarily orienting the edges, currents can be assigned numerical values (positive or negative, depending on whether the direction of the current agrees with the chosen orientation) and the full set of currents in the circuit is specified by a $1$-chain $I=\{I_i\}$. Kirchhoff's first rule states that
The algebraic sum of currents at every node is equal to $0.$
This translates into the condition that the chain $I$ is a $1$-cycle, $\partial I=0.$ In particular, current distributions that obey the first rule form a real vector space of dimension $\operatorname{rk}H_1(\Gamma,\mathbb{R}).$
Kirchhoff's second rule involves more ingredients, namely, the resistances $R_i$ of the edges, voltage drops $R_i I_i$ and the electromotive forces $\mathcal{E}_i$ (emf's). It can be rephrased as follows:
For every loop in $\Gamma$, the sum of the quantities $I_iR_i-\mathcal{E}_i$ over the edges in the loop is equal to $0.$
Here it is assumed that the edges forming the loop have been consistently oriented.
It is commonly stated in physics and electrotechnics textbooks that the equations given by the second rule are not independent and one needs to chose a suitable minimal set. Indeed, there are $\operatorname{rk}H_1(\Gamma,\mathbb{R})$ linearly independent conditions. Combining this with the first law allows one to uniquely "solve for" the currents in the circuit given the resistances of the edges and the emf's.