I didn't really look at your math in detail earlier, but now that I have it's definitely off. You have the right idea in that this is a combinatorial problem, but you probably need to look up some stuff on the binomial coefficient.
The correct expression (using the standard notation for the binomial coefficient) for the winning chance that sword 2 has against sword 1 is this: However, this expression can be simplified a lot; you haven't really solved the problem unless you do so.
Also, working out the probability of a tie for sword 2 vs sword 2 is harder.
Not quite, you should be using combinations instead of permutations. Both dying is 0.5^(2n-1) * (2n-1)!/((n-1)!(2n-1-(n-1))!) * 0.5; that is, the number of combinations that result in sword 2 making n-1 hits as of round 2n-1 times the probability of one of those individual combinations, times the 50% chance of sword 2 hitting in round 2n.
This gives us a 0.5^(2n) * (2n-1)!/(n!(n-1)!) chance of mutual death.
Calculating victory frequency means summing up all the possible combinations of n or more hits before round 2n, though it's not as hard as it seems because, looking at it as the problem of fewer/more than one-half rounds of 2n hitting, you can actually see that they're equally likely, as the "tree" of binomial combinations is symmetric, so there is the same number of combinations with n hits. Sword 1vs Sword 2 gives both players a 50% + (2n-1)!/(2^(2n+1)*n!(n-1)!) chance of death (50% plus half the chance of mutual death).
I think the player should always choose Sword 2, though we need to calculate the probability of a tie there.
Starting on the Player 2 tie chance, my calculations so far have that if both players are at n-1 hits, there is an exactly 1/3 chance of a tie. So now the hard part: calculating the probability of both players being at n-1 hits simultaneously.
Not quite, you should be using combinationsinstead of permutations.
I guess you're responding to Shiam here.
Both dying is 0.5^(2n-1) * (2n-1)!/((n-1)!(2n-1-(n-1))!) * 0.5; that is, the number of combinations that result in sword 2 making n-1 hits as of round 2n-1 times the probability of one of those individual combinations, times the 50% chance of sword 2 hitting in round 2n.
This gives us a 0.5^(2n) * (2n-1)!/(n!(n-1)!) chance of mutual death.
Correct.
Calculating victory frequency means summing up all the possible combinations of n or more hits before round 2n, though it's not as hard as it seems because, looking at it as the problem of fewer/more than one-half rounds of 2n hitting, you can actually see that they're equally likely. Sword 1vs Sword 2 gives both players a 50% + (2n-1)!/(2^(2n+1)*n!(n-1)!) chance of death.
You're almost right, but you need to think carefully about the nuances of 2n-1 vs 2n, particularly the 2n-th round.
I edited my post slightly to make it more clear what that last expression meant: it's only plus half the probability of mutual death. It was easier than saying that the probability of the non-tie events were each (1 - 0.5^(2n) * (2n-1)!/(n!(n-1)!))/2, and so the probability of death was (1 - 0.5^(2n) * (2n-1)!/(n!(n-1)!) + 0.5^(2n) * (2n-1)!/(n!(n-1)!)) = (1 + 0.5^(2n) * (2n-1)!/(n!(n-1)!))/2). So, I'm pretty sure I did consider it correctly, unless there's something I'm really missing. The binomial expansion has an odd length; the tie probability holds the middle (and largest) value in the expansion; all the values before and after it are symmetric and equal.
You're right, I screwed up. Just realized that half of the events represented in the middle term don't have the nth hit at time 2n. I'm an idiot. This gives sword 2 a slightly higher chance of victory than sword 1.
So, after some simplification, The probability of death for sword 1 is 1/2 + (2n)!/(2^(2n+1)(n!)^2). The probability of death for sword 2 is 1/2 + (2n)!/(2^(2n)(n!)^2). The difference is a factor of (2n)!/(2^(2n+1)(n!)^2) in sword 2's favor. That number is also the probability of a tie.
Nah, that's not what I meant, but I've realised that the issue is a mistake in your latest math. If it was correct, it would satisfy the following: P(P1 dying) + P(P2 dying) - P(both dying) = 1
Yep, I can't math today. The probability of 2 surviving is exactly 1/2. The probability of 1 surviving is 1/2 - (2n)!/(2^(2n+1)(n!)^2), and the probability of a tie is (2n)!/(2^(2n+1)(n!)^2).
Yup that's definitely better math than I was doing. Figures that I chose the wrong one of permutation/combination. I couldn't remember and kinda guessed.
Comments
The correct expression (using the standard notation for the binomial coefficient) for the winning chance that sword 2 has against sword 1 is this:
However, this expression can be simplified a lot; you haven't really solved the problem unless you do so.
Also, working out the probability of a tie for sword 2 vs sword 2 is harder.
This gives us a 0.5^(2n) * (2n-1)!/(n!(n-1)!) chance of mutual death.
Calculating victory frequency means summing up all the possible combinations of n or more hits before round 2n, though it's not as hard as it seems because, looking at it as the problem of fewer/more than one-half rounds of 2n hitting, you can actually see that they're equally likely, as the "tree" of binomial combinations is symmetric, so there is the same number of combinations with n hits. Sword 1vs Sword 2 gives both players a 50% + (2n-1)!/(2^(2n+1)*n!(n-1)!) chance of death (50% plus half the chance of mutual death).
I think the player should always choose Sword 2, though we need to calculate the probability of a tie there.
So, I'm pretty sure I did consider it correctly, unless there's something I'm really missing. The binomial expansion has an odd length; the tie probability holds the middle (and largest) value in the expansion; all the values before and after it are symmetric and equal.
This gives sword 2 a slightly higher chance of victory than sword 1.
The probability of death for sword 1 is 1/2 + (2n)!/(2^(2n+1)(n!)^2).
The probability of death for sword 2 is 1/2 + (2n)!/(2^(2n)(n!)^2).
The difference is a factor of (2n)!/(2^(2n+1)(n!)^2) in sword 2's favor. That number is also the probability of a tie.
EDIT: Well, you could write it as 1/2 - C(2n, n)/2^(2n)...
P(P1 dying) + P(P2 dying) - P(both dying) = 1