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?

  • 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
    @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