{"id":3901,"date":"2024-01-20T00:09:51","date_gmt":"2024-01-20T06:09:51","guid":{"rendered":"https:\/\/laurentlessard.com\/bookproofs\/?p=3901"},"modified":"2024-01-22T20:05:43","modified_gmt":"2024-01-23T02:05:43","slug":"pancake-race","status":"publish","type":"post","link":"https:\/\/laurentlessard.com\/bookproofs\/pancake-race\/","title":{"rendered":"Pancake race"},"content":{"rendered":"<p>This week&#8217;s <a href=\"https:\/\/thefiddler.substack.com\/p\/can-you-make-it-home-in-time-for\">Fiddler<\/a> is a logic puzzle about getting home as fast as possible.<\/p>\n<blockquote><p>\nAlice, Bob, and Carey start together and each walk home at a different constant speed. Once all three get home, they can have pancakes! Alice can walk home in 10 minutes, Bob can do it in 20, and Carey in 30. Fortunately, any of them can carry any of the others on their back without reducing their own walking speed. Assume that they can pick someone up, set someone down, and change direction instantaneously. What is the fastest they can get to eat pancakes?<\/p>\n<p><em>Extra Credit<\/em><br \/>\nThere is now a fourth: Dee. Dee is the slowest, needing 60 minutes to walk home. As before, anyone can carry anyone else, and they won&#8217;t get pancakes until everyone gets home. What is the fastest this can happen?\n<\/p><\/blockquote>\n<p>My solution:<br \/>\n<a href=\"javascript:Solution('soln_pcakerace','toggle_pcakerace')\" id=\"toggle_pcakerace\">[Show Solution]<\/a><\/p>\n<div id=\"soln_pcakerace\" style=\"display: none\">\n<p><!--This seems like a logic puzzle at first glance, but it carries a nice geometric intuition. Specifically, imagine time on the $x$-axis and distance from home on the $y$-axis. If Alice, Bob, and Carey (I'll just call them A, B, C from now on) walk at a constant speed, their paths show up as straight lines, as in the diagram below.\n\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes1-1024x391.png\" alt=\"\" width=\"840\" height=\"321\" class=\"aligncenter size-large wp-image-3905\" \/>\n\nFor the first part of the problem, the optimal strategy is:\n\n\n<ol>\n\n\n<li> A carries C and B travels alone.\n\n\n<li> A arrives home, drops off C, then returns to meet up with B.\n\n\n<li> A meets up with B, picks them up and returns home.\n<\/ol>\n\n\nGeometrically, the picture looks like this. Each edge is labeled with who is traveling on that edge. For example, \"A+C\" means that A is carrying C. Note that the slope of each line (distance divided by time) is the speed of travel. Since everyone travels at constant speed, the trajectories have constant slope (straight lines).\n\n<a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes2.png\" class=\"broken_link\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes2-1024x530.png\" alt=\"\" width=\"840\" height=\"435\" class=\"aligncenter size-large wp-image-3906\" \/><\/a>\n\nFor the extra credit, the optimal strategy is:\n\n\n<ol>\n\n\n<li> A carries D and B carries C.\n\n\n<li> A arrives home, drops off D, then returns to meet up with B.\n\n\n<li> A meets up with B, picks up C, then return home.\n\n\n<li> A arrives home, drops off C, then returns to meet up with B.\n\n\n<li> A meets up with B, picks them up and returns home.\n<\/ol>\n\n\nGeometrically, the picture looks like this:\n\n<a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes3-1024x530.png\" alt=\"\" width=\"840\" height=\"435\" class=\"aligncenter size-large wp-image-3907\" \/><\/a>\n\nNow that we have the pictures in mind, calculating time is a matter of geometry and similar triangles! Specifically, we want to find the distances OU and OW on the diagram.\n\n\n<ul>\n\n\n<li> Since the speed of A does not change, the segments PS and ST have opposite slopes, and therefore the angles PSO and TSK (indicated on the diagram) must be the same.\n\n\n<li> Therefore, triangles PSO and TSK are similar, and we can write:\n\\[\n\\frac{\\text{PO}}{\\text{TK}} = \\frac{\\text{OS}}{\\text{KS}}\n\\iff\n\\frac{a}{b} = \\frac{x}{y}\n\\]\n\n\n<li> We also have that triangles RPO and RTO are similar. Therefore:\n\\[\n\\frac{\\text{PO}}{\\text{TK}} = \\frac{\\text{OR}}{\\text{KR}}\n\\iff\n\\frac{a}{b} = \\frac{2x}{x-y}\n\\]\n\n\n<li> Solving the two equations above, we find that $x=3y$ and $a=3b$. So the triangle shrinks by a factor of $3$. By similarity, the next triangle also shrinks by a factor of $3$. In other words,\n\\[\n\\text{SU}=2y=\\frac{2x}{3},\\quad\n\\text{UW}=\\frac{2y}{3} = \\frac{2x}{9}\n\\]\n<\/ul>\n\n\n\nSince $x=10$ minutes, we can now calculate the solutions to both problems as follows:\n\\begin{align}\n\\text{OU} &= 10\\left(1 + \\frac{2}{3}\\right) = \\frac{50}{3} \\approx 16.6666 \\text{ minutes} \\\\\n\\text{OW} &= 10\\left(1 + \\frac{2}{3} + \\frac{2}{9}\\right) = \\frac{170}{9} \\approx 18.8888 \\text{ minutes}\n\\end{align}\n\n\n\n<h3>General speeds<\/h3>\n\n\n\nSuppose A, B, C, D take time $t_A \\lt t_B \\lt t_C \\lt t_D$ to get home. Again, we can use the same strategy as above (A carries D, B carries C, etc.) but we have to update our solution a bit. In the previous solution, we used the fact that $\\text{OR}=2x = 2(\\text{OS})$ (A is twice as fast as B). That won't necessarily be true this time, but a similar picture still works. We just need to change the similarity relationships to:\n\\[\n\\frac{a}{b} = \\frac{t_A}{y},\n\\qquad\n\\frac{a}{b} = \\frac{t_B}{t_B-t_A-y}\n\\]Now, eliminating $\\frac{a}{b}$ and solving for $y$, we obtain\n\\[\ny = \\frac{t_A(t_B-t_A)}{t_B + t_A}\n\\]Note that when we substitute $t_A=10$ and $t_B=20$, we recover $y=\\frac{10}{3}$, as before. Now we can find the answers to both problems in terms of $t_A$ and $t_B$:\n\\begin{align}\n\\text{OU} &= t_A\\left(1 + 2\\frac{t_B-t_A}{t_B+t_A}\\right) = \\frac{t_A(3t_B-t_A)}{t_B+t_A} \\\\\n\\text{OW} &= t_A\\left(1 + 2\\frac{t_B-t_A}{t_B+t_A} + 2\\left(\\frac{t_B-t_A}{t_B+t_A}\\right)^2\\right) = \\frac{t_A(5t_B^2-2t_At_B+t_A^2)}{(t_B+t_A)^2}\n\\end{align}And, once again, we recover the same answer as before upon setting $t_A=10$ and $t_B=20$.\n<\/div>\n\n\n--><\/p>\n<p>This seems like a logic puzzle at first glance, but it carries a nice geometric intuition. Specifically, imagine time on the $x$-axis and distance from home on the $y$-axis. If Alice, Bob, and Carey (I&#8217;ll just call them A, B, C from now on) walk at a constant speed, their paths show up as straight lines.<\/p>\n<p>For the first problem, the optimal thing to do is as follows:<\/p>\n<ol>\n<li> A+C ride together, and B rides alone.\n<li> At some point, A drops off C and returns to meet with B.\n<li> C continues home alone.\n<li> A meets up with B, picks them up, and A+B ride home together.\n<\/ol>\n<p>The optimal thing to have happen is for A,B,C to all arrive home at the same time, as illustrated in the diagram below. If C arrived home before A+B, then A should have dropped them off earlier and hence arrived home earlier with B. Likewise, if C arrived home after A+B, then A should have dropped them off later so they could arrive home sooner.<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_1.png\" alt=\"\" width=\"1288\" height=\"692\" class=\"aligncenter size-full wp-image-3922\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_1.png 1288w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_1-300x161.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_1-1024x550.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_1-768x413.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_1-1200x645.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>In the diagram, blue lines have &#8220;A slope&#8221; $\\pm 1$, green lines have &#8220;B slope&#8221; $\\pm\\frac{1}{2}$, and red lines have &#8220;C slope&#8221; $\\pm\\frac{1}{3}$. The points of interest are F, G, H, as shown. I wrote in their coordinates in terms of unknowns $p,q,r$ in units of 10 minutes. We now have three equations:<\/p>\n<ul>\n<li> FG has slope $1$, therefore $p-\\tfrac{1}{2}q = q-p$\n<li> GH has slope $-1$, therefore $1-\\tfrac{1}{2}q = r-q$\n<li> FH has slope $-\\frac{1}{3}$, therefore $1-p=\\tfrac{1}{3}(r-p)$\n<\/ul>\n<p>Solving these equations, we obtain<br \/>\n\\[<br \/>\np=\\frac{3}{4},\\quad q=1,\\quad r=\\frac{3}{2}.<br \/>\n\\]Since I used units of 10 minutes, the arrival time is $10r = 10 \\cdot \\frac{3}{2}$ minutes, or exactly <strong>15 minutes.<\/strong><\/p>\n<p>\n<strong>Note:<\/strong> I&#8217;d like to thank commenter TLK for pointing out an error in a previous version of my solution. I was a bit hasty in my first write-up and presumed that A would carry C all the way home before returning to fetch B!<\/p>\n<h3>Extra credit<\/h3>\n<p>For the extra credit, the solution is quite a bit more complicated:<\/p>\n<ol>\n<li> A+D ride together, and B+C ride together\n<li> At some point, A drops off D and returns to meet with B.\n<li> D continues toward home.\n<li> A meets up with B, returns home with B, and C continues alone.\n<li> A+B meet up with D, B carries D home and A turns back.\n<li> A meets up with C and carries C home.\n<\/ol>\n<p>Once again, the optimal thing to have happen is for A,B,C,D to all arrive home at the same time. Here is the corresponding diagram.<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes3.png\" alt=\"\" width=\"1529\" height=\"822\" class=\"aligncenter size-full wp-image-3927\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes3.png 1529w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes3-300x161.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes3-1024x551.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes3-768x413.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes3-1200x645.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>This time, we have more equations and more variables.<\/p>\n<ul>\n<li> FG has slope $1$, therefore $p-\\tfrac{1}{2}q = q-p$.\n<li> FH has slope $-\\tfrac{1}{6}$, therefore $H = (p+s,1-p-\\tfrac{1}{6}s)$ for some $s$.\n<li> GJ has slope $-\\tfrac{1}{3}$, therefore $J = (q+r,1-\\tfrac{1}{2}q-\\tfrac{1}{3}r$.\n<li> GH has slope $-1$, therefore $p+s-q=p+\\tfrac{1}{6}s-\\tfrac{1}{2}q$\n<li> HJ has slope $1$, therefore $q+r-p-s=p+\\tfrac{1}{6}s-\\tfrac{1}{2}q-\\tfrac{1}{3}r$.\n<li> HK has slope $-\\tfrac{1}{2}$, therefore $1-p-\\tfrac{1}{6}s = \\tfrac{1}{2}(t-p-s)$.\n<li> JK has slope $-1$, therefore $1-\\tfrac{1}{2}q-\\tfrac{1}{3}r=t-q-r$.\n<\/ul>\n<p>Solving these equations, we obtain:<br \/>\n\\[<br \/>\np= \\frac{5}{8},\\quad<br \/>\nq= \\frac{5}{6},\\quad<br \/>\nr= \\frac{7}{16},\\quad<br \/>\ns= \\frac{1}{2},\\quad<br \/>\nt= \\frac{41}{24}.<br \/>\n\\]The arrival time is $10t=\\frac{205}{12}$ minutes, or 17.0833 minutes, <\/br>or exactly <strong>17 minutes and 5 seconds<\/strong>.<\/p>\n<p>\n<strong>Note:<\/strong> I&#8217;d like to thank commenter Sanandan Swaminathan for pointing out an error in a previous version of my solution. Once again, I was a bit hasty in my first write-up and presumed that A would pick up C on their first return trip, when in fact it&#8217;s better for A to pick up B! Here is a diagram of the previous (sub-optimal) solution I found, which only achieves 17.8125 minutes, or 17 minutes and 48.75 seconds.<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2.png\" alt=\"\" width=\"1395\" height=\"752\" class=\"aligncenter size-full wp-image-3921\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2.png 1395w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2-300x162.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2-1024x552.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2-768x414.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2-1200x647.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p><!-- For the extra credit, the solution is similar, but a bit more complicated.\n\n\n<ol>\n\n\n<li> A+D ride together, and B+C ride together.\n\n\n<li> At some point, A drops off D and returns to meet with B.\n\n\n<li> D continues home alone.\n\n\n<li> A meets up with B, returns home with C, and B continues alone.\n\n\n<li> At some point, A drops off C and returns to meet with B.\n\n\n<li> C continues home alone.\n\n\n<li> A meets up with B, picks them up, and A+B ride home together.\n<\/ol>\n\n\nOnce again, the optimal thing to have happen is for A,B,C,D to all arrive home at the same time. Here is the corresponding diagram.\n\n<a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2.png\" alt=\"\" width=\"1395\" height=\"752\" class=\"aligncenter size-full wp-image-3921\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2.png 1395w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2-300x162.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2-1024x552.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2-768x414.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2024\/01\/pancakes_updated_2-1200x647.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>\n\nThis time, we have more equations and more variables.\n\n\n<ul>\n\n\n<li> FG has slope $1$, therefore $p-\\tfrac{1}{2}q = q-p$\n\n\n<li> GK has slope $-1$, therefore $K = (q+s,1-\\tfrac{1}{2}q-s)$ for some $s$.\n\n<li> KH has slope $1$, therefore $r-q-s=\\tfrac{1}{2}q+s-\\tfrac{1}{2}r$\n\n\n<li> FL has slope $-\\tfrac{1}{6}$, therefore $1-p=\\tfrac{1}{6}(t-p)$\n\n\n<li> KL has slope $-\\tfrac{1}{3}$, therefore $1-\\tfrac{1}{2}q-s=\\tfrac{1}{3}(t-q-s)$\n\n\n<li> HL has slope $-1$, therefore $1-\\tfrac{1}{2}r=t-r$.\n<\/ul>\n\n\nSolving these equations, we obtain:\n\\[\np=\\frac{27}{32},\\quad\nq=\\frac{9}{8},\\quad\nr=\\frac{25}{16},\\quad\ns=\\frac{21}{64},\\quad\nt=\\frac{57}{32}.\n\\]The arrival time is $10t = \\frac{570}{32}$ minutes, or 17.8125 minutes, <\/br>or exactly <strong>17 minutes and 48.75 seconds.<\/strong>\n-->\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This week&#8217;s Fiddler is a logic puzzle about getting home as fast as possible. Alice, Bob, and Carey start together and each walk home at a different constant speed. Once all three get home, they can have pancakes! Alice can walk home in 10 minutes, Bob can do it in 20, and Carey in 30. &hellip; <a href=\"https:\/\/laurentlessard.com\/bookproofs\/pancake-race\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Pancake race&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":3921,"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":[42],"tags":[43,10,23],"class_list":["post-3901","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-the-fiddler","tag-fiddler","tag-geometry","tag-logic"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3901","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=3901"}],"version-history":[{"count":17,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3901\/revisions"}],"predecessor-version":[{"id":3926,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3901\/revisions\/3926"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media\/3921"}],"wp:attachment":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media?parent=3901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/categories?post=3901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/tags?post=3901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}