Probability you can walk from point $A$ to point $B$

397 Views Asked by At

Consider the following map of roads below. Each of the $5$ roads are labeled. On any given day, each road is open independently of the others with probability $1/3.$ enter image description here

$\textbf{My first question:}$

What is the probability, on any given day, a person can walk from point $A$ to point $B$?

My initial thought was to just add the probabilities $$\mathbb{P}(R_{1})\mathbb{P}(R_{4}) + \mathbb{P}(R_{2})\mathbb{P}(R_{5}) + \mathbb{P}(R_{1})\mathbb{P}(R_{3})\mathbb{P}(R_{5}) + \mathbb{P}(R_{2})\mathbb{P}(R_{3})\mathbb{P}(R_{4}). \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (1)$$

This comes out to $\frac{8}{27}.$ However, for some reason, I feel like I am double counting something.

$\textbf{My second question:}$

Given that a person can walk from point $A$ to point $B$, what is the probability that road number $3$ is open?

This kind of gives me Bayes' Rule vibes. Let $Y$ be the event that it is possible to walk from point $A$ to point $B.$ Let $T$ be the event that road number $3$ is open. We have $$\mathbb{P}(T\mid Y)=\frac{\mathbb{P}(Y\mid T)\mathbb{P}(T)}{\mathbb{P}(Y\mid T)\mathbb{P}(T)+\mathbb{P}(Y\mid T^{C})\mathbb{P}(T^{C})}. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (2)$$

Plugging in $\mathbb{P}(R_{3})=1$ to expression $(1)$, $\mathbb{P}(Y\mid T)$ becomes $\frac{4}{9}.$ If it is possible to walk from point $A$ to point $B$ given road number $3$ is closed, then $\mathbb{P}(Y\mid T^{C})= \mathbb{P}(R_{1})\mathbb{P}(R_{4}) + \mathbb{P}(R_{2})\mathbb{P}(R_{5}) = \frac{2}{9}.$ Plugging in these values, equation $(2)$ simplifies to $\frac{1}{2}.$

Again, I do not know why, but I feel my work is colossally wrong. Anyone want to give it a second look?

Thanks in advance!

2

There are 2 best solutions below

10
On BEST ANSWER

You're right, you're double-counting in the sense that the events whose probabilities you're adding in $(1)$ aren't mutually exclusive.

In $(1)$, you want $\mathsf P((R_1\cap R_4)\cup(R_2\cap R_5)\cup(R_1\cap R_3\cap R_5)\cup(R_2\cap R_3\cap R_4))$. You can evaluate this using inclusion–exclusion as

\begin{eqnarray*} &&\mathsf P((R_1\cap R_4)\cup(R_2\cap R_5)\cup(R_1\cap R_3\cap R_5)\cup(R_2\cap R_3\cap R_4))\\ &=& \mathsf P(R_1\cap R_4)+\mathsf P(R_2\cap R_5)+\mathsf P(R_1\cap R_3\cap R_5)+\mathsf P(R_2\cap R_3\cap R_4)-\mathsf P((R_1\cap R_4)\cap(R_2\cap R_5))\\ &&-\cdots-P((R_1\cap R_4)\cap(R_2\cap R_5)\cap(R_1\cap R_3\cap R_5)\cap(R_2\cap R_3\cap R_4))\\ &=& 3^{-2}+3^{-2}+3^{-3}+3^{-3}-3^{-4}-3^{-4}-3^{-4}-3^{-4}-3^{-4}-3^{-5}+4\cdot3^{-5}-3^{-5}=\frac{59}{243}\;, \end{eqnarray*}

and likewise for the probabilities you need to apply Bayes's rule in $(2)$.

Edit:

Actually, your calculation in part $2$ suggests an easier way to calculate the probabilty in part $1$. This is $\mathsf P(Y)$, the denominator in part $2$, and we don't need the full inclusion–exclusion machinery to evaluate that:

\begin{eqnarray*} \mathsf P(Y) &=& \mathsf P(Y\mid T)\mathsf P(T)+\mathsf P(Y\mid \overline T)\mathsf P(\overline T) \\ &=& \mathsf P((R_1\cup R_2)\cap(R_4\cup R_5))\mathsf P(R_3)+\mathsf P((R_1\cap R_4)\cup(R_2\cap R_5))\mathsf P(\overline{R_3}) \\ &=& \left(1-\left(1-\frac13\right)^2\right)^2\cdot\frac13+\left(1-\left(1-\left(\frac13\right)^2\right)^2\right)\cdot\frac23 \\ &=& \frac{25}{81}\cdot\frac13+\frac{17}{81}\cdot\frac23 \\ &=& \frac{59}{243}\;, \end{eqnarray*}

in agreement with the previous result.

2
On

Brute force method: I have listed all possible combination of the gates to be open and it is $2^5 = 32$ ways these gates could be open or closed.

enter image description here