Leis de Kirchhoff, Análise Nodal e por Malha