Skip to content

Commit

Permalink
Update Diamonds.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
norvig authored May 16, 2023
1 parent 05110f3 commit 9d0abf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipynb/Diamonds.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
" \n",
"# Wei-Hwa's Diamond-Buying Game \n",
"\n",
"Wei-Hwa Huang writes: \"*You are playing a game where you are trying to buy diamonds with coins. You can buy a random bag of diamonds for 12 coins, look in the bag, and [immediately] decide whether to sell it back for 11 coins or keep it. You can also purchase a bag for 1 coin but you **must** sell it back for 1 coin (i.e., you can basically figure out the distribution [by peeking at multiple bags for free]). What is a general strategy for maximizing the number of diamonds you keep (that is, total number of diamonds in bags not sold back)? Include analysis of end cases (e.g., if you spend your last 12 coins, it is never a good idea to sell the bag back).*\n",
"Wei-Hwa Huang writes: \"*You are playing a game where you are trying to buy diamonds with coins. You can buy a random bag of diamonds for 12 coins, look in the bag, and [immediately] decide whether to sell it back for 11 coins or keep it. You can also purchase a bag for 1 coin but you __must__ sell it back for 1 coin (i.e., you can basically figure out the distribution [by peeking at multiple bags for free]). What is a general strategy for maximizing the number of diamonds you keep (that is, total number of diamonds in bags not sold back)? Include analysis of end cases (e.g., if you spend your last 12 coins, it is never a good idea to sell the bag back).*\n",
"\n",
"## Strategy\n",
"\n",
Expand Down

0 comments on commit 9d0abf8

Please sign in to comment.