{"id":2091,"date":"2017-09-17T22:59:35","date_gmt":"2017-09-18T03:59:35","guid":{"rendered":"http:\/\/www.laurentlessard.com\/bookproofs\/?p=2091"},"modified":"2017-09-17T17:34:54","modified_gmt":"2017-09-17T22:34:54","slug":"sticks-in-the-woods","status":"publish","type":"post","link":"https:\/\/laurentlessard.com\/bookproofs\/sticks-in-the-woods\/","title":{"rendered":"Sticks in the woods"},"content":{"rendered":"<p>This <a href=\"https:\/\/fivethirtyeight.com\/features\/will-you-be-a-ghostbuster-or-a-world-destroyer\/\">Riddler puzzle<\/a> is about making triangles out of sticks! Here is the problem:<\/p>\n<blockquote><p>\nHere are four questions about finding sticks in the woods, breaking them, and making shapes:<\/p>\n<ol>\n<li>If you break a stick in two places at random, forming three pieces, what is the probability of being able to form a triangle with the pieces?\n<li>If you select three sticks, each of random length (between 0 and 1), what is the probability of being able to form a triangle with them?\n<li>If you break a stick in two places at random, what is the probability of being able to form an acute triangle \u2014 where each angle is less than 90 degrees \u2014 with the pieces?\n<li>If you select three sticks, each of random length (between 0 and 1), what is the probability of being able to form an acute triangle with the sticks?\n<\/ol>\n<\/blockquote>\n<p>For the tl;dr, here are the answers:<br \/>\n<a href=\"javascript:Solution('soln_sticks2','toggle_sticks2')\" id=\"toggle_sticks2\">[Show Solution]<\/a><\/p>\n<div id=\"soln_sticks2\" style=\"display: none\">\n<p>The probability of making&#8230;<\/p>\n<ol>\n<li> a triangle by breaking a stick into three pieces: $25\\%$.\n<li> a triangle with three random sticks: $50\\%$.\n<li> an acute triangle by breaking a stick into three pieces: $\\log(8)-2 \\approx 7.9\\%$.\n<li> an acute triangle with three random sticks: $1-\\frac{\\pi}{4} \\approx 21.5\\%$.\n<\/ol>\n<\/div>\n<p>Here are detailed solutions to all four problems (with cool visuals!):<br \/>\n<a href=\"javascript:Solution('soln_sticks1','toggle_sticks1')\" id=\"toggle_sticks1\">[Show Solution]<\/a><\/p>\n<div id=\"soln_sticks1\" style=\"display: none\">\n<h3>Problem 1<\/h3>\n<p>Given three lengths $a,b,c$, when can they form a triangle? When they satisfy the triangle inequality! In other words, whenever:<br \/>\n\\[<br \/>\na+b > c<br \/>\n\\quad\\text{and}\\quad<br \/>\nb+c > a<br \/>\n\\quad\\text{and}\\quad<br \/>\nc+a > b<br \/>\n\\]This makes sense when you think about it; if one of these inequalities were to be false, then one length would be longer than the sum of the other two, so no triangle would be possible.<\/p>\n<p>Let&#8217;s say the stick has length 1, and it is broken at locations $a$ and $b$ (measured from the same side). We&#8217;ll assume that &#8220;broken at random&#8221; means that $a$ and $b$ are uniformly and independently distributed random variables on $[0,1]$. By symmetry, the cases $a\\lt b$ and $b \\lt a$ occur with equal probability and have the same probability of producing triangles, so let&#8217;s assume $a\\lt b$. The three sidelengths are $(a, b-a, 1-b)$. Writing out the three triangle inequalities, we have:<br \/>\n\\[<br \/>\nb > \\tfrac{1}{2}<br \/>\n\\quad\\text{and}\\quad<br \/>\na < \\tfrac{1}{2}\n\\quad\\text{and}\\quad\nb-a < \\tfrac{1}{2}\n\\]Since $a$ and $b$ are uniform random variables, we can think of each $(a,b)$ as the coordinates of a point in the square $0 \\le a \\le 1$ and $0 \\le b \\le 1$. The probability we seek is precisely the area of the points satisfying our constraints. If we plot these points (and include the mirror case where $b \\lt a$ as well), here is the figure we obtain:\n\n\n\n<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks1-1009x1024.png\" alt=\"\" width=\"840\" height=\"852\" class=\"aligncenter size-large wp-image-2095\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks1-1009x1024.png 1009w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks1-296x300.png 296w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks1-768x780.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks1.png 1131w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>We can see by inspection that the shaded area is $\\tfrac{1}{4}$ of the total area. So the probability of forming a triangle by breaking a stick into three pieces is 25%.<\/p>\n<h3>Problem 2<\/h3>\n<p>In this version, we&#8217;re still trying to make a triangle, so we must enforce the same triangle inequalities as in Problem 1. In this version, however, we choose three sticks of lengths $a,b,c$ and each length is an independent random variable in the interval $[0,1]$. In this case, it is equally likely that $a$, $b$, or $c$ is largest. We&#8217;ll assume without loss of generality that $c$ is largest. In this case, we only need to worry about one of the triangle inequalities, so we have:<br \/>\n\\[<br \/>\na < c\n\\quad\\text{and}\\quad\nb < c\n\\quad\\text{and}\\quad\nc < a+b\n\\]\nHere is what it looks like when we plot the first two inequalities (in pale yellow) and then the subset of that region that also satisfies the third inequality (in dark yellow).\n\n<a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks2.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks2.gif\" alt=\"\" width=\"500\" height=\"515\" class=\"aligncenter size-full wp-image-2103\" \/><\/a><\/p>\n<p>It&#8217;s clear that the dark region has half the volume of the entire region, so the probability that the three pieces will form a triangle is $\\tfrac{1}{2}$. We can also fill the rest of the cube by symmetry, and we obtain:<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks2c.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks2c.gif\" alt=\"\" width=\"500\" height=\"515\" class=\"aligncenter size-full wp-image-2098\" \/><\/a><\/p>\n<p>If you stare at this long enough, you realize that it&#8217;s just three identical copies of the previous region glued together (so the pale yellow is now the entire cube), so this shape again has half the volume of the entire cube. In summary, the probability of forming a triangle with three randomly chosen lengths is 50%.<\/p>\n<h3>Problem 3<\/h3>\n<p>Things start to get more complicated here. We&#8217;d like to make not just a triangle, but an <em>acute<\/em> triangle. This means that each interior angle must be less than 90 degrees. If the side lengths are $a,b,c$, we have from the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Law_of_cosines\">law of cosines<\/a> that $\\cos(C) = \\tfrac{a^2+b^2-c^2}{2ab}$ where $C$ is the angle opposite side $c$. If we want $0\\le C \\le \\tfrac{\\pi}{2}$, then we should choose $\\cos(C)\\ge 0$. This holds for all three angles, so we must have:<br \/>\n\\[<br \/>\na^2+b^2 > c^2<br \/>\n\\quad\\text{and}\\quad<br \/>\nb^2+c^2 > a^2<br \/>\n\\quad\\text{and}\\quad<br \/>\nc^2+a^2 > b^2<br \/>\n\\]It turns out that these inequalities imply the triangle inequalities. Take the first one for example:<br \/>\n\\[<br \/>\nc < \\sqrt{a^2+b^2} < \\sqrt{a^2+2ab+b^2} = a+b\n\\]So we don't need to include the original triangle inequalities when we use these quadratic inequalities instead. Here is what the figure looks like when we plot all the inequalities and then mirror the image for the case $b\\lt a$:\n\n<a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3-994x1024.png\" alt=\"\" width=\"840\" height=\"865\" class=\"aligncenter size-large wp-image-2099\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3-994x1024.png 994w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3-291x300.png 291w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3-768x791.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3.png 1119w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>This is a much more complicated shape than what we had before. We&#8217;ll compute its area by computing the areas of the complementary pieces, pictured below:<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3b-998x1024.png\" alt=\"\" width=\"840\" height=\"862\" class=\"aligncenter size-large wp-image-2100\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3b-998x1024.png 998w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3b-292x300.png 292w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3b-768x788.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks3b.png 1125w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>Each of the four blue regions have equal area by symmetry. One of them is given by the inequalities:<br \/>\n\\[<br \/>\n(1-b)^2 \\ge (b-a)^2 + a^2<br \/>\n\\quad\\text{and}\\quad<br \/>\n0 \\le a \\le \\tfrac{1}{2}<br \/>\n\\quad\\text{and}\\quad<br \/>\nb \\ge \\tfrac{1}{2}<br \/>\n\\]Solving the first inequality for $b$, the boundary is given by: $b=\\frac{1-2a^2}{2(1-a)}$. Therefore, we can compute one of the blue areas by evaluating the integral:<br \/>\n\\[<br \/>\nA_\\text{blue} = \\int_{0}^{1\/2} \\left(\\frac{1-2a^2}{2(1-a)}-\\frac{1}{2}\\right)\\,\\mathrm{d}a=\\frac{3}{8}-\\frac{1}{2}\\log(2)<br \/>\n\\]We can use a similar approach for each of the yellow regions, and we find:<br \/>\n\\[<br \/>\nA_\\text{yellow} = \\int_{1\/2}^{1} \\frac{2a-1}{2a}\\,\\mathrm{d}a=\\frac{1}{2}-\\frac{1}{2}\\log(2)<br \/>\n\\]Putting everything together, we can calculate the area of the original blue shape, and it&#8217;s given by:<br \/>\n\\begin{align}<br \/>\nA_\\text{acute} &#038;= \\frac{1}{2}-4A_\\text{blue}-2A_\\text{yellow} \\\\<br \/>\n&#038;= \\frac{1}{2}-4\\left(\\frac{3}{8}-\\frac{1}{2}\\log(2)\\right)-2\\left(\\frac{1}{2}-\\frac{1}{2}\\log(2)\\right) \\\\<br \/>\n&#038;= \\log(8)-2 \\approx 0.07944<br \/>\n\\end{align}So the probability of forming an acute triangle by breaking a stick into three pieces is about 7.9%.<\/p>\n<h3>Problem 4<\/h3>\n<p>We&#8217;ll solve this problem the same way we solved Problem 2, but we&#8217;ll replace the triangle inequalities with the acute triangle inequalities used in Problem 3. As in Problem 2, we end up with a 3D volume rather than a 2D area. For simplicity again, we&#8217;ll assume that $c$ is the largest length, which accounts for one third of all possibilities. Here is the volume we get:<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks4.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks4.gif\" alt=\"\" width=\"500\" height=\"515\" class=\"aligncenter size-full wp-image-2104\" \/><\/a><\/p>\n<p>While this looks like a more complicated shape than the one from Problem 2, the curved surface has equation $c^2=a^2+b^2$, which is just the equation of a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cone\">right circular cone<\/a>! So we can calculate the volume of the region of interest by subtraction. It&#8217;s $1\/3$ of the volume of the cube minus $1\/4$ of the volume of the cone. The total probability is three times this volume, because we must account for the remaining identical pieces. The final answer is:<br \/>\n\\[<br \/>\nP_\\text{final}=3\\left( \\frac{1}{3}-\\frac{1}{4}\\left( \\frac{\\pi}{3} \\right) \\right) =1-\\frac{\\pi}{4} \\approx 0.2146<br \/>\n\\]So the probability of forming an acute triangle with three randomly chosen lengths is about 21.5%.<\/p>\n<p>Just for fun, here is what you get when you put all three shapes together!<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks4b.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2017\/09\/sticks4b.gif\" alt=\"\" width=\"500\" height=\"518\" class=\"aligncenter size-full wp-image-2107\" \/><\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This Riddler puzzle is about making triangles out of sticks! Here is the problem: Here are four questions about finding sticks in the woods, breaking them, and making shapes: If you break a stick in two places at random, forming three pieces, what is the probability of being able to form a triangle with the &hellip; <a href=\"https:\/\/laurentlessard.com\/bookproofs\/sticks-in-the-woods\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Sticks in the woods&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2107,"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":[10,8],"class_list":["post-2091","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-riddler","tag-geometry","tag-probability"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/2091","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=2091"}],"version-history":[{"count":10,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/2091\/revisions"}],"predecessor-version":[{"id":2112,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/2091\/revisions\/2112"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media\/2107"}],"wp:attachment":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media?parent=2091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/categories?post=2091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/tags?post=2091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}