From 9d0abf8593ce5bf653d558d30683fc61fd20a032 Mon Sep 17 00:00:00 2001 From: Peter Norvig Date: Tue, 16 May 2023 09:25:05 -0700 Subject: [PATCH] Update Diamonds.ipynb --- ipynb/Diamonds.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipynb/Diamonds.ipynb b/ipynb/Diamonds.ipynb index d56ee4c..d190b87 100644 --- a/ipynb/Diamonds.ipynb +++ b/ipynb/Diamonds.ipynb @@ -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",