The ith switch in each of the following circuits is closed with probability p, and open with probability qi for each i. Assuming the switches function independently, find a formula in each case for the probability that a current can flow from left to right through the circuit.