3
$\begingroup$

Here's the question. It's quite difficult:

David is given a deck of 40 cards. There are 3 gold cards in the deck, 3 silver cards in the deck, 3 bronze cards in the deck and 3 black cards in the deck. If David draws the gold card on his first turn, he will win $50. (The object is to get at least one gold card). The other colored cards are used to help him get the gold card, while the remaining 28 do nothing.

David initially draws a hand of 6 cards, and will now try to draw a gold card, if he did not already already draw one. He may now use the other cards to help him. All of the differently colored cards may be used in the first turn.

David can use a silver card to draw 1 more card.

David can use a bronze card to draw 1 more card. However, he can only use 1 of these per turn.

David can use a black card to look at the top 3 cards of the deck, and add one of them to his hand. He then sends the rest back to the deck and shuffles. He can only use 1 of these cards per turn.

What are the odds David draws the gold card on his first turn?

  • 1
    What's a turn? And what's the source?2012-05-28
  • 0
    I got it from a friend of mine.2012-05-28
  • 0
    This is what he put: I believe the odds of him just drawing a gold card in the initial 6 cards 39.5%. The odds of him not drawing any colored cards in the first 6 cards is 9.8%. The remaining 50.7% is a mystery to me.2012-05-28
  • 0
    I think a turn clearly means a draw of 6 cards which ends when all six cards are drawn with the moves described in the rules for what he can do when silver, bronze and black cards are drawn.2012-05-28
  • 1
    It also depends on what he does. Does he use the black card first, or the bronze card, and which cards does he pick when looking at the top three? Once you have a clear deterministic strategy, then I think the best approach is to simulate the game, and see what the probability is.2012-05-28
  • 0
    By picking the top three cards in the deck I assume you mean the deck with the remaining 34 cards. When you say that he can add one of the three top cards to the deck that he would take a gold if ay least one is gold and then he would win. But if there are silver, bronze and black then his strategy matters as utdiscant mentioned. So there is no answer to the problem unless you provide a predetermined strategy when the black card is drawn.2012-05-28

2 Answers 2

3

I have implemented the game in Python using the following strategy:

  1. Look for the golden card
  2. Use black card first. When using the black card, we take cards with the following preference: gold > silver > bronze
  3. Use bronze card
  4. Use silver card

I then simulated the game by running it 1.000.000 times. The result is, that the game was won in 588152 of the simulations. So this indicates, that you have roughly a 58.8% chance of getting the gold card.

My implementation is here:

import random  # Card Game def playGame():     deck = []      for i in range(3):         deck.append("gold")         deck.append("silver")         deck.append("bronze")         deck.append("black")      for i in range(24):         deck.append("blank")      random.shuffle(deck)      hand = []      for i in range(6):         hand.append(deck.pop())      # Let the game begin     bronze_used = False     black_used = False      print "\nStarting hand"      while True:         print hand          # Check if he has the gold Card         if "gold" in hand:             print "Won!"             return 1          # Use black card         if "black" in hand:             black_used = True             hand.remove("black")              print "Used black"              # Look for the golden card             if "gold" in deck[0:3]:                 hand.append("gold")                 deck.remove("gold")                 continue              if "silver" in deck[0:3]:                 hand.append("silver")                 deck.remove("silver")                 random.shuffle(deck)                 continue              if "bronze" in deck[0:3] and bronze_used == False:                 hand.append("bronze")                 deck.remove("bronze")                 random.shuffle(deck)                 continue              continue          # Use bronze card         if "bronze" in hand and bronze_used == False:             bronze_used = True             print "Used bronze"              hand.remove("bronze")             hand.append(deck.pop())             continue          # Use silver card         if "silver" in hand:             print "Used silver"              hand.remove("silver")             hand.append(deck.pop())             continue          if "gold" not in hand:             if "silver" not in hand:                 if "black" not in hand or black_used:                     if "bronze" not in hand or bronze_used:                         return 0  win = 0 N = 10000  for i in range(N):     win = win + playGame()  print win, "wins of a total of", N 

Edit: I changed the simulation to use silver cards before bronze, but this did not change the result. Still 58.8% chance of winning. This also makes fine sense - to me at least.

  • 0
    Wow, this is great. Thanks :)2012-05-28
  • 0
    There are some small errors in the script, I will fix them, and update the answer.2012-05-28
  • 0
    I had a small error, which made it possible to use multiple bronze cards.2012-05-28
  • 0
    If it wouldn't be too much trouble, I'd really like to see the same bit run, but with silvers used before bronzes used before black. For some reason, my intuition tells me this might lead to a different (better?) result. But +1 - great work.2012-05-28
  • 0
    @utdiscant You provide a nice answer and I gave you an upvote. But although simulation gives an accurate answer given your strategy, it is possible to calculate the answer mathematically even if it is complicated. Also the OP did not specify a strategy. So you are assuming something not given in the question.2012-05-28
  • 0
    @mixedmath, I have changed the simulation to use silver before bronze, and included the results in the answer. This does not alter the result.2012-05-28
  • 0
    @Michael I completely agree, that a simulation is not the "correct" answer to the question. On the other hand, that OP did not specify a stratey, is not my problem, but a serious problem with the question.2012-05-28
  • 0
    I think the mathematics would be complicated. Doing the simulation is a nice way to get to see what the answer is for your assumed strategy which is certainly a sensible one. I wonder if there is a different strategy that would lead to a higher probability to get a gold card.2012-05-28
  • 0
    I do not think there is a better strategy. We ignore the gold card, since this gives a win. The only thing to consider, is that if you already have a bronze card in your hand when you use a black card, do not take a bronze card. Also, taking a black card using a black card does not give you anything.2012-05-28
  • 0
    Brilliant! If I were able to give you another vote, I would.2012-05-28
  • 2
    Seem to me that there is an error in your simulator: you must shuffle the deck even if you don't pick any card (after using black card), otherwise you continue the game with "blank-blank-blank", and you fail every time, instead of drawing a new card with a silver/bronze and having a chanche of it being gold/silver/bronze. So the probability should be a little higher.2012-11-11
  • 0
    @carlop I think there are two more errors: a) the simulator can use more than one black card, because `black_used` is not checked, b) when using a black card, taking a useless card is *better* than taking no card, because getting a useful card is more probable then (after shuffling!).2017-05-11
1

We can ignore the silver cards-each should be replaced whenever we see it with another. Similarly, if you have a bronze, you should draw immediately (but subsequent bronzes don't let you replace them). So the deck is really $36$ cards, $3$ gold, $3$ black, and $30$ other (including the 2 bronzes after the first). You win if there is a gold in the first $6$, or a black in the first six, no gold in 1-6 and a gold in 7-9, or a black in 1-6, another in 1-9, no gold in 1-9 and a gold in 10-12, or a black in 1-6, another in 1-9, another in 1-12, no gold in 1-12 and a gold in 13-15. All these possibilities are disjoint, so you can just add them up.

  • 0
    I'm not convinced. If a black is used, the three next cards aren't discarded; instead, the deck is shuffled. The probabilities of getting black-black-gold or black-black-black-gold are slightly different from what you propose. Also, you can't use more than one black anyways. And isn't the distribution for the position of the "first bronze of 3" different from "one bronze"?2017-05-11