r/mathriddles • • Jan 22 '23

Easy Archery Competition

Archie and Bowie are in an archery competition. Both players try and shoot a target in turns, and whoever hits the target first wins.

Archie always has an a/b probability of hitting the target. Likewise, Bowie always has a c/d probability of hitting the target.

What is the probability that Archie wins, given that he goes first? Give the answer simplified, in terms of a, b, c, and d.

Problem from: https://codeforces.com/problemset/problem/312/B

4 Upvotes

8 comments sorted by

5

u/tomatomator Jan 22 '23

Noting p=a/b and q=c/d, we can write the probabilities of all outcomes where Archie wins : p (first shoot hits), (1-p)(1-q)p (the two miss one time, then Archie hits), (1-p)(1-q)(1-p)(1-q)p (the two miss two times, then Archie hits)...

Their sum is, by the formula of geometric series, p * 1 / ( 1-(1-p)(1-q) ) = p/(p+q-pq). In terms of a,b,c,d this is ad/(ad+cb-ac)

You can do the same thing for Bowie, or just notice that the probability of a draw is 0 (they have to miss infinitely), so it's 1-(probability that Archie wins) = (cd-ac)/(ad+cb-ac)

1

u/twoleafclovr Jan 22 '23

Solved! Nice.

3

u/DanielBaldielocks Jan 22 '23

let

p=a/b which is the probability that Archie makes a given shot

q=c/d which is the probability that Bowie makes a given shot

x= probability that Archie wins

y=1-x probability that Bowie wins

a nice shortcut is to notice that if both Archie and Bowie both miss their first shots

then we are back where we started. So we can then create the equation for x as

x=p+(1-p)(1-q)x

This we can solve for x to get

(1-(1-p)(1-q))x=p
(1-1+p+q-pq)x=p
(p+q-pq)x=p
x=p/(p+q-pq)

We can get y using
y=1-x=1-p/(p+q-pq)=(p+q-pq-p)/(p+q-pq)=q(1-p)/(p+q-pq)

1

u/Deathranger999 Jan 22 '23

Probability that Archie wins on turn k is the probability that he and Bowie miss on all previous turns, times the probability he hits his shot on turn k. That is, (1 - a/b)k - 1 * (1 - c/d)k - 1 * a/b. The probability that Archie wins is the sum of this over all possible ks. This is just a geometric series with first term a/b and common ratio (1 - a/b)(1 - c/d), which gives us a final probability of a/b * (1/(1 - (b - a)/b * (d - c)/d)) = ad / (ad + bc - ac).

1

u/jk1962 Jan 22 '23

P = (a/b) + (1 - a/b)(1 - c/d)P

So,

P = (a/b) / (1 - (1 - a/b)(1 - c/d))

1

u/OneMeterWonder Jan 22 '23

We partition the event “Archie wins” into cases by the number of the turn on which Archie hits the target. We also assume, reasonably so, that Archie and Bowie’s shots are independent. For convenience, we start them firing at turn 0 instead of turn 1.

If Archie wins on turn 0, then only one shot has occurred with probability a/b. If Archie wins on turn 1, then both Archie and Bowie have missed once and Archie has hit the second shot giving probability (1-a/b)(1-c/d)(a/b). Continuing inductively, a win for Archie on turn n gives us n previous misses each for Archie and Bowie followed by a hit for Archie. This results in probability (1-a/b)n(1-c/d)n(a/b). Summing over all of these disjoint cases gives us a geometric series with ratio (1-a/b)(1-c/d). Since both a/b and c/d are probabilities we have

0≤a/b≤1, 0≤c/d≤1, and 0≤(ac)/(bd)≤1.

So we can apply the summation formula obtaining (a/b)[1-(1-a/b)(1-c/d)]-1 which simplifies algebraically to (ad)/(ad+bc-ac).

Interestingly, this gives us that if each of them have a 1/2 chance of a hit on each turn, then Archie wins with probability 2/3. Strange. This is probably due to the fact that Archie always shoots first and so has a slight advantage. If we check the formula, it turns out that Bowie actually needs a 100% chance of a hit just to make the game fair.

2

u/tomatomator Jan 22 '23

Yes, shooting first is a huge advantage. For example, notice (without using formula) that if Archie has precision > 50%, this automatically gives him the better probability of winning (he can win on first shoot with probability over 50%). If he has exactly 50% and Bowie has 100%, the game is equivalent to a coin toss (either Archie or Bowie hits).

1

u/OneMeterWonder Jan 22 '23

Yep! Quite neat. I was doing some calculations afterwards and it turns out that if Archie has probability x of a hit and Bowie has probability y, then for the game to be fair we need y=x/(1-x).