Circuits probability problem

conditional probabilityinclusion-exclusionprobability

In the circuit shown, each switch is closed with probability $p$, independently of all other switches. The task is to find the probability that a flow of current is possible between $A$ and $B$.

Electrical circuit incorporating switches

My approach was to use the inclusion-exclusion principle as follows. Label the circuit $ABCD$:
Geogebra circuit
Then the four possible routes the current can take are $ACB$, $ADB$, $ACDB$ and $ADCB$. Define events $R_1 = \{\text{current can flow along } ACB \}$, $R_2 = \{\text{current can flow along } ADB \}$, $R_3 = \{\text{current can flow along } ACDB \}$, $R_4 = \{\text{current can flow along } ADCB \}$. Then the required probability is

\begin{align}
\mathbb{P}(R_1 \cup R_2 \cup R_3 \cup R_4) = \mathbb{P}(R_1) &+ \mathbb{P}(R_2) + \mathbb{P}(R_3) + \mathbb{P}(R_4) \\
&- \mathbb{P}(R_1 \cap R_2) – \mathbb{P}(R_1 \cap R_3) – \mathbb{P}(R_1 \cap R_4) \\
&- \mathbb{P}(R_2 \cap R_3) – \mathbb{P}(R_2 \cap R_4) – \mathbb{P}(R_3 \cap R_4) \\
&+ \mathbb{P}(R_1 \cap R_2 \cap R_3) + \mathbb{P}(R_1 \cap R_2 \cap R_4) + \mathbb{P}(R_1 \cap R_3 \cap R_4) + \mathbb{P}(R_2 \cap R_3 \cap R_4) \\
&- \mathbb{P}(R_1 \cap R_2 \cap R_3 \cap R_4)
\end{align}

This works out as $\mathbb{P}(R_1 \cup R_2 \cup R_3 \cup R_4)
= (2p^2 + 2p^3) – (5p^4 + p^5) + 4p^5 – p^5
= \boxed{2p^2 + 2p^3 – 5p^4 + 2p^5}$
.

However, the answer given by the textbook is
$\boxed{1 – (1-p)(1-p^2)^2 – p + p[1 – (1-p)^2]^2}$, which is equivalent, but I can't figure out what the intended method was to get the solution in this form.

Best Answer

The probability that it makes it through the first stage is $1 - (1-p)^2$, getting from $A$ to the centerline. Likewise the probability for getting from the centerline to point $B$. So one of the ways to succeed is to have the $CD$ switch closed, and the probability of that happening is the last term of the given answer.

If the center switch is open, that has probability $1-p$, and then we need both the upper switches or both of the lower switches, or both. So not have both fail. The probability of top path working is $p^2$, the probability of it not working is $1-p^2$. The probability of both the top path and bottom path failing is $(1-p^2)^2$, so the probability of one of them working is $1-(1-p^2)^2$, and we have

Probability(working without center switch) plus Probability(working with center switch) equals

$$(1-p)(1-(1-p^2)^2) + p[1-(1-p)^2]^2$$

Distributing the $1-p$ in the first term gives the official answer.

Related Question