Two resistors, R1=6Ω and R2=12Ω, are connected in series with an ideal 12 V battery. A switch S is connected in parallel with R2 so that closing S completely bypasses R2. Determine the equivalent resistance of the circuit (i) when S is open and (ii) when S is closed.