Brain teasers and puzzles

Discussion in 'General Chatter' started by Exohedron, Apr 15, 2016.

  1. Lissa Lysik'an

    Lissa Lysik'an Dragon-loving Faerie

    @Exohedron I understand probability theory. I have access to someone who knows it better than almost anyone else in the world. We both do not do words well - we take them literally. We do not make assumptions. The problem as stated is wrong. It requires an assumption we are not aware of to change the outcome.
    You'll need to explain this, since I doubt anyone is going to figure out how to get information that allows them to alter the odds when there is a rule explicitly forbidding getting information to improve the odds.
     
  2. Exohedron

    Exohedron Doesn't like words

    The trick is to increase the correlation between the colors the two of you point to, rather than trying to change the probabilities for individual actions. And this is possible without you receiving any information about your own hats.
     
  3. Lissa Lysik'an

    Lissa Lysik'an Dragon-loving Faerie

    That makes no sense since you point once, with no information on what the other person is going to point to.
    The process as the literal interpretation of the rules is:
    Hats of random colors are stacked on heads.
    Signal.
    INSTANT point at own hat of choice.
    There is no opportunity there for information exchange of any sort or increasing of correlation. Not with pure random choice of colors.
    There is an assumption in the rules somewhere but I can't see it because I do not use assumptions in solving problems - I write software that aims lasers at people - assumptions would be bad.
     
  4. Lissa Lysik'an

    Lissa Lysik'an Dragon-loving Faerie

    For example - say we devise the strategy that I point to the hat on my head that corresponds to a white hat on your head - does it increase the probability of me hitting a white hat on my head? No. Same for if I point at the corresponding black hat on my head. My odds of pointing at a white hat on my head is still 50/50. Unless I can change my choice based on what you do, there is no way to alter the odds.
     
  5. Exohedron

    Exohedron Doesn't like words

    Try it out. Write out the 64 scenarios for the hat colors and see what happens. Don't try to reason it through; you can't see the assumptions you're currently making.
    I think I know where you're going wrong, but I'm not sure I have an intuitive explanation for what happens here. The math checks out, though.
     
  6. Lissa Lysik'an

    Lissa Lysik'an Dragon-loving Faerie

    I'll have to write a program to do this.
    My algorithm will be
    pA and pB have arrays of three boolean values as members.
    pA chooses item based on the index of the first item in pB's array that is true.
    pB does same.
    iterate over all possible combinations.
    I predict the results will be exactly probability of both finding true to be .25
    But will have to actually write the code when I have not been sipping Crown Royal and Guinness :D
     
  7. Exohedron

    Exohedron Doesn't like words

    One of my friends was a probabilist and was always doing simulations. I wondered at that for a while, until I realized that even for probabilists, probability can often be really unintuitive so unlike in many other branches of mathematics, guessing the correct answer based on hunches and appeals to "beauty" might not be so easy.
     
  8. Lissa Lysik'an

    Lissa Lysik'an Dragon-loving Faerie

    Hm - there is the case that pA or pB does not have a true condition (all hats are black).
    The program will have to account for pointing at an index that is actually wrong.
     
    Last edited: May 30, 2016
  9. strictly quadrilateral

    strictly quadrilateral alive, alive, alive!

    like the monty hall problem, with the three doors. it's the simplest probability problem i've ever seen and yet every time someone comes across it for the first time it takes forever to convince them that, no, that's the actual answer.
     
  10. The Phoenixian

    The Phoenixian Not an eldrtich abomination, but getting there.

    I remember something like this with coins, in which the object was which three coin flip pattern in an arbitrarily long chain of flips was more common between... I think it was HTT and HTH (DON'T quote me on that though.)

    The notable quantity was that, despite what intuition would say, HTT would come up first. The reason being that a break in the pattern of HTH would produce a sequence starting with Tails, while a break in the sequence of HTT would produce a sequence starting with heads. Thus any time HTT failed, you were already one third of the way to the next sequence and just needed two more proper flips while in the case of HTH, you had to wait for a new heads roll to start all over again.

    This hat trick seems like it comes from the same place.

    If so, it becomes a question of how to arrange the hats and to have a full list of hat sequences and probabilities.

    One would imagine that, ideally, one would look through every possible arrangements of hats (from "his head 1st , my head 1st , his head 2nd, my head 2nd etc. to my head 1st , his head 1st, his head 2nd, my head 2nd, his head 3rd, my head 3rd. and so on, until every possible reading of the order of hats, even the conventionally nonsensical, were accounted for. Intuition says that's around six factorial?) , and find the places where the confluences of patterns had the greatest probability of producing a white hat.
     
  11. Exohedron

    Exohedron Doesn't like words

    Yeah, the "which sequence occurs faster" question is really weird when you first come across it. Usually we just use HH and HT, though, to isolate the issue a bit more clearly.
    Anyway, for the hats it's actually not too bad to try out any given strategy; there's only going to be 64 cases for what hat colors you and your friend end up with. The trick is to convince yourself that it's worth trying things out, because even pretty dumb strategies can yield interesting results.
     
  12. TheSeer

    TheSeer 37 Bright Visionary Crushes The Doubtful

    Well, I have a strategy that's better than .25. Haven't proven it's the best, so it probably isn't.

    Each person finds the first white hat on their partner's head (counting from the top, say) and points to the corresponding position on their own head.

    If they both have white hats on top, they win. P=1/4
    If they both have black, then white, they win. P=1/16
    If they both have BBW, they win. P=1/64

    So the total chance of winning is 21/64.
     
  13. Lissa Lysik'an

    Lissa Lysik'an Dragon-loving Faerie

    No, they only win if both point to white. If either or both point to black they lose.
     
  14. TheSeer

    TheSeer 37 Bright Visionary Crushes The Doubtful

    I understand the rules, yes. Here's the math:

    Players on this strategy will win if and only if their hat arrangements match in certain ways. But it turns out that such matches are more likely than the 1/4 chance of winning if both players guess.

    First, imagine that both players have white hats on top. Player A sees player B's white hat on top, and points to their own top hat, which luckily is also white. Player B does the same thing in reverse. Note that the chance of winning here is not a chance of guessing right or knowing what color your hats are. The players will always win if both their top hats are white, and will always lose otherwise.

    The probability of player A's top hat being white is 1/2, and the probability of player B's top hat being white is also 1/2. It doesn't matter what the other hats are, because the players aren't looking past the topmost white hat on each other's heads. So the probability of getting a hat arrangement like this - and therefore winning - is 1/2 * 1/2 = 1/4. (Each hat has an independent 50/50 chance to be white or black, so you're going to see a lot of multiplying halves in this.)

    They also win if they each point to their middle hats and those hats are both white. For this to happen, the top hats have to both be black, because if one of them were white, the other player would point at their own top hat, which is either a loss or the win described above. Obviously, the second hats have to both be white. The third hats don't matter. The chances of a player getting white on top, then black are 1/2 * 1/2 = 1/4. Since this needs to happen for both players, the probability of this win is 1/4 * 1/4 = 1/16.

    Finally, they win if they each point to their bottom hats and those hats are both white. This isn't too likely, because the top and middle hats have to be black for it to happen. The probability of getting the particular three-hat arrangement Black-Black-White is 1/8, so the probability of this win is 1/8 * 1/8 = 1/64.

    (It occurs to me that I didn't say what players should do if their partner has no white hats. But then it occurs to me that it doesn't matter what you do in that situation because you can't win anyway.)

    These three win conditions are mutually exclusive (you can't have more than one at the same time), which means you can just add the probabilities:

    1/4 + 1/16 + 1/64=
    16/64 + 4/64 + 1/64 =
    21/64.

    I don't yet see how to prove whether or not this is the best possible strategy. The game is only winnable 49/64 of the time (if either player has all black hats, you're screwed) so that's an upper bound.
     
  15. Lissa Lysik'an

    Lissa Lysik'an Dragon-loving Faerie

    Ah, but excluding the bad cases isn't valid. There was no rule that the all black cases get tossed.
     
  16. TheSeer

    TheSeer 37 Bright Visionary Crushes The Doubtful

    I'm not excluding them from the set of possible outcomes, it's just that in the unwinnable case it doesn't matter what your strategy is.
     
  17. Lissa Lysik'an

    Lissa Lysik'an Dragon-loving Faerie

    But it does affect the overall odds.
     
  18. TheSeer

    TheSeer 37 Bright Visionary Crushes The Doubtful

    How should the calculations actually go, then?
     
  19. Lissa Lysik'an

    Lissa Lysik'an Dragon-loving Faerie

    I am in the process of writing a program that will do that to test my theory - but executive dysfunction is getting in the way.
    I am approaching it from the idea that the overall odds matter, but from your description I think that might be the wrong approach in the context of the game. You can't make a strategy that covers either all-black case since they are unwinnable anyway.
    So in the context of ignoring those, then your strategy improves the odds for the winnable cases - maybe. :)
    You didn't show the cases that are not matched (white top for pA, white second for pB, etc).

    Edit: but the overall odds remain the same - .25 - unless the all black cases are discarded and the players get a second chance.
     
    Last edited: Jun 1, 2016
  20. TheSeer

    TheSeer 37 Bright Visionary Crushes The Doubtful

    I don't need to count all the ways to lose (by mismatch or by unwinnable hat distribution), if I count all the ways to win, because it has to be one or the other. My claim is that the strategy I described will win on 21 out of 64 of possible hat distributions. The 15 unwinnable distributions are included in that 64, I'm not changing the rules so that unwinnable games don't count or aren't included in the probability. If there was an error in my math, could you point out specifically what it was?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice