This forum is in permanent archive mode. Our new active community can be found here.

Math Puzzles/Problems

12346»

Comments

  • edited July 2012
    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:
    image
    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.
    Post edited by lackofcheese on
  • edited July 2012
    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.
    Post edited by Linkigi(Link-ee-jee) on
  • The player should always choose Sword 2.
    Because the player is a gentleman, right?
  • 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.
  • edited July 2012
    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.
    Post edited by lackofcheese on
  • edited July 2012
    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.
    Post edited by Linkigi(Link-ee-jee) on
  • The binomial expansion for an odd power has an even length, not an odd one.
  • Yes, we're looking at the binomial expansion for 2n.
  • Okay, so in that case you need to think some more about the middle term, 2n choose n, in that expansion.
  • 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.
  • It's simpler to phrase it in terms of the probability of surviving.
  • It's fairly similar. Sword 2 has a very slightly higher chance of surviving.
  • It's fairly similar. Sword 2 has a very slightly higher chance of surviving.
    Yes, but the number is much shorter to write ^_~
  • It wouldn't be the exact same length?
  • The probability of survival for sword 2 is ...?
  • hahahaha. when I did this earlier, I didn't bother simplifying. I just wrote: "this could probably be simplified". I did not realize by how much.
  • edited July 2012
    I don't see how the survival chance for sword 2 would simplify past 1/2 - (2n)!/(2^(2n+1)(n!)^2).

    EDIT: Well, you could write it as 1/2 - C(2n, n)/2^(2n)...
    Post edited by Linkigi(Link-ee-jee) on
  • edited July 2012
    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
    Post edited by lackofcheese on
  • 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.
Sign In or Register to comment.