Nodal analysis can effectively simplify the analysis of circuits having dependent or independent voltage sources. Consider a circuit with four resistors and two voltage sources configured so that one voltage source is connected between a non-reference node and the reference node. Here, the voltage at the non-reference node can be written as equal to the voltage of the source. The other voltage source is connected between two non-reference nodes. These form a supernode or generalized node. To analyze a circuit with a supernode, both Kirchhoff's current and voltage law must be applied to determine the node voltages. First, Kirchhoff's current law is applied to the supernode, considering the currents through each element. The obtained equation can be written in terms of the node voltages. Then, the circuit is redrawn to apply Kirchhoff's voltage law to the supernode. Going around the loop containing the supernode in a clockwise direction gives a constraint equation. The resulting three equations can now be solved to determine the node voltages.