{"id":3137,"date":"2022-01-07T11:48:19","date_gmt":"2022-01-07T17:48:19","guid":{"rendered":"https:\/\/laurentlessard.com\/bookproofs\/?p=3137"},"modified":"2022-01-07T12:39:39","modified_gmt":"2022-01-07T18:39:39","slug":"triangle-trek","status":"publish","type":"post","link":"https:\/\/laurentlessard.com\/bookproofs\/triangle-trek\/","title":{"rendered":"Triangle Trek"},"content":{"rendered":"<p>This week&#8217;s <a href=\"https:\/\/fivethirtyeight.com\/features\/can-you-trek-the-triangle\/\">Riddler Classic<\/a> is a problem involving traversing a triangle.<\/p>\n<blockquote><p>\nAmare the ant is traveling within Triangle ABC, as shown below. Angle A measures 15 degrees, and sides AB and AC both have length 1.<br \/>\n<img decoding=\"async\" src=\"https:\/\/fivethirtyeight.com\/wp-content\/uploads\/2022\/01\/Screen-Shot-2022-01-06-at-2.20.32-PM.png\" alt=\"\" \/><br \/>\nAmare must:<\/p>\n<ul>\n<li> Start at point B.\n<li> Second, touch a point \u2014 any point \u2014 on side AC.\n<li> Third, touch a point \u2014 any point \u2014 back on side AB.\n<li> Finally, proceed to a point \u2014 any point \u2014 on side AC (not necessarily the same point he touched earlier).\n<\/ul>\n<p>What is the shortest distance Amare can travel to complete the desired path?\n<\/p><\/blockquote>\n<p>I solved the problem in two different ways. The elegant solution:<br \/>\n<a href=\"javascript:Solution('soln_tritrek','toggle_tritrek')\" id=\"toggle_tritrek\">[Show Solution]<\/a><\/p>\n<div id=\"soln_tritrek\" style=\"display: none\">\nLet&#8217;s solve a slightly more general version of the problem. Suppose the triangle has angle $\\theta$ at point $A$, and suppose Amare&#8217;s next three waypoints are at $D$, $E$, and $F$, as shown below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1-300x115.png\" alt=\"\" width=\"300\" height=\"115\" class=\"aligncenter size-medium wp-image-3141\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1-300x115.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1-1024x393.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1-768x295.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1-1200x461.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1.png 1302w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>Reflect the triangle about the line $AC$, so $B \\mapsto B&#8217;$ and $E \\mapsto E&#8217;$, as shown:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek2-300x186.png\" alt=\"\" width=\"300\" height=\"186\" class=\"aligncenter size-medium wp-image-3142\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek2-300x186.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek2-1024x637.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek2-768x477.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek2-1200x746.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek2.png 1295w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>Now reflect the new triangle about the line $AB&#8217;$, so $C\\mapsto C&#8217;$ and $F \\mapsto F&#8217;$:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek3-300x244.png\" alt=\"\" width=\"300\" height=\"244\" class=\"aligncenter size-medium wp-image-3143\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek3-300x244.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek3-1024x833.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek3-768x625.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek3-1200x976.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek3.png 1315w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>The key insight is that since the reflections preserve lengths, the path $BD+DE+EF$ followed by Amare has the same length as the path $BD+DE&#8217;+E&#8217;F&#8217;$ shown in red below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek4-300x244.png\" alt=\"\" width=\"300\" height=\"244\" class=\"aligncenter size-medium wp-image-3144\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek4-300x244.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek4-1024x832.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek4-768x624.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek4-1200x975.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek4.png 1292w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>If we move the points $E$ and $F$, then the points $E&#8217;$ and $F&#8217;$ move accordingly, and we obtain another possible path:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek5-300x242.png\" alt=\"\" width=\"300\" height=\"242\" class=\"aligncenter size-medium wp-image-3145\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek5-300x242.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek5-1024x826.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek5-768x620.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek5-1200x968.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek5.png 1295w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>Rather than picking $D,E,F$, we can instead pick $D,E&#8217;,F&#8217;$. Since the goal is to minimize the total distance, it&#8217;s clear that we should place $F&#8217;$ such that $AF&#8217; \\perp BF&#8217;$, and $D$ and $E&#8217;$ should be placed so that all three points lie on a line. This produces the figure:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek6-300x243.png\" alt=\"\" width=\"300\" height=\"243\" class=\"aligncenter size-medium wp-image-3146\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek6-300x243.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek6-1024x829.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek6-768x622.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek6-1200x972.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek6.png 1287w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>So the shortest distance Amare can travel can be found by examining the right triangle $ABF&#8217;$. Since $AB$ has length $1$, we conclude that that<\/p>\n<p style=\"text-align: center;\"><span style=\"background-color: #AFC8E6; padding: 25px 10px 25px 10px;\">$\\displaystyle<br \/>\n\\text{Minimum distance } = \\sin(3\\theta)<br \/>\n$<\/span><\/p>\n<p>In the case where $\\theta = 15^\\circ$, we get a length of $\\sin(45^\\circ) = \\frac{1}{\\sqrt{2}} \\approx 0.7071$.<\/p>\n<p>Note that this solution only works if $3\\theta \\lt 90^\\circ$, i.e. $0 \\lt \\theta \\lt 30^\\circ$. In the case that $\\theta \\geq 30^\\circ$, we obtain the degenerate solution $D = E = F = A$, so Amare should head directly to point $A$ and the total distance traveled is $1$.\n<\/p><\/div>\n<p>And the more complicated solution:<br \/>\n<a href=\"javascript:Solution('soln_tritrek2','toggle_tritrek2')\" id=\"toggle_tritrek2\">[Show Solution]<\/a><\/p>\n<div id=\"soln_tritrek2\" style=\"display: none\">\n<p>We can also use calculus to solve the problem. Let&#8217;s start with the same picture as before:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1-300x115.png\" alt=\"\" width=\"300\" height=\"115\" class=\"aligncenter size-medium wp-image-3141\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1-300x115.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1-1024x393.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1-768x295.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1-1200x461.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek1.png 1302w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>Suppose $|AD|=x$, $|AE|=y$, and $|AF|=z$. From the law of cosines:<br \/>\n\\begin{align}<br \/>\n|BD| &#038;= \\sqrt{1+x^2-2x\\cos(\\theta)} \\\\<br \/>\n|DE| &#038;= \\sqrt{x^2+y^2-2xy\\cos(\\theta)} \\\\<br \/>\n|EF| &#038;= \\sqrt{y^2+z^2-2yz\\cos(\\theta)}<br \/>\n\\end{align}Let $f(x,y,z)$ be the sum of these three distances, which is the total distance traveled by Amare. We want to find $x,y,z$ such that $f(x,y,z)$ is minimized. A necessary condition for minimality is that the partial derivatives of $f$ with respect to $x,y,z$ should be zero. Let&#8217;s start with $z$:<br \/>\n\\[<br \/>\n\\frac{\\partial}{\\partial z}f(x,y,z) = \\frac{z-y \\cos (\\theta )}{\\sqrt{y^2+z^2-2 y z \\cos (\\theta )}}<br \/>\n\\]Setting this equal to zero, we conclude that $z=y\\cos(\\theta)$. We can now substitute this value of $z$ into the definition for $f$ and we obtain a simpler expression in only two variables:<br \/>\n\\begin{align}<br \/>\ng(x,y) &#038;= f(x,y,y\\cos(\\theta)) \\\\<br \/>\n&#038;= \\sqrt{1+x^2-2x\\cos(\\theta)} + \\sqrt{x^2+y^2-2xy\\cos(\\theta)} + y\\sin(\\theta)<br \/>\n\\end{align}To make sure there is no funny business going on, let&#8217;s plot this function to see what it looks like for $\\theta=15^\\circ$. Here is a contour plot:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek7-1024x884.png\" alt=\"\" width=\"840\" height=\"725\" class=\"aligncenter size-large wp-image-3155\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek7-1024x884.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek7-300x259.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek7-768x663.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek7-1200x1036.png 1200w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2022\/01\/tritrek7.png 1430w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>We can clearly see that there is a unique minimum that occurs in the region near $(x,y) \\approx (0.8,0.7)$. Ok, so let&#8217;s proceed. Consider now the derivative with respect to $y$:<br \/>\n\\[<br \/>\n\\frac{\\partial}{\\partial y} g(x,y) = \\frac{y-x \\cos (\\theta )}{\\sqrt{x^2+y^2-2 x y \\cos (\\theta )}} + \\sin (\\theta )<br \/>\n\\]Setting this equal to zero (I&#8217;ll spare you the algebra), we obtain $y = x \\cos(2\\theta)\\sec(\\theta)$. Substituting this into $g(x,y)$, we obtain a function of just $x$:<br \/>\n\\begin{align}<br \/>\nh(x) &#038;= g(x,x \\cos(2\\theta)\\sec(\\theta)) \\\\<br \/>\n&#038;= \\sqrt{1+x^2-2 x \\cos (\\theta )}+x \\sin (2 \\theta )<br \/>\n\\end{align}Finally, we can take the derivative with respect to $x$:<br \/>\n\\[<br \/>\n\\frac{\\partial}{\\partial x}h(x) = \\frac{x-\\cos (\\theta )}{\\sqrt{1+x^2-2 x \\cos (\\theta )}} + \\sin (2 \\theta )<br \/>\n\\]Solving for $x$, (sparing you the algebra again!) we obtain $x = \\cos (3 \\theta ) \\sec (2 \\theta )$. Putting everything together, the $(x,y,z)$ that minimize the total distance traveled by Amare is<br \/>\n\\[<br \/>\nx = \\cos (3 \\theta ) \\sec (2 \\theta ),\\quad<br \/>\ny = \\cos(3\\theta)\\sec(\\theta),\\quad<br \/>\nz = \\cos(3\\theta)<br \/>\n\\]Substituting into either $h(x)$, $g(x,y)$, or $f(x,y,z)$, we obtain the minimum distance traveled by Amare (after simplification):<\/p>\n<p style=\"text-align: center;\"><span style=\"background-color: #AFC8E6; padding: 25px 10px 25px 10px;\">$\\displaystyle<br \/>\n\\text{Minimum distance } = \\sin(3\\theta)<br \/>\n$<\/span><\/p>\n<p>If you read the first solution, then it should come as no surprise that the total distance is also equal to $\\sqrt{1-z^2}$, since (based on the last figure of the first solution), we have $z=|AF|=|AF&#8217;|$ and $|BF&#8217;|^2 + |AF&#8217;|^2 = 1$ by the Pythagorean theorem.\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This week&#8217;s Riddler Classic is a problem involving traversing a triangle. Amare the ant is traveling within Triangle ABC, as shown below. Angle A measures 15 degrees, and sides AB and AC both have length 1. Amare must: Start at point B. Second, touch a point \u2014 any point \u2014 on side AC. Third, touch &hellip; <a href=\"https:\/\/laurentlessard.com\/bookproofs\/triangle-trek\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Triangle Trek&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":3146,"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":[28,10,2],"class_list":["post-3137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-riddler","tag-calculus","tag-geometry","tag-riddler"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3137","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=3137"}],"version-history":[{"count":14,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3137\/revisions"}],"predecessor-version":[{"id":3149,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3137\/revisions\/3149"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media\/3146"}],"wp:attachment":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media?parent=3137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/categories?post=3137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/tags?post=3137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}