Solve this integral equation from a probability puzzle

integrationordinary differential equationsprobability

I'm working on a probability puzzle where two players are playing tug of war on opposite sides (P1 at 1, and P2 and -1) and there's a marker in between them (not necessarily at 0). Each player takes turns tugging the rope, which makes the marker come closer to the player by a uniform distribution between 0 and 1. When this marker reaches past the 0.5 mark on on players side, then that player wins. What's the probability that P1 will win?

One example,
x = -0.25,
then 0.4 (P1 rolls 0.65),
then -0.1 (P2 rolls 0.5),
then 0.6 (P1 rolls 0.7)
=> P1 wins

In this case, say that $p(x)$ = probability that player 1 wins ultimately given the mark is at x. Then player 1 can win the first round by probability $0.5 + x$, or continue by probability $0.5-x$, and then win again if player 2 ultimately loses. This I modeled by:

$p(x) = (0.5 + x) + (0.5-x)\int_{x}^{0.5}{1-p(y) dy}$

Since we want to sum all the cases the mark is between x and 0.5. e.g. If the mark is above 0.5, then P1 wins, and the mark cannot go below x after the first round.

But I'm not sure how to proceed from here. Or should I think about the problem differently?

Best Answer

I think your approach is satisfactory but your execution requires a bit more rigor. To see how, let's condition on the first and second tugs made by Player #1 and Player #2. Instead of calling the initial position of the mark $x\in [-1/2,1/2]$ I will instead call it $t\in [-1/2,1/2]$. I will also assumed Player #1 makes the first tug.

Let $U_1,U_2\sim \mathcal{U}[0,1]$ denote the amounts that Player #1 and Player #2 tugged the marks on their initial moves, respectively. For example, if $U_1=0.3$ and $U_2=0.2$ then Player #1 initally moved the mark $0.3$ units to the right and Player #2 moved the mark $0.2$ units to the left. If the first tug didn't force the mark outside of $[-1/2,1/2]$ then the resulting position of the mark after these two tugs is $t+U_1-U_2=t+0.1$ and the game continues.

Since these tugs are independent, we see that the joint denisty of $(U_1,U_2)$ is necessarily uniform on the unit square $[0,1]^2$.

Define events $E_1,E_2,E_3$ by $$E_1=\Big\{t+U_1>\frac{1}{2}\Big\}$$ $$E_2=\Big\{t+U_1-U_2\geq -\frac{1}{2},t+U_1 \leq \frac{1}{2}\Big\}$$$$E_3=\Big\{t+U_1-U_2<-\frac{1}{2}\Big\}$$ The events $E_1,E_2,E_3$ partition our sample space $\Omega=[0,1]^2$ for $(U_1,U_2)$ and satisfy $$E_1\subseteq \{\text{Player #1 Wins}\}$$ $$E_3 \subseteq \{\text{Player #2 Wins}\}$$ Moreover, $$P(\text{Player #1 Wins},E_1|\text{Mark at }t)=t+\frac{1}{2}$$ $$P(\text{Player #1 Wins},E_2|\text{Mark at }t)=\int_0^{\frac{1}{2}-t}\int_{0}^{x+t+\frac{1}{2}}f(t+x-y)\mathrm{d}y\mathrm{d}x$$ $$P(\text{Player #1 Wins}, E_3|\text{Mark at }t)=0$$ The second equation follows from the total law of probability. If $f(t)$ is the probability of Player #1 winning when the initial position of the mark is at $t$, then $f$ must satisfy $f(1/2)=1$ and $$f(t)=t+\frac{1}{2}+\int_0^{\frac{1}{2}-t}\int_{0}^{x+t+\frac{1}{2}}f(t+x-y)\mathrm{d}y\mathrm{d}x$$ Using $y\rightarrow t+x-y$ on the inner integral and interchanging the order or integration allows us to write this equation in the following manner. $$f(t)=t+\frac{1}{2}+\frac{1}{2}\int_{-1/2}^{1/2}f(x)\mathrm{d}x-t\int_{-1/2}^tf(x)\mathrm{d}x+\int_{1/2}^txf(x)\mathrm{d}x$$ Apply $\frac{d}{dt}$ once... $$f'(t)=1-\int_{-1/2}^tf(x)\mathrm{d}x$$ which suggests $f'(-1/2)=1$. Differentiate again to get $$f''(t)+f(t)=0$$ whose general solution is $f(t)=c_1\cos(t)+c_2\sin(t)$. Using $f(1/2)=1,f'(-1/2)=-1$ yields our formula for $f(t)...$ $$f(t)=\Bigg(\frac{\csc(1/2)-\sec(1/2)}{\cot(1/2)-\tan(1/2)}\Bigg)\cos(t)+\Bigg(\frac{\sec(1/2)-\csc(1/2)}{\tan(1/2)-\cot(1/2)}\Bigg)\sin(t)$$ Edit: Here are some additional details in this argument, as requested. Define $A\subseteq [0,1]^2$ by $$A=\Big\{(x,y)\in [0,1]^2:y\leq x+t+\frac{1}{2},x\leq \frac{1}{2}-t\Big\}$$ For any $(x,y)\in A$ we have $$P(\text{Player #1 Wins },E_2|\text{Mark at }t,U_1=x,U_2=y)=f(t+x-y)$$ If $(x,y)\notin A$ then $$P(\text{Player #1 Wins },E_2|\text{Mark at }t,U_1=x,U_2=y)=0$$ From total law of probability, $$\begin{eqnarray*}P(\text{Player #1 Wins },E_2|\text{Mark at }t)&=& \iint_{[0,1]^2} P(\text{Player #1 Wins },E_2|\text{Mark at }t,U_1=x,U_2=y)f_{U_1U_2}(x,y)\mathrm{d}y\mathrm{d}x \\ &=& \iint_{A\cap [0,1]^2} P(\text{Player #1 Wins },E_2|\text{Mark at }t,U_1=x,U_2=y)f_{U_1U_2}(x,y)\mathrm{d}y\mathrm{d}x + \iint_{A^c\cap [0,1]^2} P(\text{Player #1 Wins },E_2|\text{Mark at }t,U_1=x,U_2=y)f_{U_1U_2}(x,y)\mathrm{d}y\mathrm{d}x \\ &=& \int_0^{\frac{1}{2}-t}\int_{0}^{x+t+\frac{1}{2}} f(t+x-y)\mathrm{d}y\mathrm{d}x \end{eqnarray*}$$

Related Question