Coin flipping game

topic posted Thu, March 30, 2006 - 3:49 PM by  Tom
Share/Save/Bookmark
Advertisement
Here's an interesting game I just learned about.

I'll offer you a choice of any of the 8 possible outcomes of flipping three coins in a row:

HHH, HHT, HTH, and so on.

Once you've chosen your pattern, I will choose a different pattern, and then we will start fo
flip a coin and record the results, something like this:

HTTHTHHHTHTHTTH...

We do this until one of our patterns appears. In the sample flipping sequence above, we'd
look at:

HTT, TTH, THT, THH, HHH, HHT, HTH, ...

In other words we look at overlapping sequences. If your pattern appers first, you win. If
mine does, I win. In other words, if you had picked HHH and I had picked HHT, you would
win in the game above.

What's your best strategy? What's mine? Which of us, if any, has an advantage?
posted by:
Tom
offline Tom
SF Bay Area
Advertisement
Advertisement
  • Re: Coin flipping game

    Thu, March 30, 2006 - 4:16 PM
    I think my strategy would be to simply flip a coin three times in a row and make those flips my guess. Each flip is independent odds from the previous flip, if I understand the setup correctly and by using a coin, I avoid my brain getting involved at trying to impress some other sort of pattern on things.

    I don't think either person has an advantage, if both choose a 3-flip combination and the order is important.

    Now, this is off the top of my head, and I haven't googled any of this, so I could be totally sniffin' glue.
    • Re: Coin flipping game

      Thu, March 30, 2006 - 4:34 PM
      Well, I can tell you there are certain very bad choices you could make. For example, if you pick HHH, I'll just pick THH. I'll win 7 times out of 8, since the only way you can win is to get your HHH right away. If any T comes up in the first three flips, I'm golden!

      So you should at least avoid HHH and TTT...
      • Re: Coin flipping game

        Thu, March 30, 2006 - 4:40 PM
        Ah, so we would be offering our guesses in a specific order, and guess #2 would know the contents of guess #1?

        If so, then yes, whoever guesses second has an advantage, I believe.

        I had assumed each person's guess was secret until all guesses had been lodged.
      • Re: Coin flipping game

        Fri, March 31, 2006 - 4:12 AM
        The disadvantage of HHH or TTT arises from the fact the the first occurrence of either, must either be at the start or be preceeded by only one coin state (T for HHH and H for TTT).
        The the first occurrence of any of the other six can be preceeded by either H or T.

        Karl
        • Re: Coin flipping game

          Fri, March 31, 2006 - 8:29 AM
          I'm sorry, but I don't understand this.

          You can't really say "HHH" must be preceded by a "T", because it's like the cat climbing out of a well joke -- if the "HHH" is preceded by an "H", then the "HHH" in question has never been reached.

          ref: A cat falls in a well and tries to climb out. It must climb ten feet. For every three feet it climbs in an hour, however, it gets exhausted and slides two feet back down while resting, thus only covering one foot per hour. How long does it take to reach the top? The first-blush answer most people give is ten hours, but the cat actually makes it out in seven hours.
          • Re: Coin flipping game

            Fri, March 31, 2006 - 2:46 PM
            I think Karl is just saying that if you've bet on HHH, the only way you can possibly win against THH is to get your three H's in a row. If a T occurs at any time, your opponent is certain to win eventually: he either gets his two H's and wins immediately, or a T occurs in which case he's got the first of "THH" and you need 3 H's and he only needs two to win.

            So we can certainly say (as a strategy) that:

            THH > HHH

            and for the same reason:

            HTT > TTT

            In both of the above examples, the person with the non-constant triple wins,
            on average, 7 times out of 8.

            So it would be crazy to pick HHH or TTT, but how about THH or HTT? Can they
            be beaten? And can the pattern that beats them be beaten? That's the essence
            of the problem.
            • Re: Coin flipping game

              Mon, April 3, 2006 - 5:05 AM
              What I am saying is that only the FIRST occurrence of HHH or whatever triplet you choose matters. The FIRST HHH must be either initial or preceeded by T. If it were preceeded by H, it would NOT be the first HHH.

              Note that the first occurrence of any of the six mixed triplet may be preceeded by either H or T, so cannot be pre-empted by a single opponent.

              Karl
  • Re: Coin flipping game

    Fri, March 31, 2006 - 3:02 PM
    Certainly there is some Constant that describes the expectation of change, the difference between a unity representing 'complete' randomness and a zero of 'predictibility'. The system of a coin-toss experiment should have a value of unity, because it is random by definition.

    If the system is random by definition, with a Constant of unity, choosing a sequence that maximized the randomness in the bet-on "string" (called the point in Craps), should win the game.

    By intuition I would avoid the sequence of repeating a result. With a larger string to bet on, the relationship would probably appear with some analysis.
  • Re: Coin flipping game

    Sat, April 1, 2006 - 9:57 PM
    Go to: www.dongrays.com/btd/flip-coin-game.html
    to see the outcome of the game for all choices (although the two rows in each table cell is giving up after at most 10 flips or 20 flips, so the computer didn't get into an infinite never win situation).

    So if:
    • A chooses HHH, B should chose THH
    • A chooses HHT, B should chose THH
    • A chooses HTH, B should chose TTH
    • A chooses HTT, B should chose HHT
    the other choices are just reversing H and T.

    Interestingly there are tactics in a double blind choice game.
    • Re: Coin flipping game

      Sun, April 2, 2006 - 7:40 AM
      I found this pretty amazing: that you can find a series of choices A, B, C and D such that on average:

      A comes up sooner than B
      B comes up sooner than C
      C comes up sooner than D
      and
      D comes up sooner than A

      For example:

      HHT < THH < TTH < HTT < HHT

      It's a non-transitive game that appears to be totally symmetric.

      I'd seen the non-transitive dice game before, so I wasn't totally blown away, but it was surprising to me to learn about this one.

      You don't really need a computer simulation to prove any of these: just draw a state diagram and it's clear in every case that the winner is determined after the first one or two flips, since one side gets locked in very early and then it's just a matter of time before that side wins.
      • Re: Coin flipping game

        Sun, April 2, 2006 - 11:00 AM
        What I found obvious was to basically remove A's last choice and add the reverse of the first sequence of A, ie HHH→THH HHT→THH HTH→TTH
        BUT... why if A chooses HTT is it best for B to choose HHT and not THT? So much that THT would statistically lose!

        FYI I did start writing things down, but I didn't have things particularly well laid out on paper, and since I can write programs fairly quickly (especially heavily recursive programs like this one), I decided to take the brute force approach, as well as it only took a few seconds to run the 3 million coin flips shown at my webpage. (I did it a few times, as you might guess, to get the format, background, etc just right).
        • Re: Coin flipping game

          Sun, April 2, 2006 - 11:04 AM
          Sorry I wasn't paying attention, it seems that if A chooses HTH then B should chose TTH (to statistically win) which is not the rule I just described, as chosing THT (by the rule) is statistically a draw. Suddenly my intuition is left me, as to why!
          • Re: Coin flipping game

            Sun, April 2, 2006 - 11:30 AM
            The rule seems to be to take the pattern of your opponent, say it's ABC, where A, B and C
            are either H or T, and pick as your rule B'AB, where B' is the opposite of B.

            So HHT -> THH, et cetera.

            To convince yourself that THH beats HHT, draw a state diagram. It's hard to draw them
            here, but here's what mine would look like for the contest above:

            I've got 7 states: S = start, A, B, C, D, E and F, where C is a win for HHT and F is a
            win for THH.

            From each state other than the ones that indicate a win, draw two arrows: one for flipping an H from that state, and one for flipping T, so label the arrows with H or T.

            For my diagram, A, B and C represent states on the way to a win for HHT and D, E and F on the way to a win for THH.

            Here are the "H" arrows: S->A, A->B, B->B, D->E, E->F

            Here are the "T" arrows: S->D, D->D, E->D B->C, A->D

            Note that once you get to D, it's a certain win for THH and once you get to B, it's a certain win for HHT.

            The first two flips can be HH, HT, TH, TT. HH puts you at B; all the others put you at D.

            I think I got that right...
            • Re: Coin flipping game

              Mon, April 3, 2006 - 5:20 AM
              "The rule seems to be to take the pattern of your opponent, say it's ABC, where A, B and C
              are either H or T, and pick as your rule B'AB, where B' is the opposite of B. "

              You could lose if BAB were to occur before your choice.

              However, if A=B, BAB cannot occur before your choice turns up, unless it's initial.

              Karl
            • Re: Coin flipping game

              Tue, April 4, 2006 - 5:21 AM
              "The rule seems to be to take the pattern of your opponent, say it's ABC, where A, B and C
              are either H or T, and pick as your rule B'AB, where B' is the opposite of B.

              So HHT -> THH, et cetera. "

              This works only if the opponent is foolish enough to choose a combination where the first two tosses are the same (as in Tom's example). It won't work if the oponent chooses one of HTH, HTT, THH or THT.

              If the oponent chose either HTH or HTT, you would choose HHT, but then THT may occur before either of the HTH or HTT chosen by the opponent.

              I too made a directed graph of the 8 choices and how they'd occur in the coin tosses. I'd show it if we had a fixed-width font.
              I find that HHT and TTH each occur at the end of a transitive triangle and Tom's strategy is to take the start of the same transitive triangle. The two transitive triangles are

              HTT->TTT->TTH and THH->HHH->HHT

              Karl
              • Re: Coin flipping game

                Tue, April 4, 2006 - 7:15 AM
                If you choose HTH and I pick HHT, we both spin at the start until an H shows up.

                Then we're both one step closer to winning.

                If a second H occurs, I'm golden: certain to win.

                If a T occurs, you may win, but a T after that will dump you back to Start,
                so you don't always win.

                In other words, I have a better chance than you.

                A similar analysis works if you pick HTT and I pick HHT.

Recent topics in "Mathematics"

Topic Author Replies Last Post
Number theory conjecture Larry 9 September 25, 2011
Need some examples... chycho 3 November 14, 2010
share your math jokes! Sam 69 June 21, 2010
minitab or excel? BiteMe 20 May 17, 2010