Probability of traversing a network of bridges This is problem 32 from this wonderful site here: https://www.probabilitycourse.com/chapter1/1_5_0_chapter1_problems.php :
You would like to go from point $A$ to point $B$. There are $5$ bridges on different branches of the river.

Bridge $i$ is open with probability $P_i$. Let $A$ be the event that there is a path from $A$ to $B$ and let $B_k$ be the event that $k$-th bridge is open.


*

*Find $P(A)$

*Find $P(B_3\ |\ A)$
My approach so far is this: $P(A)=P(A\ |\ B_3)P_3 + P(A\ |\ B_3^c)(1-P_3)$. Focusing on $P(A\ |\ B_3^c)$, we see that it's possible to cross from $A$ to $B$ only via the upper or lower route, so both bridges alone either or both routes should be open. Event $A$ becomes $(B_1\cap B_4)\cup(B_2\cap B_5)$, so
$$P(A\ |\ B_3^c)=P((B_1, B_4)\cup(B_2, B_5))=P(B_1, B_4)+P(B_2, B_5)-P(B_1, B_4, B_2, B_5)
\\=P_1P_4+P_2P_5-P_1P_2P_4P_5
$$
If bridge $3$ is open, then either of bridge $1$ or $2$ should be open, and either of bridge $4$ or $5$ should be open, so
$$P(A\ |\ B_3)=P((B_1\cup B_2)\cap(B_4\cup B_5))=P(B_1\cup B_2)+P(B_4\cup B_5)-P(B_1\cup B_2\cup B_4\cup B_5)
\\=P(B_1)+P(B_2)-P(B_1,B_2)+P(B_4)+P(B_5)-P(B_4,B_5)-[P(B_1)+P(B_2)+P(B_4)+P(B_5)-P(B_1,B_2)-P(B_1,B_4)-P(B_1,B_5)-P(B_2,B_4)-P(B_2,B_5)-P(B_4,B_5)+P(B_1,B_2,B_4)+P(B_2,B_4,B_5)+P(B_1,B_4,B_5)+P(B_1,B_2,B_5)-P(B_1,B_2,B_4,B_5)]
\\=P_1P_4+P_2P_4+P_1P_5+P_2P_5+P_1P_2P_4P_5\bigg(1-\frac{1}{P_1}-\frac{1}{P_2}-\frac{1}{P_4}-\frac{1}{P_5}\bigg)$$
I could plug these values back into the first equation to get $P(A)$, but this method seems extremely cumbersome and I've probably either made a mistake, or I'm missing a way to simplify this. There are ways to go from A to B that are common to both when bridge $3$ is open or closed. Have I overcounted somehow?
 A: There are five bridges and there are 32 states of the bridges.
The probabilities of the 32 states can be easily calculated.
The probability of event $A$ is the sum of those probabilities that belong to states that make it possible to get through.
The conditional probability can be calculated the same way -- listing states...
A: How i see it:
A is made from 4 possible ways and their combination, so it is an inclusion-exclusion problem. The ways are:
Both upper bridges,
Both bottom.
Upper, mid and bottom.
Bottom, mid and upper.
Then A is the union of those. From them is about to apply the inclusion-exclusion principle.
For the next section what I did is to use Bayes rule, with that we have probability of A in the denominator (already computed), probability of Bridge 3 is given. So what is left is probability of A given bridge 3. This can be computed taking the result from the previous part and setting probability of bridge 3 to one.
A: My approach:
There are exactly four ways to go from point $A$ to point $B$. The four ways are:

*

*$Bridge1 \rightarrow Bridge4$

*$Bridge1 \rightarrow Bridge3 \rightarrow Bridge5$

*$Bridge2 \rightarrow Bridge5$

*$Bridge2 \rightarrow Bridge3 \rightarrow Bridge4$
So,
$$P(A) = P_1P_4 + P_1P_3P_5 + P_2P_5 + P_2P_3P_4$$
Now, we need to find $P(B_3|A)$, where
$$B_k \rightarrow \text{Event that } k^{th} \text{ bridge is open}$$
$$P(B_3|A) = \frac{P(B_3 \cap A)}{P(A)}$$
$$P(B_3 \cap A) = P(Path 2) + P(Path 4)$$
$$P(B_3 \cap A) = P_2P_3P_4 + P_1P_3P_5$$
$$P(B_3|A) = \frac{P_2P_3P_4 + P_1P_3P_5}{P_1P_4 + P_1P_3P_5 + P_2P_5 + P_2P_3P_4}$$
I feel I have accounted for the problem correctly, let me know if you feel it is incorrect, if so, point out the mistake also.
A: 1.\begin{align*} P(A) &= (1-B_3)(B_1B_4 + B_2B_5) + B_3(B_1B_4 + B_1B_5 + B_2B_4 + B_2B_5)\\
        &= B_1B_4 + B_2B_5 + B_3B_1B_5 + B_3B_2B_4\end{align*}


*$$P(A \text{ and } B_3) = B_3(B_1B_4 + B_1B_5 + B_2B_4 + B_2B_5) $$
Answer is equal to $P(A \text{ and }B_3) / P(A).$
