{"id":3754,"date":"2023-09-10T09:18:32","date_gmt":"2023-09-10T14:18:32","guid":{"rendered":"https:\/\/laurentlessard.com\/bookproofs\/?p=3754"},"modified":"2023-09-10T14:57:48","modified_gmt":"2023-09-10T19:57:48","slug":"the-weaving-loom-problem","status":"publish","type":"post","link":"https:\/\/laurentlessard.com\/bookproofs\/the-weaving-loom-problem\/","title":{"rendered":"The weaving loom problem"},"content":{"rendered":"<p>This week&#8217;s <a href=\"https:\/\/thefiddler.substack.com\/p\/can-you-bob-and-weave\">Fiddler<\/a> is a classic problem.<\/p>\n<blockquote><p>\nA <a href=\"https:\/\/www.ssww.com\/item\/weaving-loom-and-hook-set-LM150\/\" class=\"broken_link\">weaving loom<\/a> consists of equally spaced hooks along the x and y axes. A string connects the farthest hook on the x-axis to the nearest hook on the y-axis, and continues back and forth between the axes, always taking up the next available hook. This leads to a picture that looks like this:<\/p>\n<div style=\"text-align: center;\">\n<img decoding=\"async\" src=\"https:\/\/substackcdn.com\/image\/fetch\/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee51e516-b892-4850-b85f-e12b3700cc5a_1520x1422.png\" alt=\"\" width=300\/>\n<\/div>\n<p>As the number of hooks goes to infinity, what does the shape trace out?<\/p>\n<p><em>Extra credit:<\/em> If four looms are rotated and superimposed as shown below, what is the area of the white region in the middle?<\/p>\n<div style=\"text-align: center;\">\n<img decoding=\"async\" src=\"https:\/\/substackcdn.com\/image\/fetch\/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40506d0-c755-4fe1-b5e2-33131957a5de_1600x1337.png\" alt=\"\" width=335\/>\n<\/div>\n<\/blockquote>\n<p>My solution:<br \/>\n<a href=\"javascript:Solution('soln_loom','toggle_loom')\" id=\"toggle_loom\">[Show Solution]<\/a><\/p>\n<div id=\"soln_loom\" style=\"display: none\">\n<p>Suppose the weaving loom has size $1\\times 1$. If a given string starts a fraction $\\alpha$ away from the origin along the $y$-axis, so at the point $(0,\\alpha)$, it will connect to the point $(1-\\alpha,0)$ along the $x$-axis. Therefore, the set of all lines have equations:<br \/>\n\\[<br \/>\ny = \\alpha-\\frac{\\alpha}{1-\\alpha}x<br \/>\n\\]Suppose the limiting shape has equation $y = f(x)$. For a given $x$, $f(x)$ is the largest value of $y$ achievable for one of the lines above at that given $x$. This is illustrated in the diagram below:<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2023\/09\/loom.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2023\/09\/loom.gif\" alt=\"\" width=\"777\" height=\"750\" class=\"aligncenter size-full wp-image-3761\" \/><\/a><\/p>\n<p>In other words, we have:<br \/>\n\\[<br \/>\nf(x) = \\max_{0\\leq\\alpha\\leq 1} \\left( \\alpha-\\frac{\\alpha}{1-\\alpha}x \\right)<br \/>\n\\]It&#8217;s clear that the maximum will not occur at a boundary point ($\\alpha=0$ or $\\alpha=1$), so it must occur at a point where the derivative with respect to $\\alpha$ is zero. In other words,<br \/>\n\\[<br \/>\n\\frac{\\mathrm{d}}{\\mathrm{d}\\alpha}\\left( \\alpha-\\frac{\\alpha}{1-\\alpha}x \\right)<br \/>\n= 1-\\frac{x}{(1-\\alpha)^2} = 0<br \/>\n\\]The optimal choice is $\\alpha_\\star = 1-\\sqrt{x}$, and this leads to<br \/>\n\\begin{align}<br \/>\nf(x) &#038;= 1-\\sqrt{x}-\\frac{1-\\sqrt{x}}{\\sqrt{x}}x \\\\<br \/>\n&#038;=1-2\\sqrt{x}+x \\\\<br \/>\n&#038;= (1-\\sqrt{x})^2<br \/>\n\\end{align}A more symmetric way to express this function is to write it implicitly. If $y=f(x)$, the set of points $(x,y)$ that satisfy the equation above are precisely the points that satisfy the equation<\/p>\n<p style=\"text-align: center;\"><span style=\"background-color: #AFC8E6; padding: 25px 10px 25px 10px;\">$\\displaystyle<br \/>\n\\sqrt{x} + \\sqrt{y} = 1<br \/>\n$<\/span><\/p>\n<p>Let&#8217;s dig a little deeper and see if we can learn more about the shape of this curve. Squaring both sides, rearranging, and squaring again, we obtain:<br \/>\n\\[<br \/>\nx^2+y^2-2xy-2x-2y+1 = 0<br \/>\n\\]This is a quadratic expression in $x$ and $y$, which means it is a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Conic_section\">conic section<\/a>! So either a circle, ellipse, hyperbola, or parabola. But which one? The easiest way to check is to examine the eigenvalues of the quadratic part (there will be two eigenvalues). Here is a handy table for reference:<br \/>\n\\[<br \/>\n\\begin{array}{l|l}<br \/>\n\\textbf{eigenvalue property} &#038; \\textbf{conic section} \\\\ \\hline<br \/>\n\\text{equal eigenvalues} &#038; \\text{circle} \\\\<br \/>\n\\text{same sign and nonzero} &#038; \\text{ellipse} \\\\<br \/>\n\\text{different sign and nonzero} &#038; \\text{hyperbola} \\\\<br \/>\n\\text{one zero eigenvalue} &#038; \\text{parabola}<br \/>\n\\end{array}<br \/>\n\\]<br \/>\nIn our case, the quadratic terms are:<br \/>\n\\[<br \/>\nx^2+y^2-2xy = \\begin{bmatrix}x\\\\y\\end{bmatrix}^\\mathsf{T}<br \/>\n\\begin{bmatrix}1 &#038; -1 \\\\ -1 &#038; 1\\end{bmatrix}<br \/>\n\\begin{bmatrix}x\\\\y\\end{bmatrix}<br \/>\n\\]This matrix is singular (determinant is zero), so there is a zero eigenvalue, and the conic section must be a parabola! To make this more evident, we can rearrange the equation a bit more to obtain<br \/>\n\\[<br \/>\n\\left(\\frac{x+y}{\\sqrt{2}}\\right) = \\frac{1}{\\sqrt{2}}\\left(\\frac{x-y}{\\sqrt{2}}\\right)^2 + \\frac{1}{2\\sqrt{2}}<br \/>\n\\]If we imagine rotating our curve by $45$ degrees counterclockwise, this would correspond to the transformation $(x,y)\\mapsto\\left(\\tfrac{x-y}{\\sqrt{2}}, \\tfrac{x+y}{\\sqrt{2}} \\right)$, so the equation above in rotated coordinates $(\\hat x, \\hat y)$ is simply<br \/>\n\\[<br \/>\n\\hat y = \\frac{1}{\\sqrt{2}}\\hat x^2 + \\frac{1}{2\\sqrt{2}},<br \/>\n\\]which is clearly a parabola.<\/p>\n<p><strong>Tangency.<\/strong> Based on the animation above, it looks like the line that crosses $(x,f(x))$ is also <em>tangent to<\/em> the curve at that point. To verify this, we can compute the derivative directly and compare it to the slope of the line:<br \/>\n\\[<br \/>\nf'(x) = \\frac{\\mathrm{d}}{\\mathrm{d}x}(1-\\sqrt{x})^2 = 1-\\frac{1}{\\sqrt{x}}<br \/>\n\\]But the $\\alpha_\\star$ we found for a point $x$ produces:<br \/>\n\\[<br \/>\n\\text{(slope of line)} = \\frac{-\\alpha_\\star}{1-\\alpha_\\star} = \\frac{-(1-\\sqrt{x})}{1-(1-\\sqrt{x})} = 1-\\frac{1}{\\sqrt{x}},<br \/>\n\\]which is a perfect match!<\/p>\n<h3>Extra credit<\/h3>\n<p>To find the area of the central region, we can break our shape into pieces as shown below.<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2023\/09\/loom2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2023\/09\/loom2.png\" alt=\"\" width=\"554\" height=\"558\" class=\"aligncenter size-full wp-image-3760\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2023\/09\/loom2.png 554w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2023\/09\/loom2-298x300.png 298w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2023\/09\/loom2-150x150.png 150w\" sizes=\"auto, (max-width: 554px) 85vw, 554px\" \/><\/a><\/p>\n<p>The point $x_0$ corresponds to the $x$-value of our curve where $y=\\frac{1}{2}$. This is given by:<br \/>\n\\[<br \/>\nx_0 = \\left(1-\\sqrt{\\frac{1}{2}}\\right)^2 = \\frac{3}{2}-\\sqrt{2} \\approx 0.0858<br \/>\n\\]The area of the central part is the total area of the square ($1$) minus four times the shaded area, which leads us to the integral:<br \/>\n\\begin{align}<br \/>\nA &#038;= 1-4\\left( \\frac{1}{2}x_0 + \\int_{x_0}^{\\frac{1}{2}} (1-\\sqrt{x})^2\\,\\mathrm{d}x \\right) \\\\<br \/>\n&#038;= \\frac{2}{3}\\left(4\\sqrt{2}-5\\right) \\\\[2mm]<br \/>\n&#038;\\approx 0.4379<br \/>\n\\end{align}I decided to spare you the details of the integration because they&#8217;re not particularly interesting. So the white area in the middle occupies approximately $43.8\\%$ of the area of the square.\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This week&#8217;s Fiddler is a classic problem. A weaving loom consists of equally spaced hooks along the x and y axes. A string connects the farthest hook on the x-axis to the nearest hook on the y-axis, and continues back and forth between the axes, always taking up the next available hook. This leads to &hellip; <a href=\"https:\/\/laurentlessard.com\/bookproofs\/the-weaving-loom-problem\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The weaving loom problem&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":3761,"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":[28,11,43,10,4,26],"class_list":["post-3754","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-the-fiddler","tag-calculus","tag-conic-sections","tag-fiddler","tag-geometry","tag-integration","tag-optimization"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3754","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=3754"}],"version-history":[{"count":8,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3754\/revisions"}],"predecessor-version":[{"id":3764,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3754\/revisions\/3764"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media\/3761"}],"wp:attachment":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media?parent=3754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/categories?post=3754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/tags?post=3754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}