Simplifying resistor networks