{"id":2620,"date":"2019-04-05T17:34:24","date_gmt":"2019-04-05T22:34:24","guid":{"rendered":"https:\/\/laurentlessard.com\/bookproofs\/?p=2620"},"modified":"2019-04-06T01:28:18","modified_gmt":"2019-04-06T06:28:18","slug":"gift-card-puzzle","status":"publish","type":"post","link":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/","title":{"rendered":"Gift card puzzle"},"content":{"rendered":"<body><p><\/p>Here is a puzzle from the <a href=\"https:\/\/fivethirtyeight.com\/features\/does-your-gift-card-still-have-free-drinks-on-it\/\">Riddler<\/a> about gift cards:\n<blockquote><p>\nYou\u2019ve won two gift cards, each loaded with 50 free drinks from your favorite coffee shop. The cards look identical, and because you\u2019re not one for record-keeping, you randomly pick one of the cards to pay with each time you get a drink. One day, the clerk tells you that he can\u2019t accept the card you presented to him because it doesn\u2019t have any drink credits left on it.<\/p>\n<p>What is the probability that the other card still has free drinks on it? How many free drinks can you expect are still available?<\/p><\/blockquote>\n<p>Here is my solution:<br>\n<a href=\"javascript:Solution('soln_gift_card','toggle_gift_card')\" id=\"toggle_gift_card\">[Show Solution]<\/a><\/p>\n<div id=\"soln_gift_card\" style=\"display: none\">\n<p>Let\u2019s suppose each card starts with $n$ drinks. There are three ways the sequence of buying drinks can end:<\/p>\n<ol>\n<li> The first card gets maxed out and the second card has $k$ drinks remaining with $k\\ge 1$. This means we purchased a total of $2n-k$ drinks and $n$ of them ended up on the first card. Then, we tried to purchase one additional drink on the first card and the buying stopped. The probability of this occurring is: $(\\tfrac{1}{2})^{2n-k+1}\\binom{2n-k}{n}$.\n<\/li>\n<li> both cards get maxed out and then we try to buy one more drink on either card. This means we purchased a total of $2n$ drinks and $n$ of them ended up on the first card. The probability of this occurring is $(\\tfrac{1}{2})^{2n}\\binom{2n}{n}$.\n<\/li>\n<li> The second card gets maxed out and the first card has $k$ drinks remaining with $k\\ge 1$. This is exactly analogous to the first case, and the probability of this occurring is again: $(\\tfrac{1}{2})^{2n-k+1}\\binom{2n-k}{n}$.\n<\/li>\n<\/ol>\n<p>Putting all of this together, we end up with a tidy formula for $p(n,k)$, the probability that when the game ends, the other card has exactly $k$ drinks remaining on it:<\/p>\n<p style=\"text-align: center;\"><span style=\"background-color: #AFC8E6; padding: 25px 10px 25px 10px;\">$\\displaystyle<br>\np(n,k) = \\frac{1}{2^{2n-k}} \\binom{2n-k}{n}<br>\n$<\/span><\/p>\n<p>To double-check that this is a valid probability mass function, we should have $\\sum_{k=0}^n p(n,k) = 1$. This is indeed the case, but it\u2019s rather challenging to verify. Here is a link to the <a href=\"https:\/\/www.wolframalpha.com\/input\/?i=Sum%5B+1%2F2%5E(2+n+-+k)+Binomial%5B2+n+-+k,+n%5D,+%7Bk,+0,+n%7D%5D\">WolframAlpha computation<\/a>. Here is plot of the probability mass function for $n=50$.<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks0.png\"><img decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks0-1024x727.png\" alt=\"\" width=\"840\" height=\"596\" class=\"aligncenter size-large wp-image-2627\" loading=\"lazy\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks0-1024x727.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks0-300x213.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks0-768x545.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks0-1200x852.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks0.png 1269w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>We can now answer the first question: the probability that the other card still has drinks on it is one minus the probability that there are no drinks left, i.e. $1-p(n,0)$. This evaluates to:<\/p>\n<p style=\"text-align: center;\"><span style=\"background-color: #AFC8E6; padding: 25px 10px 25px 10px;\">$\\displaystyle<br>\n\\mathrm{Prob}\\Bigl(\\begin{smallmatrix}\\text{there are drinks left}\\\\\\text{on the other card}\\end{smallmatrix}\\Bigr)<br>\n= 1-\\frac{1}{4^n} \\binom{2n}{n} \\approx 1-\\frac{1}{\\sqrt{\\pi n}}<br>\n$<\/span><\/p>\n<p>This makes sense; the only way there can be no drinks left is if we purchased $2n$ drinks, and we were lucky to use each card exactly $n$ times. We would expect this probability to get smaller as $n$ gets larger. The approximation I used above comes from Stirling-like approximations for binomial coefficients (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Binomial_coefficient#Both_n_and_k_large\">see here<\/a>). When $n=50$ as in the problem statement, the probability evaluates to $92.04\\%$. Here is a plot showing how the probability of there being drinks on the other card slowly tends to $1$ as $n$ gets larger:<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks1.png\"><img decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks1-1024x770.png\" alt=\"\" width=\"840\" height=\"632\" class=\"aligncenter size-large wp-image-2626\" loading=\"lazy\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks1-1024x770.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks1-300x226.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks1-768x578.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks1-1200x902.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks1.png 1242w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>Now let\u2019s address the second question: what is the expected number of drinks on the other card? We will compute the expected value directly from the probability mass function: $E_n = \\sum_{k=0}^n k\\, p(n,k)$. We find:<\/p>\n<p style=\"text-align: center;\"><span style=\"background-color: #AFC8E6; padding: 25px 10px 25px 10px;\">$\\displaystyle<br>\n\\mathbb{E}\\Bigl(\\begin{smallmatrix}\\text{number of drinks left}\\\\\\text{on the other card}\\end{smallmatrix}\\Bigr)<br>\n= \\frac{2n+1}{4^n}\\binom{2n}{n}-1 \\approx \\frac{2n+1}{\\sqrt{\\pi n}}-1<br>\n$<\/span><\/p>\n<p>Again, the derivation is challenging so I omitted it, but here is the <a href=\"https:\/\/www.wolframalpha.com\/input\/?i=Sum%5B+k%2F2%5E(2+n+-+k)+Binomial%5B2+n+-+k,+n%5D,+%7Bk,+0,+n%7D%5D\">WolframAlpha link<\/a>. Here is a plot of this function as it changes with $n$ along with the approximation (which is quite good!)<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks2.png\"><img decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks2-1024x782.png\" alt=\"\" width=\"840\" height=\"641\" class=\"aligncenter size-large wp-image-2625\" loading=\"lazy\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks2-1024x782.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks2-300x229.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks2-768x586.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks2-1200x916.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks2.png 1248w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>When $n=50$ as in the problem statement, the expected number of drinks remaining on the other card is $7.0385$. This corresponds to the expected value of the probability distribution plotted in the first image.\n<\/p><\/div>\n<p><\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>Here is a puzzle from the Riddler about gift cards: You\u2019ve won two gift cards, each loaded with 50 free drinks from your favorite coffee shop. The cards look identical, and because you\u2019re not one for record-keeping, you randomly pick one of the cards to pay with each time you get a drink. One day, &hellip; <a href=\"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Gift card puzzle&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2625,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7],"tags":[9,6,8,2],"class_list":["post-2620","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-riddler","tag-binomial","tag-counting","tag-probability","tag-riddler"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Here is a puzzle from the Riddler about gift cards: You&#039;ve won two gift cards, each loaded with 50 free drinks from your favorite coffee shop. The cards look identical, and because you&#039;re not one for record-keeping, you randomly pick one of the cards to pay with each time you get a drink. One day,\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Laurent\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Book Proofs - A blog for mathematical riddles, puzzles, and elegant proofs\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Gift card puzzle - Book Proofs\" \/>\n\t\t<meta property=\"og:description\" content=\"Here is a puzzle from the Riddler about gift cards: You&#039;ve won two gift cards, each loaded with 50 free drinks from your favorite coffee shop. The cards look identical, and because you&#039;re not one for record-keeping, you randomly pick one of the cards to pay with each time you get a drink. One day,\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-04-05T22:34:24+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-04-06T06:28:18+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Gift card puzzle - Book Proofs\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Here is a puzzle from the Riddler about gift cards: You&#039;ve won two gift cards, each loaded with 50 free drinks from your favorite coffee shop. The cards look identical, and because you&#039;re not one for record-keeping, you randomly pick one of the cards to pay with each time you get a drink. One day,\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#blogposting\",\"name\":\"Gift card puzzle - Book Proofs\",\"headline\":\"Gift card puzzle\",\"author\":{\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/author\\\/laurentlessard\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/gift_card_drinks2.png\",\"width\":1248,\"height\":953},\"datePublished\":\"2019-04-05T17:34:24-05:00\",\"dateModified\":\"2019-04-06T01:28:18-05:00\",\"inLanguage\":\"en-US\",\"commentCount\":8,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#webpage\"},\"articleSection\":\"The Riddler, binomial, counting, probability, Riddler\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/category\\\/riddler\\\/#listItem\",\"name\":\"The Riddler\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/category\\\/riddler\\\/#listItem\",\"position\":2,\"name\":\"The Riddler\",\"item\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/category\\\/riddler\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#listItem\",\"name\":\"Gift card puzzle\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#listItem\",\"position\":3,\"name\":\"Gift card puzzle\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/category\\\/riddler\\\/#listItem\",\"name\":\"The Riddler\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/#organization\",\"name\":\"Book Proofs\",\"description\":\"A blog for mathematical riddles, puzzles, and elegant proofs\",\"url\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/author\\\/laurentlessard\\\/#author\",\"url\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/author\\\/laurentlessard\\\/\",\"name\":\"Laurent\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1d179b3e810347763b0da7d94548624f7326a3b71d146194946bba92427ff8fb?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Laurent\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#webpage\",\"url\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/\",\"name\":\"Gift card puzzle - Book Proofs\",\"description\":\"Here is a puzzle from the Riddler about gift cards: You've won two gift cards, each loaded with 50 free drinks from your favorite coffee shop. The cards look identical, and because you're not one for record-keeping, you randomly pick one of the cards to pay with each time you get a drink. One day,\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/author\\\/laurentlessard\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/author\\\/laurentlessard\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/gift_card_drinks2.png\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#mainImage\",\"width\":1248,\"height\":953},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/gift-card-puzzle\\\/#mainImage\"},\"datePublished\":\"2019-04-05T17:34:24-05:00\",\"dateModified\":\"2019-04-06T01:28:18-05:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/#website\",\"url\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/\",\"name\":\"Book Proofs\",\"description\":\"A blog for mathematical riddles, puzzles, and elegant proofs\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/laurentlessard.com\\\/bookproofs\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Gift card puzzle - Book Proofs","description":"Here is a puzzle from the Riddler about gift cards: You've won two gift cards, each loaded with 50 free drinks from your favorite coffee shop. The cards look identical, and because you're not one for record-keeping, you randomly pick one of the cards to pay with each time you get a drink. One day,","canonical_url":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#blogposting","name":"Gift card puzzle - Book Proofs","headline":"Gift card puzzle","author":{"@id":"https:\/\/laurentlessard.com\/bookproofs\/author\/laurentlessard\/#author"},"publisher":{"@id":"https:\/\/laurentlessard.com\/bookproofs\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks2.png","width":1248,"height":953},"datePublished":"2019-04-05T17:34:24-05:00","dateModified":"2019-04-06T01:28:18-05:00","inLanguage":"en-US","commentCount":8,"mainEntityOfPage":{"@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#webpage"},"isPartOf":{"@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#webpage"},"articleSection":"The Riddler, binomial, counting, probability, Riddler"},{"@type":"BreadcrumbList","@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/laurentlessard.com\/bookproofs#listItem","position":1,"name":"Home","item":"https:\/\/laurentlessard.com\/bookproofs","nextItem":{"@type":"ListItem","@id":"https:\/\/laurentlessard.com\/bookproofs\/category\/riddler\/#listItem","name":"The Riddler"}},{"@type":"ListItem","@id":"https:\/\/laurentlessard.com\/bookproofs\/category\/riddler\/#listItem","position":2,"name":"The Riddler","item":"https:\/\/laurentlessard.com\/bookproofs\/category\/riddler\/","nextItem":{"@type":"ListItem","@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#listItem","name":"Gift card puzzle"},"previousItem":{"@type":"ListItem","@id":"https:\/\/laurentlessard.com\/bookproofs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#listItem","position":3,"name":"Gift card puzzle","previousItem":{"@type":"ListItem","@id":"https:\/\/laurentlessard.com\/bookproofs\/category\/riddler\/#listItem","name":"The Riddler"}}]},{"@type":"Organization","@id":"https:\/\/laurentlessard.com\/bookproofs\/#organization","name":"Book Proofs","description":"A blog for mathematical riddles, puzzles, and elegant proofs","url":"https:\/\/laurentlessard.com\/bookproofs\/"},{"@type":"Person","@id":"https:\/\/laurentlessard.com\/bookproofs\/author\/laurentlessard\/#author","url":"https:\/\/laurentlessard.com\/bookproofs\/author\/laurentlessard\/","name":"Laurent","image":{"@type":"ImageObject","@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/1d179b3e810347763b0da7d94548624f7326a3b71d146194946bba92427ff8fb?s=96&d=mm&r=g","width":96,"height":96,"caption":"Laurent"}},{"@type":"WebPage","@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#webpage","url":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/","name":"Gift card puzzle - Book Proofs","description":"Here is a puzzle from the Riddler about gift cards: You've won two gift cards, each loaded with 50 free drinks from your favorite coffee shop. The cards look identical, and because you're not one for record-keeping, you randomly pick one of the cards to pay with each time you get a drink. One day,","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/laurentlessard.com\/bookproofs\/#website"},"breadcrumb":{"@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#breadcrumblist"},"author":{"@id":"https:\/\/laurentlessard.com\/bookproofs\/author\/laurentlessard\/#author"},"creator":{"@id":"https:\/\/laurentlessard.com\/bookproofs\/author\/laurentlessard\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2019\/04\/gift_card_drinks2.png","@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#mainImage","width":1248,"height":953},"primaryImageOfPage":{"@id":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/#mainImage"},"datePublished":"2019-04-05T17:34:24-05:00","dateModified":"2019-04-06T01:28:18-05:00"},{"@type":"WebSite","@id":"https:\/\/laurentlessard.com\/bookproofs\/#website","url":"https:\/\/laurentlessard.com\/bookproofs\/","name":"Book Proofs","description":"A blog for mathematical riddles, puzzles, and elegant proofs","inLanguage":"en-US","publisher":{"@id":"https:\/\/laurentlessard.com\/bookproofs\/#organization"}}]},"og:locale":"en_US","og:site_name":"Book Proofs - A blog for mathematical riddles, puzzles, and elegant proofs","og:type":"article","og:title":"Gift card puzzle - Book Proofs","og:description":"Here is a puzzle from the Riddler about gift cards: You've won two gift cards, each loaded with 50 free drinks from your favorite coffee shop. The cards look identical, and because you're not one for record-keeping, you randomly pick one of the cards to pay with each time you get a drink. One day,","og:url":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/","article:published_time":"2019-04-05T22:34:24+00:00","article:modified_time":"2019-04-06T06:28:18+00:00","twitter:card":"summary_large_image","twitter:title":"Gift card puzzle - Book Proofs","twitter:description":"Here is a puzzle from the Riddler about gift cards: You've won two gift cards, each loaded with 50 free drinks from your favorite coffee shop. The cards look identical, and because you're not one for record-keeping, you randomly pick one of the cards to pay with each time you get a drink. One day,"},"aioseo_meta_data":{"post_id":"2620","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2024-06-01 19:58:31","updated":"2026-06-07 14:40:42","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/laurentlessard.com\/bookproofs\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/laurentlessard.com\/bookproofs\/category\/riddler\/\" title=\"The Riddler\">The Riddler<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tGift card puzzle\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/laurentlessard.com\/bookproofs"},{"label":"The Riddler","link":"https:\/\/laurentlessard.com\/bookproofs\/category\/riddler\/"},{"label":"Gift card puzzle","link":"https:\/\/laurentlessard.com\/bookproofs\/gift-card-puzzle\/"}],"_links":{"self":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/2620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/comments?post=2620"}],"version-history":[{"count":5,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/2620\/revisions"}],"predecessor-version":[{"id":2629,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/2620\/revisions\/2629"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media\/2625"}],"wp:attachment":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media?parent=2620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/categories?post=2620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/tags?post=2620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}