{"id":544,"date":"2016-06-18T19:23:33","date_gmt":"2016-06-18T19:23:33","guid":{"rendered":"http:\/\/www.laurentlessard.com\/bookproofs\/?p=544"},"modified":"2016-06-21T23:13:41","modified_gmt":"2016-06-21T23:13:41","slug":"the-puzzle-of-the-picky-eater","status":"publish","type":"post","link":"https:\/\/laurentlessard.com\/bookproofs\/the-puzzle-of-the-picky-eater\/","title":{"rendered":"The puzzle of the picky eater"},"content":{"rendered":"<p>Today&#8217;s <a href=\"http:\/\/fivethirtyeight.com\/features\/can-you-solve-the-puzzle-of-the-picky-eater\/\">Riddler<\/a> post is a neat problem about calculating areas.<\/p>\n<blockquote><p>Every morning, before heading to work, you make a sandwich for lunch using perfectly square bread. But you hate the crust. You hate the crust so much that you\u2019ll only eat the portion of the sandwich that is closer to its center than to its edges so that you don\u2019t run the risk of accidentally biting down on that charred, stiff perimeter. <em>How much of the sandwich will you eat?<\/em><\/p>\n<p>Extra credit: What if the bread were another shape &#8212; triangular, hexagonal, octagonal, etc.? What\u2019s the most efficient bread shape for a crust-hater like you?<\/p><\/blockquote>\n<p>Here is my solution:<br \/>\n<a href=\"javascript:Solution('soln_bread','toggle_bread')\" id=\"toggle_bread\">[Show Solution]<\/a><\/p>\n<div id=\"soln_bread\" style=\"display: none\">\n<p>As with the problem of the <a href=\"https:\/\/laurentlessard.com\/bookproofs\/overflowing-martini-glass\/\">overflowing martini glass<\/a>, it&#8217;s possible to solve the present problem without using any calculus, relying on properties of conic sections. The first thing to know is that the set of points equidistant from a point (called the focus) and a line (called the directrix) is a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Parabola\">parabola<\/a>. In fact, this is the definition of a parabola!<\/p>\n<p>The center of the sandwich is the focus and each crusty edge a directrix. Together, they define parabolas that separates the &#8220;safe-to-eat&#8221; from the &#8220;unsafe-to-eat&#8221; parts of the sandwich. If the sandwich is a regular polygon with $n$ sides, the edible region will be the union of $n$ parabolic segments. Due to the symmetry in the problem, it suffices to examine half of one of the segments.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_parabola.png\" alt=\"bread_parabola\" width=\"285\" height=\"350\" class=\"alignright size-full wp-image-549\" \/><img decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_parabola2.png\" alt=\"bread_parabola2\" width=\"285\" class=\"alignright size-full wp-image-550\" \/>But how do we compute areas? We&#8217;ll use the following property of parabolas: the tangent line at any point makes equal angles to the lines that meet up with the focus and the directrix. The website cut-the-knot has a <a href=\"http:\/\/www.cut-the-knot.org\/Curriculum\/Geometry\/ParabolaFocal.shtml\">very elegant and visual proof of this fact<\/a>. So in the figure to the right, $\\angle FPT = \\angle P&#8217;PT$. Consequently, for incremental areas (blue and yellow), both have the same base and height and so <strong>the blue area is half the yellow area<\/strong>. Summing up all these incremental areas, we can see that the area swept by the parabola will be exactly half of the area between the parabola and the directrix. We illustrate this fact in the next figure. Note that $\\theta=\\frac{\\pi}{n}$ (e.g. $\\theta=45^\\circ$ for square bread).<\/p>\n<p>We can calculate $x$ by computing the length of $FG$ in two different ways. Namely: $FG = 1-x = x\\cos\\theta$<br \/>\nTherefore, $x = (1+\\cos\\theta)^{-1}$. What we&#8217;re really after is the fraction of the total area that is blue, which we&#8217;ll call $E$. Let&#8217;s first compute the fraction that is pink by using similar triangles. This gives us:<br \/>\n\\[<br \/>\n\\frac{B}{B+A+A\/2} = x^2<br \/>\n\\]<\/p>\n<p>We can now compute the fraction that is blue by simple algebra:<br \/>\n\\[<br \/>\nE =<br \/>\n\\frac{A\/2}{B+A+A\/2} = \\frac{1}{3}\\left(1 &#8211; \\frac{B}{B+A+A\/2}\\right) = \\frac{1-x^2}{3}<br \/>\n\\]<\/p>\n<p>Substituting the $x$ we found before into the expression for $E$, we get our final answer:<\/p>\n<p style=\"text-align: center;\"><span style=\"background-color: #AFC8E6; padding: 25px 10px 25px 10px;\">$\\displaystyle<br \/>\nE(n) =  \\frac{1}{3} \\left( 1 \\,-\\, \\frac{1}{(1+\\cos\\tfrac{\\pi}{n})^2} \\right)<br \/>\n$<\/span><\/p>\n<p>For $n=4$ (square bread), we obtain $E(4)=\\frac{1}{3}(4\\sqrt{2}-5) \\approx 0.219$. As we increase $n$, $E(n)$ increases as well, as shown in the plot below.<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_fraction.png\"><img decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_fraction.png\" alt=\"bread_fraction\" width=\"777\" class=\"aligncenter size-full wp-image-559\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_fraction.png 777w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_fraction-300x185.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_fraction-768x474.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><\/p>\n<p>In the limit as $n\\to\\infty$, $\\cos\\frac{\\pi}{n} \\to 1$, and we obtain $E(\\infty) = \\frac{1}{4}$, which makes sense because the polygon becomes a circle and then the portion that is eaten is just a circle with half the radius (one quarter of the area). The circle is therefore the most efficient shape. It would be interesting to investigate non-polygonal shapes as well, but then we&#8217;d have to come up with a non-ambiguous way of defining the &#8220;center&#8221; of the shape.<\/p>\n<p>Here is a figure showing the part of the sandwich that gets eaten as we change the number of sides.<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_multi.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_multi.png\" alt=\"bread_multi\" width=\"1709\" height=\"824\" class=\"aligncenter size-full wp-image-551\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_multi.png 1709w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_multi-300x145.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_multi-768x370.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_multi-1024x494.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/06\/bread_multi-1200x579.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>I made the above figure using the following Mathematica script:<\/p>\n<pre>\r\nTable[ n = 4i + j + 3;  \u03b8 = \u03c0\/n;  L = 1\/Cos[\u03b8]; \r\nRx = Apply[And, Table[ x^2 + y^2 \u2264 (1 + Sin[2\u03b8 k]x + Cos[2\u03b8 k]y)^2, {k,0,n-1} ]];\r\nAx = Apply[And, Table[ Sin[2\u03b8 k]x - Cos[2\u03b8 k]y \u2264 1, {k,0,n-1} ]];\r\nRegionPlot[{Rx,Ax}, {x,-L,L}, {y,-L,L}, PlotPoints->40, Frame->None],\r\n{i,0,1}, {j,0,3} ] \/\/MatrixForm\r\n<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s Riddler post is a neat problem about calculating areas. Every morning, before heading to work, you make a sandwich for lunch using perfectly square bread. But you hate the crust. You hate the crust so much that you\u2019ll only eat the portion of the sandwich that is closer to its center than to its &hellip; <a href=\"https:\/\/laurentlessard.com\/bookproofs\/the-puzzle-of-the-picky-eater\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The puzzle of the picky eater&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"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":[11,10,2],"class_list":["post-544","post","type-post","status-publish","format-standard","hentry","category-riddler","tag-conic-sections","tag-geometry","tag-riddler"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/544","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=544"}],"version-history":[{"count":65,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/544\/revisions"}],"predecessor-version":[{"id":630,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/544\/revisions\/630"}],"wp:attachment":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media?parent=544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/categories?post=544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/tags?post=544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}