Probability of getting destination with closed roads So the question asks: 
We want to drive from A to B. See the road map in the ﬁgure below. Because of snow, each of the ﬁve roads (R1−R5) can be closed with probability $p$, independently of all other roads. What is the probability that we can reach B? (Hint: Condition on R5.)

So so far I have: 
Suppose the point between R1 and R2 is C and the point between R3 and R4 is D
P(A to B) = P( open road A to B | R5 closed) U P(open road A to B| R5 open)
= P( open road A to B | R5 closed) * P(open road A to B| R5 open)
P(open road A to B | R5 closed) = [P( open road A to C| R5 closed) ∩ (open road C to B| R5 closed)]  
= P(open road A to C | R5 closed) * P(open road C to B| R5 closed) 
= { 1 - P ( (first road blocked| R5 closed) ∩  (second road blocked| R5 closed) )
= { 1 - P(first road blocked| R5 closed)P(second road blocked| R5 closed) }2
= $(1-P^2)^2$
P(open road from A to B| R5 open) = [P( open road A to C| R5 open) ∩  (open road C to B| R5 open)]  
= P(open road A to C | R5 open)P(open road C to B| R5 open) 
= { 1 - P ( (first road blocked| R5 open) ∩ (R2 and R3 blocked| R5 open) )
= ( 1 - P(first road blocked| R5 open)P(R2 and R3 blocked| R5 $open) )^2$
$= (1-P*(0.5P))^2$
$=(1-P^2/2)^2$
= $(2-p^2)^2/4$
P(A to B) = P( open road A to B | R5 closed) * P(open road A to B| R5 open)
$= (1-P^2)^2 (2-p^2)^2/4$
But unfortunately this was marked wrong, so where am I doing wrong? What is the right way to do this kind of problem? 
 A: You are getting your and and ors confused.


*

*Total probability is $P((A\cap B){\large \cup}(A\cap B^\complement))=P(A\cap B){\large +}P(A\cap B^\complement)$.

*Independence means $\mathsf P(A{\large \cap} B)=\mathsf P(A){\large\cdot}\mathsf P(B)$

*And also $\mathsf P(A\cup B) = \mathsf P(A)+\mathsf P(B)-\mathsf P(A)\cdot\mathsf P(B)$



Moreover, the mixing of math symbols and words doesn't help.   It bloats the lines and hides errors in the mess.   Keep your math statements neat and tidy.
Since we know the events are independent, we can dispense with conditionals.   Further, since we also know that the events are Bernoulli, and the roads are indexed, why not use indexed letters for the probabilities?

Since the roads are indexed and their closure independent, we can denote their probabilities of being opened by $q_1,q_2,q_3,q_4,q_5$.   All are equal to $1-p$ but the indexing gives us self-commenting code to make it clear where the logistics lays.
We may pass from $A$ to $B$ :


*

*(1) if road $5$ is closed and either road $1$ and $2$ or road $3$ and $4$ are open, or 

*(2) if road $5$ is opened then we may pass if either road $1$ or $3$ and either road $2$ or $4$ are open.


Which is to say:
$$\begin{align}p_{AB} = & ~ (1-q_5)(q_1q_2+q_3q_4-q_1q_2q_3q_4)+q_5(q_1+q_3-q_1q_3)(q_2+q_4-q_2q_4)
\\[1ex] = & ~ p(2(1-p)^2-(1-p)^4) + (1-p)(2(1-p)-(1-p)^2)^2
\end{align}$$
Simplify and complete.
A: This question is taken from "Probability and Random Variables, a Beginner's guide" by David Stirzaker, pages 63-64, which shows the following solution:
Let R be the event that the road R5 is open and Q the event that you can drive from A to B.
R' means the complement of event R.
$P( Q ) = P( Q/R )*(1-p) + P( Q/R' )*p$
$P( Q ) = (1-p^2)^2*(1-p) + (1-(1-(1-p)^2)^2)*p$
This solution is mathematically the same as the solution in the answer above. 
If you replace p for a numerical value you will obtain the same result with both solutions.
I invite anybody able to explain with words the book's solution and, ideally, show step by step how such solution was found.
A: Your first line
P(A to B) = P( open road A to B | R5 closed) U P(open road A to B| R5 open)
is not correct.  It should be
P(A to B) = P( open road A to B | R5 closed)*P(R5 closed) U P(open road A to B| R5 open)*P(R5 open)
As the two are disjoint, you can replace the U with +  
If R5 is closed, you need (both R1 and R2) or (both R3 and R4).  Each path has probability $(1-p)^2$ to be open, but you have double counted the chance that both are open, so the total is $2(1-p)^2-(1-p)^4$ and this part contributes $p\left(2(1-p)^2-(1-p)^4\right)$ to the total chance of success.  
If R5 is open, you need (either R1 or R3) and (R2 or R4).  I'll leave that to you.
